mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Restore the branch
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2019,2020 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
|
||||
@@ -89,6 +89,8 @@ REMOTE_COMMAND CRemoteControl::getCommand()
|
||||
m_command = RCD_MODE_P25;
|
||||
else if (m_args.at(1U) == "nxdn")
|
||||
m_command = RCD_MODE_NXDN;
|
||||
else if (m_args.at(1U) == "m17")
|
||||
m_command = RCD_MODE_M17;
|
||||
} else if (m_args.at(0U) == "enable" && m_args.size() >= ENABLE_ARGS) {
|
||||
if (m_args.at(1U) == "dstar")
|
||||
m_command = RCD_ENABLE_DSTAR;
|
||||
@@ -100,8 +102,12 @@ REMOTE_COMMAND CRemoteControl::getCommand()
|
||||
m_command = RCD_ENABLE_P25;
|
||||
else if (m_args.at(1U) == "nxdn")
|
||||
m_command = RCD_ENABLE_NXDN;
|
||||
else if (m_args.at(1U) == "m17")
|
||||
m_command = RCD_ENABLE_M17;
|
||||
else if (m_args.at(1U) == "fm")
|
||||
m_command = RCD_ENABLE_FM;
|
||||
else if (m_args.at(1U) == "ax25")
|
||||
m_command = RCD_ENABLE_AX25;
|
||||
} else if (m_args.at(0U) == "disable" && m_args.size() >= DISABLE_ARGS) {
|
||||
if (m_args.at(1U) == "dstar")
|
||||
m_command = RCD_DISABLE_DSTAR;
|
||||
@@ -113,8 +119,12 @@ REMOTE_COMMAND CRemoteControl::getCommand()
|
||||
m_command = RCD_DISABLE_P25;
|
||||
else if (m_args.at(1U) == "nxdn")
|
||||
m_command = RCD_DISABLE_NXDN;
|
||||
else if (m_args.at(1U) == "m17")
|
||||
m_command = RCD_DISABLE_M17;
|
||||
else if (m_args.at(1U) == "fm")
|
||||
m_command = RCD_DISABLE_FM;
|
||||
else if (m_args.at(1U) == "ax25")
|
||||
m_command = RCD_DISABLE_AX25;
|
||||
} else if (m_args.at(0U) == "page" && m_args.size() >= PAGE_ARGS) {
|
||||
// Page command is in the form of "page <ric> <message>"
|
||||
m_command = RCD_PAGE;
|
||||
@@ -144,6 +154,7 @@ unsigned int CRemoteControl::getArgCount() const
|
||||
case RCD_MODE_YSF:
|
||||
case RCD_MODE_P25:
|
||||
case RCD_MODE_NXDN:
|
||||
case RCD_MODE_M17:
|
||||
return m_args.size() - SET_MODE_ARGS;
|
||||
case RCD_PAGE:
|
||||
return m_args.size() - 1U;
|
||||
@@ -164,14 +175,15 @@ std::string CRemoteControl::getArgString(unsigned int n) const
|
||||
case RCD_MODE_YSF:
|
||||
case RCD_MODE_P25:
|
||||
case RCD_MODE_NXDN:
|
||||
case RCD_MODE_M17:
|
||||
n += SET_MODE_ARGS;
|
||||
break;
|
||||
case RCD_PAGE:
|
||||
n += 1U;
|
||||
break;
|
||||
case RCD_CW:
|
||||
n += 1U;
|
||||
break;
|
||||
n += 1U;
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user