Add ability to pause rover for a defined time to reference doc

This commit is contained in:
Aadi Desai 2021-06-13 21:24:38 +01:00
parent 24bd7db3a8
commit b6cbfc7619

View file

@ -5,7 +5,7 @@
#define WebSocket 0
int state, totalTripDistance, currentHeading, current_x, current_y, signal_strength, lastCompletedCommand_id; // Info Control ==> Command
float batteryVoltage, batteryLevel, batteryCycles; // Info Control ==> Command
int command_id, mode, reqHeading, reqDistance, reqCharge; // Info Command ==> Control
int command_id, mode, reqHeading, reqDistance, reqCharge, reqTime; // Info Command ==> Control
float reqSpeed; // Info Command ==> Control
void setup() {}
@ -36,9 +36,11 @@ void loop()
// 0 = Stop immediately, clear command cache
// 1 = Normal movement command, added to end of command cache
// 2 = Normal charge command, results in no motion, added to end of command cache
// 3 = Pause command, wait for defined time in seconds, added to end of command cache
tdoc["rH"] = reqHeading;
tdoc["rD"] = reqDistance;
tdoc["rS"] = reqSpeed;
tdoc["rC"] = reqCharge;
tdoc["pSt"] = reqTime;
serializeJson(tdoc, WebSocket, WebSocket); // Build JSON and send on UART1
}