Initial work on the M17 protocol.

This commit is contained in:
Jonathan Naylor
2020-10-14 16:16:54 +01:00
parent ff19408e2d
commit 8536294b76
20 changed files with 2029 additions and 44 deletions

View File

@@ -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,6 +102,8 @@ 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(0U) == "disable" && m_args.size() >= DISABLE_ARGS) {
@@ -113,6 +117,8 @@ 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(0U) == "page" && m_args.size() >= PAGE_ARGS) {
@@ -144,6 +150,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 +171,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 "";
}