Fixes for Windows.
This commit is contained in:
parent
c0658deafa
commit
8aa2f00c1b
|
@ -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:
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue