Errors fixed.

This commit is contained in:
2021-09-14 13:16:26 +02:00
parent 2ce14d84f0
commit 8c80e9f7c0
4 changed files with 39 additions and 27 deletions

View File

@ -67,6 +67,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
this->pstStep = counter;
if (getComAction() == SEND_WRITE) {
sif::debug<<" DH_base: performOp1"<<std::endl;
cookieInfo.state = COOKIE_UNUSED;
readCommandQueue();
doStateMachine();
@ -82,17 +83,22 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
switch (getComAction()) {
case SEND_WRITE:
if ((cookieInfo.state == COOKIE_UNUSED)) {
sif::debug<<" DH_base: performOp2"<<std::endl;
buildInternalCommand();
}
sif::debug<<" DH_base: performOp3"<<std::endl;
doSendWrite();
break;
case GET_WRITE:
sif::debug<<" DH_base: performOp4"<<std::endl;
doGetWrite();
break;
case SEND_READ:
sif::debug<<" DH_base: performOp5"<<std::endl;
doSendRead();
break;
case GET_READ:
sif::debug<<" DH_base: performOp6"<<std::endl;
doGetRead();
cookieInfo.state = COOKIE_UNUSED;
break;
@ -663,10 +669,10 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
handleReply(receivedData, foundId, foundLen);
break;
case APERIODIC_REPLY: {
sif::debug<<" DH: debug1"<<std::endl;
sif::debug<<" DH_base: debug1"<<std::endl;
result = interpretDeviceReply(foundId, receivedData);
if (result != RETURN_OK) {
sif::debug<<" DH: debug2"<<std::endl;
sif::debug<<" DH_base: debug2"<<std::endl;
replyRawReplyIfnotWiretapped(receivedData, foundLen);
triggerEvent(DEVICE_INTERPRETING_REPLY_FAILED, result,
foundId);
@ -686,7 +692,9 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
receivedData += foundLen;
if (remainingLength > foundLen) {
remainingLength -= foundLen;
sif::debug<<" DH_base: debug3"<<std::endl;
} else {
sif::debug<<" DH_base: debug4"<<std::endl;
return;
}
}