Skip to content

Commit

Permalink
fix issue with double length frames not being correct;
Browse files Browse the repository at this point in the history
  • Loading branch information
gatekeep committed Jul 31, 2024
1 parent 13e51c6 commit 40f9083
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@ void SerialPort::process()
// The full packet has been received, process it
if (m_ptr == m_len) {
uint8_t err = 2U;
uint8_t offset = 2U;
if (m_dblFrame)
offset = 3U;

switch (m_buffer[2U]) {
// DEBUG4("m_buffer [b0 - b2]", m_buffer[0], m_buffer[1], m_buffer[2]);
// DEBUG4("m_buffer [b3 - b5]", m_buffer[3], m_buffer[4], m_buffer[5]);

switch (m_buffer[offset]) {
case CMD_GET_STATUS:
getStatus();
break;
Expand Down

0 comments on commit 40f9083

Please sign in to comment.