reset relevant datasets on shutdown

This commit is contained in:
Marius Eggert 2023-03-15 10:36:25 +01:00
parent 3eb5fc7f47
commit 7d9be35cb4

View File

@ -24,7 +24,6 @@ RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCooki
sif::error << "RwHandler: Invalid gpio communication interface" << std::endl;
}
}
RwHandler::~RwHandler() {}
void RwHandler::doStartUp() {
@ -43,6 +42,17 @@ void RwHandler::doShutDown() {
}
internalState = InternalState::DEFAULT;
updatePeriodicReply(false, rws::REPLY_ID);
{
PoolReadGuard pg(&statusSet);
statusSet.currSpeed = 0.0;
statusSet.referenceSpeed = 0.0;
statusSet.state = 0;
statusSet.setValidity(false, true);
}
{
PoolReadGuard pg(&tmDataset);
tmDataset.setValidity(false, true);
}
// The power switch is handled by the assembly, so we can go off here directly.
setMode(MODE_OFF);
}