Allow for a delay before processing a DMR slot.

This commit is contained in:
Jonathan Naylor 2016-03-17 19:31:12 +00:00
parent c7ea8a68c6
commit da34f26c55
5 changed files with 37 additions and 13 deletions

View file

@ -176,7 +176,7 @@ void CSerialPort::getVersion()
uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
{
if (length < 7U)
if (length < 8U)
return 4U;
bool rxInvert = (data[0U] & 0x01U) == 0x01U;
@ -209,6 +209,8 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
if (colorCode > 15U)
return 4U;
uint8_t dmrDelay = data[7U];
m_modemState = modemState;
m_dstarEnable = dstarEnable;
@ -220,6 +222,7 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
dmrTX.setColorCode(colorCode);
dmrRX.setColorCode(colorCode);
dmrRX.setDelay(dmrDelay);
dmrIdleRX.setColorCode(colorCode);
io.setParameters(rxInvert, txInvert, pttInvert, rxLevel, txLevel);