v1.15.0 #311
@ -33,6 +33,7 @@ void PayloadPcduHandler::doStartUp() {
|
|||||||
if (pwrStateMachine.getState() == power::States::IDLE) {
|
if (pwrStateMachine.getState() == power::States::IDLE) {
|
||||||
pwrStateMachine.start(MODE_ON, pwrSubmode);
|
pwrStateMachine.start(MODE_ON, pwrSubmode);
|
||||||
}
|
}
|
||||||
|
clearSetOnOffFlag = true;
|
||||||
auto opCode = pwrStateMachine.fsm();
|
auto opCode = pwrStateMachine.fsm();
|
||||||
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
||||||
pwrStateMachine.reset();
|
pwrStateMachine.reset();
|
||||||
@ -50,6 +51,11 @@ void PayloadPcduHandler::doShutDown() {
|
|||||||
if (pwrStateMachine.getState() == power::States::IDLE) {
|
if (pwrStateMachine.getState() == power::States::IDLE) {
|
||||||
pwrStateMachine.start(MODE_OFF, 0);
|
pwrStateMachine.start(MODE_OFF, 0);
|
||||||
}
|
}
|
||||||
|
if (clearSetOnOffFlag) {
|
||||||
|
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
|
||||||
|
clearSetOnOffFlag = false;
|
||||||
|
}
|
||||||
|
|
||||||
auto opCode = pwrStateMachine.fsm();
|
auto opCode = pwrStateMachine.fsm();
|
||||||
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
|
||||||
pwrStateMachine.reset();
|
pwrStateMachine.reset();
|
||||||
|
@ -124,6 +124,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
|||||||
bool txToMpaInjectionRequested = false;
|
bool txToMpaInjectionRequested = false;
|
||||||
bool mpaToHpaInjectionRequested = false;
|
bool mpaToHpaInjectionRequested = false;
|
||||||
bool allOnInjectRequested = false;
|
bool allOnInjectRequested = false;
|
||||||
|
bool clearSetOnOffFlag = true;
|
||||||
|
|
||||||
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
|
||||||
uint8_t tempReadDivisor = 1;
|
uint8_t tempReadDivisor = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user