Skip to content

Commit

Permalink
Update NISSAN-LEAF-BATTERY.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabooman committed Feb 1, 2024
1 parent 12b83e7 commit 372ca32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Software/src/battery/NISSAN-LEAF-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,8 @@ void publish_data(void) {
size_t msg_length = snprintf(mqtt_msg, sizeof(mqtt_msg), "{\n\"cell_voltages\":[");

for (size_t i = 0; i < 97; ++i) {
msg_length += snprintf(mqtt_msg + msg_length, sizeof(mqtt_msg) - msg_length, "%s%d", (i == 0) ? "" : ",", 1234);
// msg_length += snprintf(mqtt_msg + msg_length, sizeof(mqtt_msg) - msg_length, "%s%d", (i == 0) ? "" : ", ", cell_voltages[i]);
// msg_length += snprintf(mqtt_msg + msg_length, sizeof(mqtt_msg) - msg_length, "%s%d", (i == 0) ? "" : ",", 1234);
msg_length += snprintf(mqtt_msg + msg_length, sizeof(mqtt_msg) - msg_length, "%s%d", (i == 0) ? "" : ", ", cell_voltages[i]);
}

snprintf(mqtt_msg + msg_length, sizeof(mqtt_msg) - msg_length, "]\n}\n");
Expand Down

0 comments on commit 372ca32

Please sign in to comment.