Merge remote-tracking branch 'origin/develop' into mueller/imtq-updates
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-10-20 16:26:35 +02:00
commit a5f2f3e8ea
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,7 @@ void PayloadPcduHandler::doStartUp() {
if (pwrStateMachine.getState() == power::States::IDLE) {
pwrStateMachine.start(MODE_ON, pwrSubmode);
}
clearSetOnOffFlag = true;
auto opCode = pwrStateMachine.fsm();
if (opCode == power::OpCodes::TO_NOT_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
pwrStateMachine.reset();
@ -50,6 +51,11 @@ void PayloadPcduHandler::doShutDown() {
if (pwrStateMachine.getState() == power::States::IDLE) {
pwrStateMachine.start(MODE_OFF, 0);
}
if (clearSetOnOffFlag) {
std::memset(adcSet.processed.value, 0, adcSet.processed.getSerializedSize());
clearSetOnOffFlag = false;
}
auto opCode = pwrStateMachine.fsm();
if (opCode == power::OpCodes::TO_OFF_DONE or opCode == power::OpCodes::TIMEOUT_OCCURED) {
pwrStateMachine.reset();

View File

@ -124,6 +124,7 @@ class PayloadPcduHandler : public DeviceHandlerBase {
bool txToMpaInjectionRequested = false;
bool mpaToHpaInjectionRequested = false;
bool allOnInjectRequested = false;
bool clearSetOnOffFlag = true;
PeriodicOperationDivider opDivider = PeriodicOperationDivider(5);
uint8_t tempReadDivisor = 1;