diff --git a/RemoteControl.cpp b/RemoteControl.cpp index afa1473..2aca7ff 100644 --- a/RemoteControl.cpp +++ b/RemoteControl.cpp @@ -26,6 +26,7 @@ const unsigned int SET_MODE_ARGS = 2U; const unsigned int PAGE_ARGS = 3U; +const unsigned int CW_ARGS = 2U; const unsigned int BUFFER_LENGTH = 100U; @@ -89,7 +90,10 @@ REMOTE_COMMAND CRemoteControl::getCommand() } else if (m_args.at(0U) == "page" && m_args.size() >= PAGE_ARGS) { // Page command is in the form of "page " m_command = RCD_PAGE; - } + } else if (m_args.at(0U) == "cw" && m_args.size() >= CW_ARGS) { + // CW command is in the form of "cw " + m_command = RCD_CW; + } if (m_command == RCD_NONE) { m_args.clear(); @@ -115,6 +119,8 @@ unsigned int CRemoteControl::getArgCount() const return m_args.size() - SET_MODE_ARGS; case RCD_PAGE: return m_args.size() - 1U; + case RCD_CW: + return m_args.size() - 1U; default: return 0U; } @@ -135,6 +141,9 @@ std::string CRemoteControl::getArgString(unsigned int n) const case RCD_PAGE: n += 1U; break; + case RCD_CW: + n += 1U; + break; default: return ""; }