Skip to content

Commit 9ec1b81

Browse files
Copilotdorkmo
andcommitted
Fix compilation error: use gTankRecordCount and gTankRecords instead of gTankCount and gTanks
Co-authored-by: dorkmo <[email protected]>
1 parent 49f4d29 commit 9ec1b81

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9603,25 +9603,25 @@ static void handleContactsGet(EthernetClient &client) {
96039603
// Build list of unique sites from tank records
96049604
// Use simple linear scan - with typical fleet sizes (< 100 tanks), performance is adequate
96059605
JsonArray sitesArray = doc.createNestedArray("sites");
9606-
for (uint8_t i = 0; i < gTankCount; ++i) {
9607-
if (strlen(gTanks[i].site) == 0) continue;
9606+
for (uint8_t i = 0; i < gTankRecordCount; ++i) {
9607+
if (strlen(gTankRecords[i].site) == 0) continue;
96089608

96099609
bool alreadySeen = false;
96109610
for (uint8_t j = 0; j < i; ++j) {
9611-
if (strcmp(gTanks[i].site, gTanks[j].site) == 0) {
9611+
if (strcmp(gTankRecords[i].site, gTankRecords[j].site) == 0) {
96129612
alreadySeen = true;
96139613
break;
96149614
}
96159615
}
96169616
if (!alreadySeen) {
9617-
sitesArray.add(gTanks[i].site);
9617+
sitesArray.add(gTankRecords[i].site);
96189618
}
96199619
}
96209620

96219621
// Build list of alarms (tanks with alarm configurations)
96229622
JsonArray alarmsArray = doc.createNestedArray("alarms");
9623-
for (uint8_t i = 0; i < gTankCount; ++i) {
9624-
TankRecord &tank = gTanks[i];
9623+
for (uint8_t i = 0; i < gTankRecordCount; ++i) {
9624+
TankRecord &tank = gTankRecords[i];
96259625
if (strlen(tank.alarmType) > 0) {
96269626
JsonObject alarmObj = alarmsArray.createNestedObject();
96279627
char alarmId[64];

0 commit comments

Comments
 (0)