implemented Wash-Mode

This commit is contained in:
2025-06-15 13:23:28 +02:00
parent c7af5619eb
commit b7ccffc157
8 changed files with 81 additions and 10 deletions

View File

@@ -580,6 +580,14 @@ void Websocket_HandleSettings(uint8_t *data)
{
strncpy(LubeConfig.wifi_client_password, value, sizeof(LubeConfig.wifi_client_password));
}
else if (strcmp(identifier, "washinterval") == 0)
{
LubeConfig.WashMode_Interval = atoi(value);
}
else if (strcmp(identifier, "washdistance") == 0)
{
LubeConfig.WashMode_Distance = atoi(value);
}
else
{
Debug_pushMessage("Got unknown Settings-id and value '%s' from ws-client\n", identifier);
@@ -700,6 +708,8 @@ void Websocket_RefreshClientData_Static(uint32_t client_id, bool send_mapping)
const char mapping[] = "MAPPING_STATIC:"
"lubedistancenormal;"
"lubedistancerain;"
"washdistance;"
"washinterval;"
"tankcap;"
"pumppulse;"
"tankwarn;"
@@ -730,6 +740,8 @@ void Websocket_RefreshClientData_Static(uint32_t client_id, bool send_mapping)
temp.concat(String(LubeConfig.DistancePerLube_Default) + ";");
temp.concat(String(LubeConfig.DistancePerLube_Rain) + ";");
temp.concat(String(LubeConfig.WashMode_Distance) + ";");
temp.concat(String(LubeConfig.WashMode_Interval) + ";");
temp.concat(String(LubeConfig.tankCapacity_ml) + ";");
temp.concat(String(LubeConfig.amountPerDose_microL) + ";");
temp.concat(String(LubeConfig.TankRemindAtPercentage) + ";");