This commit is contained in:
@ -29,6 +29,7 @@ void MgmLis3CustomHandler::doStartUp() {
|
||||
|
||||
void MgmLis3CustomHandler::doShutDown() {
|
||||
if (internalState != InternalState::SHUTDOWN) {
|
||||
dataset.setValidity(false, true);
|
||||
internalState = InternalState::SHUTDOWN;
|
||||
commandExecuted = false;
|
||||
}
|
||||
@ -67,12 +68,15 @@ ReturnValue_t MgmLis3CustomHandler::scanForReply(const uint8_t *start, size_t le
|
||||
if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON) {
|
||||
return IGNORE_FULL_PACKET;
|
||||
}
|
||||
if (len != sizeof(acs::MgmRm3100Reply)) {
|
||||
if (len != sizeof(acs::MgmLis3Reply)) {
|
||||
*foundLen = len;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
*foundId = REPLY;
|
||||
*foundLen = len;
|
||||
if (internalState == InternalState::SHUTDOWN) {
|
||||
commandExecuted = true;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
ReturnValue_t MgmLis3CustomHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
|
Reference in New Issue
Block a user