mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2025-12-06 05:32:00 +01:00
More tweaks for lockout operation.
This commit is contained in:
parent
05e720a635
commit
ae40ad3089
|
|
@ -20,10 +20,10 @@
|
|||
#define Defines_H
|
||||
|
||||
const unsigned char MODE_IDLE = 0U;
|
||||
const unsigned char MODE_LOCKOUT = 1U;
|
||||
const unsigned char MODE_DSTAR = 2U;
|
||||
const unsigned char MODE_DMR = 3U;
|
||||
const unsigned char MODE_YSF = 4U;
|
||||
const unsigned char MODE_DSTAR = 1U;
|
||||
const unsigned char MODE_DMR = 2U;
|
||||
const unsigned char MODE_YSF = 3U;
|
||||
const unsigned char MODE_LOCKOUT = 99U;
|
||||
|
||||
const unsigned char TAG_HEADER = 0x00U;
|
||||
const unsigned char TAG_DATA = 0x01U;
|
||||
|
|
|
|||
|
|
@ -186,6 +186,12 @@ int CMMDVMHost::run()
|
|||
setMode(MODE_IDLE);
|
||||
|
||||
while (!m_killed) {
|
||||
bool lockout = m_modem->hasLockout();
|
||||
if (lockout && m_mode != MODE_LOCKOUT)
|
||||
setMode(MODE_LOCKOUT);
|
||||
else if (!lockout && m_mode == MODE_LOCKOUT)
|
||||
setMode(MODE_IDLE);
|
||||
|
||||
unsigned char data[200U];
|
||||
unsigned int len;
|
||||
bool ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue