mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-05 14:37:02 +00:00
Perform FM mode changing in a more conventional manner.
This commit is contained in:
parent
89458a2c93
commit
4a5a260c28
4 changed files with 39 additions and 25 deletions
|
|
@ -70,6 +70,7 @@ const uint8_t MMDVM_FM_PARAMS2 = 0x61U;
|
|||
const uint8_t MMDVM_FM_PARAMS3 = 0x62U;
|
||||
const uint8_t MMDVM_FM_PARAMS4 = 0x63U;
|
||||
const uint8_t MMDVM_FM_DATA = 0x65U;
|
||||
const uint8_t MMDVM_FM_STATUS = 0x66U;
|
||||
|
||||
const uint8_t MMDVM_ACK = 0x70U;
|
||||
const uint8_t MMDVM_NAK = 0x7FU;
|
||||
|
|
@ -1261,6 +1262,23 @@ void CSerialPort::writeFMData(const uint8_t* data, uint8_t length)
|
|||
writeInt(1U, reply, count);
|
||||
}
|
||||
|
||||
void CSerialPort::writeFMStatus()
|
||||
{
|
||||
if (m_modemState != STATE_FM && m_modemState != STATE_IDLE)
|
||||
return;
|
||||
|
||||
if (!m_fmEnable)
|
||||
return;
|
||||
|
||||
uint8_t reply[10U];
|
||||
|
||||
reply[0U] = MMDVM_FRAME_START;
|
||||
reply[1U] = 3U;
|
||||
reply[2U] = MMDVM_FM_STATUS;
|
||||
|
||||
writeInt(1U, reply, 3);
|
||||
}
|
||||
|
||||
void CSerialPort::writeCalData(const uint8_t* data, uint8_t length)
|
||||
{
|
||||
if (m_modemState != STATE_DSTARCAL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue