mirror of
https://github.com/supleed2/ELEC50003-P1-CW.git
synced 2024-12-22 21:45:49 +00:00
Minor fixes, outside of project
This commit is contained in:
parent
046f28a3c2
commit
f11d869a4a
|
@ -1,7 +1,6 @@
|
||||||
#pragma region Includes
|
#pragma region Includes
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <SoftwareSerial.h> // Software Serial not currently needed
|
|
||||||
#include <SoftwareSerial.h>
|
#include <SoftwareSerial.h>
|
||||||
#include <AsyncTCP.h>
|
#include <AsyncTCP.h>
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
|
@ -173,7 +172,8 @@ void loop()
|
||||||
ypos = 0;
|
ypos = 0;
|
||||||
DynamicJsonDocument tdoc(128);
|
DynamicJsonDocument tdoc(128);
|
||||||
tdoc["rstD"] = 1;
|
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;
|
break;
|
||||||
case INSTR_STOP: // Emergency stop
|
case INSTR_STOP: // Emergency stop
|
||||||
|
@ -504,6 +504,7 @@ void updateRSSI()
|
||||||
|
|
||||||
void emergencyStop()
|
void emergencyStop()
|
||||||
{
|
{
|
||||||
|
lastCompletedCommand = 0;
|
||||||
DynamicJsonDocument tdoc(1024);
|
DynamicJsonDocument tdoc(1024);
|
||||||
tdoc["stp"] = 1;
|
tdoc["stp"] = 1;
|
||||||
serializeJson(tdoc, Serial1); // Send stop signals to Drive
|
serializeJson(tdoc, Serial1); // Send stop signals to Drive
|
||||||
|
|
Loading…
Reference in a new issue