Updated C client to support "switch" argument in SIMU command.

This commit is contained in:
Jason Watkins
2015-05-01 14:55:36 -07:00
parent 1ee3f85b23
commit 0b984c3d49
2 changed files with 37 additions and 22 deletions

View File

@@ -264,9 +264,17 @@ int setCONN(XPCSocket* sock, unsigned short port)
int pauseSim(XPCSocket sock, char pause)
{
// Validte input
if (pause < 0 || pause > 2)
{
printError("pauseSim", "Invalid argument: %i", pause);
return;
}
// Setup command
char buffer[6] = "SIMU";
buffer[5] = pause == 0 ? 0 : 1;
buffer[5] = pause;
// Send command
if (sendUDP(sock, buffer, 6) < 0)
{