Skip to content

Commit 4434703

Browse files
Copilotdorkmo
andcommitted
Remove MAX_TANKS constant - validation handled by client
Co-authored-by: dorkmo <[email protected]>
1 parent 0482dba commit 4434703

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@
104104
#define MAX_TANK_RECORDS 32
105105
#endif
106106

107-
#ifndef MAX_TANKS
108-
#define MAX_TANKS 8 // Maximum tanks per client device (must match client configuration)
109-
#endif
110-
111107
#ifndef MAX_EMAIL_BUFFER
112108
#define MAX_EMAIL_BUFFER 2048
113109
#endif
@@ -7798,10 +7794,7 @@ static void handleRelayClearPost(EthernetClient &client, const String &body) {
77987794
}
77997795

78007796
uint8_t tankIdx = doc["tankIdx"].as<uint8_t>();
7801-
if (tankIdx >= MAX_TANKS) {
7802-
respondStatus(client, 400, F("Invalid tankIdx"));
7803-
return;
7804-
}
7797+
// Note: tankIdx validation is handled by the client device based on its actual tank configuration
78057798

78067799
if (sendRelayClearCommand(clientUid, tankIdx)) {
78077800
respondStatus(client, 200, F("OK"));

0 commit comments

Comments
 (0)