mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Update mqtt.cpp
This commit is contained in:
parent
fe0502e66f
commit
7702774af6
1 changed files with 2 additions and 1 deletions
|
@ -83,9 +83,10 @@ static void publish_cell_voltages(void) {
|
|||
// is the string content
|
||||
|
||||
// If cell voltages haven't been populated...
|
||||
if (nof_cellvoltages == 0u)
|
||||
if (nof_cellvoltages == 0u) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
size_t msg_length = snprintf(mqtt_msg, sizeof(mqtt_msg), "{\n\"cell_voltages\":[");
|
||||
for (size_t i = 0; i < nof_cellvoltages; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue