From f3ca90fb2e4cf2575b8281b0896d156df31ffa8f Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Sun, 13 Jun 2021 17:59:21 +0100 Subject: [PATCH] Add battery cycle tracking to Command<->Control reference doc --- Control/ref/command.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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];