diff --git a/Control/ref/command.cpp b/Control/ref/command.cpp index 0a65d23..e4ff859 100644 --- a/Control/ref/command.cpp +++ b/Control/ref/command.cpp @@ -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];