From e3c80e1aedb15fd6a19f497374cb4df7d29ab773 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 17 Nov 2016 16:02:53 +0000 Subject: [PATCH] Convert decode to be a bit. --- SerialPort.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/SerialPort.cpp b/SerialPort.cpp index b77de92..7701bbc 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -116,7 +116,7 @@ void CSerialPort::getStatus() // Send all sorts of interesting internal values reply[0U] = MMDVM_FRAME_START; - reply[1U] = 12U; + reply[1U] = 11U; reply[2U] = MMDVM_GET_STATUS; reply[3U] = 0x00U; @@ -131,7 +131,8 @@ void CSerialPort::getStatus() reply[4U] = uint8_t(m_modemState); - reply[5U] = m_tx ? 0x01U : 0x00U; + reply[5U] = m_tx ? 0x01U : 0x00U; + reply[5U] |= m_dcd ? 0x02U : 0x00U; bool adcOverflow; bool dacOverflow; @@ -180,12 +181,7 @@ void CSerialPort::getStatus() else reply[10U] = 0U; - if (m_dcd) - reply[11U] = 1U; - else - reply[11U] = 0U; - - writeInt(1U, reply, 12); + writeInt(1U, reply, 11); } void CSerialPort::getVersion()