diff --git a/IO.cpp b/IO.cpp index 282a7de..b7721a2 100644 --- a/IO.cpp +++ b/IO.cpp @@ -312,6 +312,11 @@ void CIO::setDecode(bool dcd) m_dcd = dcd; } +bool CIO::getDecode() +{ + return m_dcd; +} + void CIO::setADCDetection(bool detect) { m_detect = detect; diff --git a/IO.h b/IO.h index 2113358..39f2364 100644 --- a/IO.h +++ b/IO.h @@ -51,6 +51,8 @@ public: bool hasLockout() const; + bool getDecode(); + void resetWatchdog(); private: diff --git a/SerialPort.cpp b/SerialPort.cpp index b623332..0f02897 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] = 11U; + reply[1U] = 12U; reply[2U] = MMDVM_GET_STATUS; reply[3U] = 0x00U; @@ -180,7 +180,12 @@ void CSerialPort::getStatus() else reply[10U] = 0U; - writeInt(1U, reply, 11); + if (io.getDecode()) + reply[11U] = 1U; + else + reply[11U] = 0U; + + writeInt(1U, reply, 12); } void CSerialPort::getVersion()