This commit is contained in:
@ -28,7 +28,7 @@ void GyrL3gCustomHandler::doStartUp() {
|
||||
} else {
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
internalState == InternalState::NONE;
|
||||
internalState = InternalState::NONE;
|
||||
commandExecuted = false;
|
||||
}
|
||||
}
|
||||
@ -37,6 +37,7 @@ void GyrL3gCustomHandler::doStartUp() {
|
||||
void GyrL3gCustomHandler::doShutDown() {
|
||||
if (internalState != InternalState::SHUTDOWN) {
|
||||
internalState = InternalState::SHUTDOWN;
|
||||
dataset.setValidity(false, true);
|
||||
commandExecuted = false;
|
||||
}
|
||||
if (internalState == InternalState::SHUTDOWN and commandExecuted) {
|
||||
@ -108,6 +109,9 @@ ReturnValue_t GyrL3gCustomHandler::scanForReply(const uint8_t *start, size_t len
|
||||
}
|
||||
*foundId = l3gd20h::REPLY;
|
||||
*foundLen = len;
|
||||
if (internalState == InternalState::SHUTDOWN) {
|
||||
commandExecuted = true;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user