add toogle button for signal led in http frontend
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
j3d1 2021-07-19 23:31:20 +02:00
parent 006d281ad6
commit 8c775e9705
3 changed files with 24 additions and 1 deletions

View file

@ -226,6 +226,16 @@ void websocket_cb(struct tcp_pcb *pcb, char *data, u16_t data_len, uint8_t mode)
char cmd = '0';
switch (data[0]) {
case 'D': // Disable LED
signal_led(false);
val = 1;
cmd = 'G';
break;
case 'E': // Enable LED
signal_led(true);
val = 0;
cmd = 'G';
break;
default:
printf("[websocket_callback]:\n%.*s\n", (int) data_len, (char *) data);
printf("Unknown command\n");