added remaining settings to websocket-functionality
This commit is contained in:
		| @@ -492,6 +492,10 @@ void Websocket_HandleButtons(uint8_t *data) | ||||
|   { | ||||
|     globals.systemStatus = sysStat_Shutdown; | ||||
|   } | ||||
|   else if (strcmp(identifier, "resettank") == 0) | ||||
|   { | ||||
|     PersistenceData.tankRemain_microL = LubeConfig.tankCapacity_ml * 1000; | ||||
|   } | ||||
|   else | ||||
|   { | ||||
|     Debug_pushMessage("Got unknown Button-id '%s' from ws-client\n", identifier); | ||||
| @@ -532,6 +536,38 @@ void Websocket_HandleSettings(uint8_t *data) | ||||
|     int index = findIndexByString(value, GPSBaudRateString, GPSBaudRateString_Elements); | ||||
|     LubeConfig.GPSBaudRate = (GPSBaudRate_t)index; | ||||
|   } | ||||
|   else if (strcmp(identifier, "ledmaxbrightness") == 0) | ||||
|   { | ||||
|     LubeConfig.LED_Max_Brightness = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "ledminbrightness") == 0) | ||||
|   { | ||||
|     LubeConfig.LED_Min_Brightness = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "pumppulse") == 0) | ||||
|   { | ||||
|     LubeConfig.BleedingPulses = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "tankwarn") == 0) | ||||
|   { | ||||
|     LubeConfig.TankRemindAtPercentage = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "tankcap") == 0) | ||||
|   { | ||||
|     LubeConfig.tankCapacity_ml = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "lubedistancerain") == 0) | ||||
|   { | ||||
|     LubeConfig.DistancePerLube_Rain = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "lubedistancenormal") == 0) | ||||
|   { | ||||
|     LubeConfig.DistancePerLube_Default = atoi(value); | ||||
|   } | ||||
|   else if (strcmp(identifier, "ledmodeflash") == 0) | ||||
|   { | ||||
|     LubeConfig.LED_Mode_Flash = value[0] == '1' ? true : false; | ||||
|   } | ||||
|   else | ||||
|   { | ||||
|     Debug_pushMessage("Got unknown Settings-id and value '%s' from ws-client\n", identifier); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user