Add more intelligence to the remote control.
This commit is contained in:
parent
455755328a
commit
76badb28f1
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2015-2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -136,6 +136,9 @@ bool CDMRNetwork::open()
|
|||
|
||||
void CDMRNetwork::enable(bool enabled)
|
||||
{
|
||||
if (!enabled && m_enabled)
|
||||
m_rxData.clear();
|
||||
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -320,6 +320,8 @@ void CDStarNetwork::enable(bool enabled)
|
|||
{
|
||||
if (enabled && !m_enabled)
|
||||
reset();
|
||||
else if (!enabled && m_enabled)
|
||||
m_buffer.clear();
|
||||
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
|
|
@ -1684,31 +1684,31 @@ void CMMDVMHost::remoteControl()
|
|||
REMOTE_COMMAND command = m_remoteControl->getCommand();
|
||||
switch(command) {
|
||||
case RCD_MODE_IDLE:
|
||||
if (!isBusy())
|
||||
if (m_mode != MODE_IDLE)
|
||||
setMode(MODE_IDLE);
|
||||
break;
|
||||
case RCD_MODE_LOCKOUT:
|
||||
if (!isBusy())
|
||||
if (m_mode != MODE_LOCKOUT)
|
||||
setMode(MODE_LOCKOUT);
|
||||
break;
|
||||
case RCD_MODE_DSTAR:
|
||||
if (!isBusy())
|
||||
if (m_dstar != NULL && m_mode != MODE_DSTAR)
|
||||
setMode(MODE_DSTAR);
|
||||
break;
|
||||
case RCD_MODE_DMR:
|
||||
if (!isBusy())
|
||||
if (m_dmr != NULL && m_mode != MODE_DMR)
|
||||
setMode(MODE_DMR);
|
||||
break;
|
||||
case RCD_MODE_YSF:
|
||||
if (!isBusy())
|
||||
if (m_ysf != NULL && m_mode != MODE_YSF)
|
||||
setMode(MODE_YSF);
|
||||
break;
|
||||
case RCD_MODE_P25:
|
||||
if (!isBusy())
|
||||
if (m_p25 != NULL && m_mode != MODE_P25)
|
||||
setMode(MODE_P25);
|
||||
break;
|
||||
case RCD_MODE_NXDN:
|
||||
if (!isBusy())
|
||||
if (m_nxdn != NULL && m_mode != MODE_NXDN)
|
||||
setMode(MODE_NXDN);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2014,2016,2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2014,2016,2018,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -162,6 +162,8 @@ void CNXDNNetwork::enable(bool enabled)
|
|||
{
|
||||
if (enabled && !m_enabled)
|
||||
reset();
|
||||
else if (!enabled && m_enabled)
|
||||
m_buffer.clear();
|
||||
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -431,5 +431,8 @@ void CP25Network::close()
|
|||
|
||||
void CP25Network::enable(bool enabled)
|
||||
{
|
||||
if (!enabled && m_enabled)
|
||||
m_buffer.clear();
|
||||
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2018,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -113,6 +113,8 @@ void CPOCSAGNetwork::enable(bool enabled)
|
|||
{
|
||||
if (enabled && !m_enabled)
|
||||
reset();
|
||||
else if (!enabled && m_enabled)
|
||||
m_buffer.clear();
|
||||
|
||||
unsigned char c = enabled ? 0x00U : 0xFFU;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -196,6 +196,8 @@ void CYSFNetwork::enable(bool enabled)
|
|||
{
|
||||
if (enabled && !m_enabled)
|
||||
reset();
|
||||
else if (!enabled && m_enabled)
|
||||
m_buffer.clear();
|
||||
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue