mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
display LED color on webserver
This commit is contained in:
parent
9fddd27faa
commit
56784539fa
1 changed files with 21 additions and 0 deletions
|
@ -105,6 +105,27 @@ void init_WiFi_STA(const char* ssid, const char* password) {
|
||||||
String processor(const String& var) {
|
String processor(const String& var) {
|
||||||
if (var == "PLACEHOLDER") {
|
if (var == "PLACEHOLDER") {
|
||||||
String content = "";
|
String content = "";
|
||||||
|
// Display LED color
|
||||||
|
content += "<h4>LED color: ";
|
||||||
|
switch (LEDcolor) {
|
||||||
|
case GREEN:
|
||||||
|
content += "GREEN</h4>";
|
||||||
|
break;
|
||||||
|
case YELLOW:
|
||||||
|
content += "YELLOW</h4>";
|
||||||
|
break;
|
||||||
|
case BLUE:
|
||||||
|
content += "BLUE</h4>";
|
||||||
|
break;
|
||||||
|
case RED:
|
||||||
|
content += "RED</h4>";
|
||||||
|
break;
|
||||||
|
case TEST_ALL_COLORS:
|
||||||
|
content += "RAINBOW</h4>";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Display ssid of network connected to and, if connected to the WiFi, its own IP
|
// Display ssid of network connected to and, if connected to the WiFi, its own IP
|
||||||
content += "<h4>SSID: " + String(ssid) + "</h4>";
|
content += "<h4>SSID: " + String(ssid) + "</h4>";
|
||||||
content += "<h4>status: " + wifi_state + "</h4>";
|
content += "<h4>status: " + wifi_state + "</h4>";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue