Detect DAC overflows.

This commit is contained in:
Jonathan Naylor 2016-06-09 19:50:34 +01:00
parent 961d1000f5
commit 0d07dd78eb
3 changed files with 29 additions and 19 deletions

View file

@ -123,7 +123,11 @@ void CSerialPort::getStatus()
reply[5U] = m_tx ? 0x01U : 0x00U;
if (io.hasADCOverflow())
bool adcOverflow;
bool dacOverflow;
io.getOverflow(adcOverflow, dacOverflow);
if (adcOverflow)
reply[5U] |= 0x02U;
if (io.hasRXOverflow())
@ -135,6 +139,9 @@ void CSerialPort::getStatus()
if (io.hasLockout())
reply[5U] |= 0x10U;
if (dacOverflow)
reply[5U] |= 0x20U;
if (m_dstarEnable)
reply[6U] = dstarTX.getSpace();
else