Add colour selection to Command<->Control reference doc

This commit is contained in:
Aadi Desai 2021-06-15 08:55:42 +01:00
parent 531a86c6d0
commit 8353103e1f
2 changed files with 4 additions and 2 deletions

View file

@ -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
}

View file

@ -202,7 +202,7 @@ void loop()
case INSTR_COLOUR:
{
Status = CS_IDLE;
colour = instr->colour;
colour = (Colour_t)instr->colour;
}
break;
default: