firmware: expose temp lookup outside disabled UART block
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user