mirror of
https://github.com/supleed2/ELEC50003-P1-CW.git
synced 2024-12-22 21:45:49 +00:00
Merge branch 'Integration' of https://github.com/supleed2/EE2Rover into Integration
This commit is contained in:
commit
1961951de0
|
@ -195,6 +195,7 @@ void loop()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lastExecutedCommand = instr->id; // Update tracker of last processed command
|
lastExecutedCommand = instr->id; // Update tracker of last processed command
|
||||||
|
InstrQueue.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -439,10 +440,7 @@ void recvFromCompass()
|
||||||
void emergencyStop()
|
void emergencyStop()
|
||||||
{
|
{
|
||||||
DynamicJsonDocument tdoc(1024);
|
DynamicJsonDocument tdoc(1024);
|
||||||
tdoc["rH"] = heading;
|
tdoc["stp"] = 1;
|
||||||
tdoc["dist"] = -1;
|
|
||||||
tdoc["sp"] = -1;
|
|
||||||
tdoc["cH"] = heading;
|
|
||||||
serializeJson(tdoc, Serial1); // Send stop signals to Drive
|
serializeJson(tdoc, Serial1); // Send stop signals to Drive
|
||||||
sendToEnergy(0); // Send stop signal to Energy
|
sendToEnergy(0); // Send stop signal to Energy
|
||||||
while (InstrQueue.size())
|
while (InstrQueue.size())
|
||||||
|
|
Loading…
Reference in a new issue