Add battery cycle tracking to Command<->Control reference doc

This commit is contained in:
Aadi Desai 2021-06-13 17:59:21 +01:00
parent 0483397ae6
commit f3ca90fb2e

View file

@ -15,8 +15,9 @@ void loop()
DynamicJsonDocument rdoc(1024); // receive doc, not sure how big this needs to be
deserializeJson(rdoc, WebSocket); // Take JSON input from WebSocket
state = rdoc["st"]; // State: -1 = Error, 0 = Idle, 1 = Moving, 2 = Charging
batteryVoltage = rdoc["bV"];
batteryLevel = rdoc["bL"];
batteryVoltage = rdoc["bV"];
batteryLevel = rdoc["bL"];
batteryCycles = rdoc["bC"];
totalTripDistance = rdoc["tD"];
currentHeading = rdoc["cH"];
current_x = rdoc["pos"][0];