Skip to content

Commit

Permalink
Fix handling of controller CAN (#2049)
Browse files Browse the repository at this point in the history
The key change is that before this commit "CAN received...triggering resend" immediately leads to outbound data "Sending (Command) message (Attempt 2".

After this PR then "CAN received...triggering resend will handle the incoming data "Unsolicited message received while waiting for ACK."
  • Loading branch information
petergebruers authored and Fishwaldo committed Jan 21, 2020
1 parent ef86791 commit 690d6bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/Driver.cpp
Expand Up @@ -1723,7 +1723,8 @@ bool Driver::ReadMsg()
Log::Write(LogLevel_Warning, "m_currentMsg was NULL when trying to set MaxSendAttempts");
Log::QueueDump();
}
WriteMsg("CAN");
// Don't do WriteMsg("CAN"); here, the controller has data waiting to be handled by OZW.
// Instead, let the main loop handle incoming message first to flush the buffer(s)
break;
}

Expand Down

0 comments on commit 690d6bc

Please sign in to comment.