firmware: expose temp lookup outside disabled UART block

This commit is contained in:
2026-06-08 09:07:38 -06:00
parent 954bef4291
commit 730da5482f
2 changed files with 12 additions and 12 deletions
@@ -946,6 +946,16 @@ setInterval(load,3000);
WebServer server(80);
#define API_V1(path) "/api/v1" path
int findTempConfigIndexById(const String& id) {
for (int i = 0; i < MAX_TEMP_SENSORS; i++) {
if (appConfig.tempSensors[i].id == id) {
return i;
}
}
return -1;
}
#if DASHBOARD_UART_ENABLED
HardwareSerial DashboardSerial(2);
String uartLineBuffer;
@@ -2025,16 +2035,6 @@ int findRelayConfigIndexForUart(const String& id) {
return -1;
}
int findTempConfigIndexById(const String& id) {
for (int i = 0; i < MAX_TEMP_SENSORS; i++) {
if (appConfig.tempSensors[i].id == id) {
return i;
}
}
return -1;
}
void handleUartMessage(const String& line) {
DynamicJsonDocument doc(1024);
DeserializationError error = deserializeJson(doc, line);