From 8aa2f00c1b109c2b24c5cfcf0dcc85e210e412c5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 9 Jan 2019 19:47:59 +0000 Subject: [PATCH] Fixes for Windows. --- MMDVMHost.cpp | 14 +++++++------- RemoteControl.cpp | 18 +++++++++--------- RemoteControl.h | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index bcce877..39010f1 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -929,25 +929,25 @@ int CMMDVMHost::run() if (remoteControl != NULL) { REMOTE_COMMAND command = remoteControl->getCommand(); switch(command) { - case RC_MODE_IDLE: + case RCD_MODE_IDLE: setMode(MODE_IDLE); break; - case RC_MODE_LOCKOUT: + case RCD_MODE_LOCKOUT: setMode(MODE_LOCKOUT); break; - case RC_MODE_DSTAR: + case RCD_MODE_DSTAR: setMode(MODE_DSTAR); break; - case RC_MODE_DMR: + case RCD_MODE_DMR: setMode(MODE_DMR); break; - case RC_MODE_YSF: + case RCD_MODE_YSF: setMode(MODE_YSF); break; - case RC_MODE_P25: + case RCD_MODE_P25: setMode(MODE_P25); break; - case RC_MODE_NXDN: + case RCD_MODE_NXDN: setMode(MODE_NXDN); break; default: diff --git a/RemoteControl.cpp b/RemoteControl.cpp index 91eae38..c98d617 100644 --- a/RemoteControl.cpp +++ b/RemoteControl.cpp @@ -42,7 +42,7 @@ bool CRemoteControl::open() REMOTE_COMMAND CRemoteControl::getCommand() { - REMOTE_COMMAND command = RC_NONE; + REMOTE_COMMAND command = RCD_NONE; unsigned char buffer[BUFFER_LENGTH]; in_addr address; @@ -50,21 +50,21 @@ REMOTE_COMMAND CRemoteControl::getCommand() int ret = m_socket.read(buffer, BUFFER_LENGTH, address, port); if (ret > 0) { if (::memcmp(buffer, "mode idle", 9U) == 0) - command = RC_MODE_IDLE; + command = RCD_MODE_IDLE; else if (::memcmp(buffer, "mode lockout", 12U) == 0) - command = RC_MODE_LOCKOUT; + command = RCD_MODE_LOCKOUT; else if (::memcmp(buffer, "mode d-star", 11U) == 0) - command = RC_MODE_DSTAR; + command = RCD_MODE_DSTAR; else if (::memcmp(buffer, "mode dmr", 8U) == 0) - command = RC_MODE_DMR; + command = RCD_MODE_DMR; else if (::memcmp(buffer, "mode ysf", 8U) == 0) - command = RC_MODE_YSF; + command = RCD_MODE_YSF; else if (::memcmp(buffer, "mode p25", 8U) == 0) - command = RC_MODE_P25; + command = RCD_MODE_P25; else if (::memcmp(buffer, "mode nxdn", 9U) == 0) - command = RC_MODE_NXDN; + command = RCD_MODE_NXDN; - if (command == RC_NONE) + if (command == RCD_NONE) LogMessage("Invalid remote command of \"%s\" received"); else LogMessage("Valid remote command of \"%s\" received"); diff --git a/RemoteControl.h b/RemoteControl.h index 5de6ad3..7a40b08 100644 --- a/RemoteControl.h +++ b/RemoteControl.h @@ -22,14 +22,14 @@ #include "UDPSocket.h" enum REMOTE_COMMAND { - RC_NONE, - RC_MODE_IDLE, - RC_MODE_LOCKOUT, - RC_MODE_DSTAR, - RC_MODE_DMR, - RC_MODE_YSF, - RC_MODE_P25, - RC_MODE_NXDN + RCD_NONE, + RCD_MODE_IDLE, + RCD_MODE_LOCKOUT, + RCD_MODE_DSTAR, + RCD_MODE_DMR, + RCD_MODE_YSF, + RCD_MODE_P25, + RCD_MODE_NXDN }; class CRemoteControl {