From f11d869a4ad4739afcec39f95eece7338236285d Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Thu, 17 Jun 2021 10:56:44 +0100 Subject: [PATCH] Minor fixes, outside of project --- Control/src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Control/src/main.cpp b/Control/src/main.cpp index a799f4f..289b9bd 100644 --- a/Control/src/main.cpp +++ b/Control/src/main.cpp @@ -1,7 +1,6 @@ #pragma region Includes #include #include -#include // Software Serial not currently needed #include #include #include @@ -173,7 +172,8 @@ void loop() ypos = 0; DynamicJsonDocument tdoc(128); tdoc["rstD"] = 1; - serializeJson(tdoc, Serial1); // Send reset odometer signal to Drive + serializeJson(tdoc, Serial1); // Send reset odometer signal to Drive + lastCompletedCommand = instr->id; // Set LCCid on telemetry reset as Rover state is not changed } break; case INSTR_STOP: // Emergency stop @@ -504,6 +504,7 @@ void updateRSSI() void emergencyStop() { + lastCompletedCommand = 0; DynamicJsonDocument tdoc(1024); tdoc["stp"] = 1; serializeJson(tdoc, Serial1); // Send stop signals to Drive @@ -514,4 +515,4 @@ void emergencyStop() } Status = CS_IDLE; // Reset rover to idle state Serial.println("Instruction Queue cleared"); -} \ No newline at end of file +}