Skip to content

Commit

Permalink
implement DMR_CLEAR1, DMR_CLEAR2, NXDN_CLEAR;
Browse files Browse the repository at this point in the history
  • Loading branch information
gatekeep committed Jun 22, 2023
1 parent 42f4ea0 commit f1a60d4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions SerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,28 @@ void SerialPort::process()
#endif
break;

case CMD_DMR_CLEAR1:
#if defined(DUPLEX)
if (m_dmrEnable) {
if (m_modemState == STATE_IDLE || m_modemState == STATE_P25)
dmrTX.resetFifo1();
}
#else
sendNAK(RSN_INVALID_REQUEST);
#endif
break;
case CMD_DMR_CLEAR2:
#if defined(DUPLEX)
if (m_dmrEnable) {
if (m_modemState == STATE_IDLE || m_modemState == STATE_P25)
dmrTX.resetFifo2();
}
#else
sendNAK(RSN_INVALID_REQUEST);
#endif
break;


/** Project 25 */
case CMD_P25_DATA:
if (m_p25Enable) {
Expand Down Expand Up @@ -356,6 +378,12 @@ void SerialPort::process()
sendNAK(err);
}
break;
case CMD_NXDN_CLEAR:
if (m_nxdnEnable) {
if (m_modemState == STATE_IDLE || m_modemState == STATE_P25)
nxdnTX.clear();
}
break;

default:
// Handle this, send a NAK back
Expand Down
3 changes: 3 additions & 0 deletions SerialPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,16 @@ enum DVM_COMMANDS {
CMD_DMR_START = 0x1DU,
CMD_DMR_ABORT = 0x1EU,
CMD_DMR_CACH_AT_CTRL = 0x1FU,
CMD_DMR_CLEAR1 = 0x20U,
CMD_DMR_CLEAR2 = 0x21U,

CMD_P25_DATA = 0x31U,
CMD_P25_LOST = 0x32U,
CMD_P25_CLEAR = 0x33U,

CMD_NXDN_DATA = 0x41U,
CMD_NXDN_LOST = 0x42U,
CMD_NXDN_CLEAR = 0x43U,

CMD_ACK = 0x70U,
CMD_NAK = 0x7FU,
Expand Down

0 comments on commit f1a60d4

Please sign in to comment.