Page alert commands

This commit is contained in:
Max Lapan
2022-11-26 11:04:01 +01:00
parent 8f5ff4ca05
commit 55ba1233a8
5 changed files with 76 additions and 1 deletions

View File

@@ -140,6 +140,12 @@ REMOTE_COMMAND CRemoteControl::getCommand()
} else if (m_args.at(0U) == "page_bcd" && m_args.size() >= PAGE_ARGS) {
// BCD page command is in the form of "page_bcd <ric> <bcd message>"
m_command = RCD_PAGE_BCD;
} else if (m_args.at(0U) == "page_a1" && m_args.size() == 2) {
// Alert1 page command is in the form of "page_a1 <ric>"
m_command = RCD_PAGE_A1;
} else if (m_args.at(0U) == "page_a2" && m_args.size() >= PAGE_ARGS) {
// Alert2 page command is in the form of "page_a2 <ric> <message>"
m_command = RCD_PAGE_A2;
} else if (m_args.at(0U) == "cw" && m_args.size() >= CW_ARGS) {
// CW command is in the form of "cw <message>"
m_command = RCD_CW;
@@ -196,6 +202,8 @@ unsigned int CRemoteControl::getArgCount() const
return m_args.size() - SET_MODE_ARGS;
case RCD_PAGE:
case RCD_PAGE_BCD:
case RCD_PAGE_A1:
case RCD_PAGE_A2:
return m_args.size() - 1U;
case RCD_CW:
return m_args.size() - 1U;
@@ -219,6 +227,8 @@ std::string CRemoteControl::getArgString(unsigned int n) const
break;
case RCD_PAGE:
case RCD_PAGE_BCD:
case RCD_PAGE_A1:
case RCD_PAGE_A2:
n += 1U;
break;
case RCD_CW: