Small rearragenment in Heater.cpp
This commit is contained in:
parent
40dae8c961
commit
4fb792447e
@ -5,10 +5,9 @@
|
|||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
|
|
||||||
Heater::Heater(uint32_t objectId, uint8_t switch0, uint8_t switch1) :
|
Heater::Heater(uint32_t objectId, uint8_t switch0, uint8_t switch1) :
|
||||||
HealthDevice(objectId, 0), internalState(STATE_OFF), powerSwitcher(
|
HealthDevice(objectId, 0), internalState(STATE_OFF), switch0(switch0), switch1(switch1),
|
||||||
NULL), pcduQueueId(0), switch0(switch0), switch1(switch1), wasOn(false), timedOut(false),
|
heaterOnCountdown(10800000)/*about two orbits*/,
|
||||||
reactedToBeingFaulty(false), passive(false), eventQueue(NULL),
|
parameterHelper(this) {
|
||||||
heaterOnCountdown(10800000)/*about two orbits*/, parameterHelper(this), lastAction(CLEAR) {
|
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue();
|
eventQueue = QueueFactory::instance()->createMessageQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,28 +57,28 @@ protected:
|
|||||||
// no need for any special treatment is needed
|
// no need for any special treatment is needed
|
||||||
} internalState;
|
} internalState;
|
||||||
|
|
||||||
PowerSwitchIF *powerSwitcher;
|
PowerSwitchIF *powerSwitcher = nullptr;
|
||||||
MessageQueueId_t pcduQueueId;
|
MessageQueueId_t pcduQueueId = MessageQueueIF::NO_QUEUE;
|
||||||
|
|
||||||
uint8_t switch0;
|
uint8_t switch0;
|
||||||
uint8_t switch1;
|
uint8_t switch1;
|
||||||
|
|
||||||
bool wasOn;
|
bool wasOn = false;
|
||||||
|
|
||||||
bool timedOut;
|
bool timedOut = false;
|
||||||
|
|
||||||
bool reactedToBeingFaulty;
|
bool reactedToBeingFaulty = false;
|
||||||
|
|
||||||
bool passive;
|
bool passive = false;
|
||||||
|
|
||||||
MessageQueueIF* eventQueue;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
Countdown heaterOnCountdown;
|
Countdown heaterOnCountdown;
|
||||||
Countdown switchCountdown;
|
Countdown switchCountdown;
|
||||||
ParameterHelper parameterHelper;
|
ParameterHelper parameterHelper;
|
||||||
|
|
||||||
enum Action {
|
enum Action {
|
||||||
SET, CLEAR
|
SET, CLEAR
|
||||||
} lastAction;
|
} lastAction = CLEAR;
|
||||||
|
|
||||||
void doAction(Action action);
|
void doAction(Action action);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user