Add carrier detect LED to MMDVM firmware

This commit is contained in:
phl0 2016-11-17 11:29:43 +01:00
parent d3eb7dbd4c
commit e3f35e0875
No known key found for this signature in database
GPG Key ID: 48EA1E640798CA9A
3 changed files with 14 additions and 2 deletions

5
IO.cpp
View File

@ -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;

2
IO.h
View File

@ -51,6 +51,8 @@ public:
bool hasLockout() const;
bool getDecode();
void resetWatchdog();
private:

View File

@ -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()