From b6cbfc7619d9aef35fb6d8fab19b1c815c5fd441 Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Sun, 13 Jun 2021 21:24:38 +0100 Subject: [PATCH] Add ability to pause rover for a defined time to reference doc --- Control/ref/command.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Control/ref/command.cpp b/Control/ref/command.cpp index 3a014df..570c8aa 100644 --- a/Control/ref/command.cpp +++ b/Control/ref/command.cpp @@ -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 }