go to off mode directly
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-02-17 02:39:00 +01:00
parent 7ff63930d4
commit 29e031f0df
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -43,7 +43,8 @@ void RwHandler::doShutDown() {
}
internalState = InternalState::DEFAULT;
updatePeriodicReply(false, rws::REPLY_ID);
setMode(_MODE_POWER_DOWN);
// The power switch is handled by the assembly, so we can go off here directly.
setMode(MODE_OFF);
}
ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
@ -148,7 +149,7 @@ void RwHandler::fillCommandAndReplyMap() {
ReturnValue_t RwHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
if (getMode() == _MODE_WAIT_OFF) {
if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON) {
return IGNORE_FULL_PACKET;
}
if (remainingSize > 0) {