new member to store last step

This commit is contained in:
Robin Müller 2020-09-03 00:22:16 +02:00
parent 822a908353
commit dbb394f761
2 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,8 @@ DeviceHandlerBase::~DeviceHandlerBase() {
ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
this->pstStep = counter;
this->lastStep = this->pstStep;
if (getComAction() == CommunicationAction::NOTHING) {
return HasReturnvaluesIF::RETURN_OK;
}
@ -86,10 +88,13 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
hkSwitcher.performOperation();
hkManager.performHkOperation();
performOperationHook();
return RETURN_OK;
}
if (mode == MODE_OFF) {
return RETURN_OK;
}
switch (getComAction()) {
case CommunicationAction::SEND_WRITE:
if (cookieInfo.state == COOKIE_UNUSED) {

View File

@ -555,6 +555,7 @@ protected:
/** This is the counter value from performOperation(). */
uint8_t pstStep = 0;
uint8_t lastStep = 0;
uint32_t pstIntervalMs = 0;
/**