Skip to content

Commit 6b4a8ec

Browse files
Copilotdorkmo
andcommitted
Address code review feedback: remove unnecessary cast, add documentation and warnings
Co-authored-by: dorkmo <[email protected]>
1 parent 13f8788 commit 6b4a8ec

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

TankAlarm-112025-Client-BluesOpta/TankAlarm-112025-Client-BluesOpta.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ static float readNotecardVinVoltage() {
18801880
return -1.0f;
18811881
}
18821882

1883-
float voltage = (float)JGetNumber(rsp, "value");
1883+
float voltage = JGetNumber(rsp, "value");
18841884
notecard.deleteResponse(rsp);
18851885

18861886
if (voltage > 0.0f) {

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,9 @@ static const char DASHBOARD_HTML[] PROGMEM = R"HTML(
12031203
return `${hours} h`;
12041204
}
12051205
1206+
// Flatten client/tank hierarchy into rows for display.
1207+
// VIN voltage is a per-client value (from Blues Notecard), so it's only
1208+
// shown on the first tank row for each client to avoid redundancy.
12061209
function flattenTanks(clients) {
12071210
const rows = [];
12081211
clients.forEach(client => {
@@ -3678,6 +3681,12 @@ static ClientMetadata *findOrCreateClientMetadata(const char *clientUid) {
36783681
return meta;
36793682
}
36803683

3684+
// Maximum client metadata capacity reached
3685+
Serial.print(F("Warning: Cannot create client metadata for "));
3686+
Serial.print(clientUid);
3687+
Serial.print(F(" - max capacity ("));
3688+
Serial.print(MAX_CLIENT_METADATA);
3689+
Serial.println(F(") reached"));
36813690
return nullptr;
36823691
}
36833692

0 commit comments

Comments
 (0)