mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-04 14:07:36 +00:00
Add lockout mode.
This commit is contained in:
parent
944192f246
commit
560433e7ef
9 changed files with 62 additions and 6 deletions
12
Modem.cpp
12
Modem.cpp
|
|
@ -104,7 +104,8 @@ m_dstarSpace(0U),
|
|||
m_dmrSpace1(0U),
|
||||
m_dmrSpace2(0U),
|
||||
m_ysfSpace(0U),
|
||||
m_tx(false)
|
||||
m_tx(false),
|
||||
m_lockout(false)
|
||||
{
|
||||
assert(!port.empty());
|
||||
|
||||
|
|
@ -357,13 +358,15 @@ void CModem::clock(unsigned int ms)
|
|||
if (txOverflow)
|
||||
LogError("MMDVM TX buffer has overflowed");
|
||||
|
||||
m_lockout = (m_buffer[5U] & 0x10U) == 0x10U;
|
||||
|
||||
m_dstarSpace = m_buffer[6U];
|
||||
m_dmrSpace1 = m_buffer[7U];
|
||||
m_dmrSpace2 = m_buffer[8U];
|
||||
m_ysfSpace = m_buffer[9U];
|
||||
|
||||
m_inactivityTimer.start();
|
||||
// LogMessage("status=%02X, tx=%d, space=%u,%u,%u,%u", m_buffer[5U], int(m_tx), m_dstarSpace, m_dmrSpace1, m_dmrSpace2, m_ysfSpace);
|
||||
// LogMessage("status=%02X, tx=%d, space=%u,%u,%u,%u, lockout=%d", m_buffer[5U], int(m_tx), m_dstarSpace, m_dmrSpace1, m_dmrSpace2, m_ysfSpace, int(m_lockout));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -638,6 +641,11 @@ bool CModem::hasYSFSpace() const
|
|||
return space > 1U;
|
||||
}
|
||||
|
||||
bool CModem::hasLockout() const
|
||||
{
|
||||
return m_lockout;
|
||||
}
|
||||
|
||||
bool CModem::writeYSFData(const unsigned char* data, unsigned int length)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue