mirror of
https://github.com/supleed2/ELEC50003-P1-CW.git
synced 2024-12-22 13:35:49 +00:00
Add colour selection to Command<->Control reference doc
This commit is contained in:
parent
531a86c6d0
commit
8353103e1f
|
@ -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, reqTime; // Info Command ==> Control
|
||||
int command_id, mode, reqHeading, reqDistance, reqCharge, reqTime, reqColour; // Info Command ==> Control
|
||||
float reqSpeed; // Info Command ==> Control
|
||||
|
||||
void setup() {}
|
||||
|
@ -37,10 +37,12 @@ void loop()
|
|||
// 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
|
||||
// 4 = Change colour tracking using Vision
|
||||
tdoc["rH"] = reqHeading;
|
||||
tdoc["rD"] = reqDistance;
|
||||
tdoc["rS"] = reqSpeed;
|
||||
tdoc["rC"] = reqCharge;
|
||||
tdoc["pSt"] = reqTime;
|
||||
tdoc["col"] = reqColour;
|
||||
serializeJson(tdoc, WebSocket, WebSocket); // Build JSON and send on UART1
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ void loop()
|
|||
case INSTR_COLOUR:
|
||||
{
|
||||
Status = CS_IDLE;
|
||||
colour = instr->colour;
|
||||
colour = (Colour_t)instr->colour;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue