wrong function call fixed

This commit is contained in:
Robin Müller 2020-04-19 15:16:44 +02:00
parent eacedf7ed6
commit 520ed881bb

View File

@ -55,7 +55,7 @@ DeviceHandlerBase::~DeviceHandlerBase() {
ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) { ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
this->pstStep = counter; this->pstStep = counter;
if (counter == 0) { if (getComAction() == SEND_WRITE) {
cookieInfo.state = COOKIE_UNUSED; cookieInfo.state = COOKIE_UNUSED;
readCommandQueue(); readCommandQueue();
doStateMachine(); doStateMachine();
@ -67,7 +67,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
if (mode == MODE_OFF) { if (mode == MODE_OFF) {
return RETURN_OK; return RETURN_OK;
} }
switch (getCommandQueue()) { switch (getComAction()) {
case SEND_WRITE: case SEND_WRITE:
if ((cookieInfo.state == COOKIE_UNUSED)) { if ((cookieInfo.state == COOKIE_UNUSED)) {
buildInternalCommand(); buildInternalCommand();