From 5909471962379043a3e25910e28ab21905108d83 Mon Sep 17 00:00:00 2001 From: Ian Gray Date: Wed, 12 Jan 2022 20:12:20 +0000 Subject: [PATCH 01/11] Further improve the reliability of UI element transfer. A protocol has been implemented between the server and client to acknowledge each UI_INITIAL_GUI and UI_EXTEND_GUI from the client javascript. This prevents the internal websocket buffers from becoming flooded when the number of controls gets too high. --- data/js/controls.js | 12 ++ data/js/controls.min.js | 4 +- src/ESPUI.cpp | 357 ++++++++++++++++++++++------------------ src/ESPUI.h | 6 +- src/dataControlsJS.h | 6 +- 5 files changed, 216 insertions(+), 169 deletions(-) diff --git a/data/js/controls.js b/data/js/controls.js index 19f0a19..12b2703 100644 --- a/data/js/controls.js +++ b/data/js/controls.js @@ -252,6 +252,13 @@ function start() { }; handleEvent(fauxEvent); }); + + //If there are more elements in the complete UI, then request them + //Note: we subtract 1 from data.controls.length because the controls always + //includes the title element + if(data.totalcontrols > (data.controls.length - 1)) { + websock.send("uiok:" + (data.controls.length - 1)); + } break; case UI_EXTEND_GUI: @@ -261,6 +268,11 @@ function start() { }; handleEvent(fauxEvent); }); + + //Do we need to keep requesting more UI elements? + if(data.totalcontrols > data.startindex + (data.controls.length - 1)) { + websock.send("uiok:" + (data.startindex + (data.controls.length - 1))); + } break; case UI_RELOAD: diff --git a/data/js/controls.min.js b/data/js/controls.min.js index 08cd597..c8fb6d9 100644 --- a/data/js/controls.min.js +++ b/data/js/controls.min.js @@ -8,7 +8,9 @@ function conStatusError(){websockConnected=false;$("#conStatus").removeClass("co function handleVisibilityChange(){if(!websockConnected&&!document.hidden){restart();}} function start(){document.addEventListener("visibilitychange",handleVisibilityChange,false);if(window.location.port!=""||window.location.port!=80||window.location.port!=443){websock=new WebSocket("ws://"+window.location.hostname+":"+window.location.port+"/ws");}else{websock=new WebSocket("ws://"+window.location.hostname+"/ws");} websock.onopen=function(evt){console.log("websock open");$("#conStatus").addClass("color-green");$("#conStatus").text("Connected");websockConnected=true;};websock.onclose=function(evt){console.log("websock close");conStatusError();};websock.onerror=function(evt){console.log(evt);conStatusError();};var handleEvent=function(evt){console.log(evt);var data=JSON.parse(evt.data);var e=document.body;var center="";switch(data.type){case UI_INITIAL_GUI:$("#row").html("");$("#tabsnav").html("");$("#tabscontent").html("");if(data.sliderContinuous){sliderContinuous=data.sliderContinuous;} -data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} +data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>(data.controls.length-1)){websock.send("uiok:"+(data.controls.length-1));} +break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>data.startindex+(data.controls.length-1)){websock.send("uiok:"+(data.startindex+(data.controls.length-1)));} +break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} break;case UI_SWITCHER:if(data.visible){addToHTML(data);switcher(data.id,data.value);} break;case UI_CPAD:case UI_PAD:if(data.visible){addToHTML(data);$("#pf"+data.id).on({touchstart:function(e){e.preventDefault();padclick(UP,data.id,true);},touchend:function(e){e.preventDefault();padclick(UP,data.id,false);},});$("#pl"+data.id).on({touchstart:function(e){e.preventDefault();padclick(LEFT,data.id,true);},touchend:function(e){e.preventDefault();padclick(LEFT,data.id,false);},});$("#pr"+data.id).on({touchstart:function(e){e.preventDefault();padclick(RIGHT,data.id,true);},touchend:function(e){e.preventDefault();padclick(RIGHT,data.id,false);},});$("#pb"+data.id).on({touchstart:function(e){e.preventDefault();padclick(DOWN,data.id,true);},touchend:function(e){e.preventDefault();padclick(DOWN,data.id,false);},});$("#pc"+data.id).on({touchstart:function(e){e.preventDefault();padclick(CENTER,data.id,true);},touchend:function(e){e.preventDefault();padclick(CENTER,data.id,false);},});} break;case UI_SLIDER:if(data.visible){addToHTML(data);rangeSlider(!sliderContinuous);} diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index 7d25bc6..58e5081 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -422,7 +422,7 @@ void onWsEvent( } #endif - ESPUI.jsonDom(client); + ESPUI.jsonDom(0, client); #if defined(DEBUG_ESPUI) if (ESPUI.verbosity) @@ -442,142 +442,149 @@ void onWsEvent( msg += (char)data[i]; } - uint16_t id = msg.substring(msg.lastIndexOf(':') + 1).toInt(); - -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity >= Verbosity::VerboseJSON) + if (msg.startsWith(F("uiok:"))) { - Serial.print(F("WS rec: ")); - Serial.println(msg); - Serial.print(F("WS recognised ID: ")); - Serial.println(id); - } -#endif - - Control* c = ESPUI.getControl(id); - - if (c == nullptr) + int idx = msg.substring(msg.indexOf(':') + 1).toInt(); + ESPUI.jsonDom(idx); + } else { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + uint16_t id = msg.substring(msg.lastIndexOf(':') + 1).toInt(); + + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity >= Verbosity::VerboseJSON) { - Serial.print(F("No control found for ID ")); + Serial.print(F("WS rec: ")); + Serial.println(msg); + Serial.print(F("WS recognised ID: ")); Serial.println(id); } -#endif + #endif - return; - } + Control* c = ESPUI.getControl(id); - if (c->callback == nullptr) - { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + if (c == nullptr) { - Serial.print(F("No callback found for ID ")); - Serial.println(id); + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.print(F("No control found for ID ")); + Serial.println(id); + } + #endif + + return; } -#endif - return; - } - - if (msg.startsWith(F("bdown:"))) - { - c->callback(c, B_DOWN); - } - else if (msg.startsWith(F("bup:"))) - { - c->callback(c, B_UP); - } - else if (msg.startsWith(F("pfdown:"))) - { - c->callback(c, P_FOR_DOWN); - } - else if (msg.startsWith(F("pfup:"))) - { - c->callback(c, P_FOR_UP); - } - else if (msg.startsWith(F("pldown:"))) - { - c->callback(c, P_LEFT_DOWN); - } - else if (msg.startsWith(F("plup:"))) - { - c->callback(c, P_LEFT_UP); - } - else if (msg.startsWith(F("prdown:"))) - { - c->callback(c, P_RIGHT_DOWN); - } - else if (msg.startsWith(F("prup:"))) - { - c->callback(c, P_RIGHT_UP); - } - else if (msg.startsWith(F("pbdown:"))) - { - c->callback(c, P_BACK_DOWN); - } - else if (msg.startsWith(F("pbup:"))) - { - c->callback(c, P_BACK_UP); - } - else if (msg.startsWith(F("pcdown:"))) - { - c->callback(c, P_CENTER_DOWN); - } - else if (msg.startsWith(F("pcup:"))) - { - c->callback(c, P_CENTER_UP); - } - else if (msg.startsWith(F("sactive:"))) - { - c->value = "1"; - ESPUI.updateControl(c, client->id()); - c->callback(c, S_ACTIVE); - } - else if (msg.startsWith(F("sinactive:"))) - { - c->value = "0"; - ESPUI.updateControl(c, client->id()); - c->callback(c, S_INACTIVE); - } - else if (msg.startsWith(F("slvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, SL_VALUE); - } - else if (msg.startsWith(F("nvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, N_VALUE); - } - else if (msg.startsWith(F("tvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, T_VALUE); - } - else if (msg.startsWith("tabvalue:")) - { - c->callback(c, client->id()); - } - else if (msg.startsWith(F("svalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, S_VALUE); - } - else - { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + if (c->callback == nullptr) { - Serial.println(F("Malformated message from the websocket")); + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.print(F("No callback found for ID ")); + Serial.println(id); + } + #endif + + return; + } + + if (msg.startsWith(F("bdown:"))) + { + c->callback(c, B_DOWN); + } + else if (msg.startsWith(F("bup:"))) + { + c->callback(c, B_UP); + } + else if (msg.startsWith(F("pfdown:"))) + { + c->callback(c, P_FOR_DOWN); + } + else if (msg.startsWith(F("pfup:"))) + { + c->callback(c, P_FOR_UP); + } + else if (msg.startsWith(F("pldown:"))) + { + c->callback(c, P_LEFT_DOWN); + } + else if (msg.startsWith(F("plup:"))) + { + c->callback(c, P_LEFT_UP); + } + else if (msg.startsWith(F("prdown:"))) + { + c->callback(c, P_RIGHT_DOWN); + } + else if (msg.startsWith(F("prup:"))) + { + c->callback(c, P_RIGHT_UP); + } + else if (msg.startsWith(F("pbdown:"))) + { + c->callback(c, P_BACK_DOWN); + } + else if (msg.startsWith(F("pbup:"))) + { + c->callback(c, P_BACK_UP); + } + else if (msg.startsWith(F("pcdown:"))) + { + c->callback(c, P_CENTER_DOWN); + } + else if (msg.startsWith(F("pcup:"))) + { + c->callback(c, P_CENTER_UP); + } + else if (msg.startsWith(F("sactive:"))) + { + c->value = "1"; + ESPUI.updateControl(c, client->id()); + c->callback(c, S_ACTIVE); + } + else if (msg.startsWith(F("sinactive:"))) + { + c->value = "0"; + ESPUI.updateControl(c, client->id()); + c->callback(c, S_INACTIVE); + } + else if (msg.startsWith(F("slvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, SL_VALUE); + } + else if (msg.startsWith(F("nvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, N_VALUE); + } + else if (msg.startsWith(F("tvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, T_VALUE); + } + else if (msg.startsWith("tabvalue:")) + { + c->callback(c, client->id()); + } + else if (msg.startsWith(F("svalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, S_VALUE); + } + else + { + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.println(F("Malformated message from the websocket")); + } + #endif } -#endif } } break; @@ -608,6 +615,8 @@ uint16_t ESPUIClass::addControl(ControlType type, const char* label, const Strin iterator->next = control; } + this->controlCount++; + return control->id; } @@ -622,13 +631,14 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui) { this->controls = it->next; delete it; + this->controlCount--; if (force_reload_ui) { jsonReload(); } else { - jsonDom(); + jsonDom(0); } return true; } @@ -644,13 +654,14 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui) { it->next = it_next->next; delete it_next; + this->controlCount--; if (force_reload_ui) { jsonReload(); } else { - jsonDom(); // resends to all + jsonDom(0); // resends to all } return true; } @@ -977,61 +988,79 @@ void ESPUIClass::addGraphPoint(uint16_t id, int nValue, int clientId) tryId++; } } + /* -Convert & Transfer Arduino elements to JSON elements -Initially this function used to send the control element data individually. -Due to a change in the ESPAsyncWebserver library this had top be changed to be -sent as one blob at the beginning. Therefore a new type is used as well +Convert & Transfer Arduino elements to JSON elements. This function sends a chunk of +JSON describing the controls of the UI, starting from the control at index startidx. +If startidx is 0 then a UI_INITIAL_GUI message will be sent, else a UI_EXTEND_GUI. +Both message types contain a list of serialised UI elements. Only a portion of the UI +will be sent in order to avoid websocket buffer overflows. The client will acknowledge +receipt of a partial message by requesting the next chunk of UI. + +The protocol is: +SERVER: jsonDom(0): + "UI_INITIAL_GUI: n serialised UI elements" +CLIENT: controls.js:handleEvent() + "uiok:n" +SERVER: jsonDom(n): + "UI_EXTEND_GUI: n serialised UI elements" +CLIENT: controls.js:handleEvent() + "uiok:2*n" +etc. */ -void ESPUIClass::jsonDom(AsyncWebSocketClient* client) +void ESPUIClass::jsonDom(uint16_t startidx, AsyncWebSocketClient* client) { + if(startidx >= this->controlCount) + { + return; + } DynamicJsonDocument document(jsonInitialDocumentSize); - document["type"] = (int)UI_INITIAL_GUI; + document["type"] = startidx ? (int)UI_EXTEND_GUI : (int)UI_INITIAL_GUI; document["sliderContinuous"] = sliderContinuous; + document["startindex"] = startidx; + document["totalcontrols"] = this->controlCount; JsonArray items = document.createNestedArray("controls"); - - Control* control = this->controls; - JsonObject titleItem = items.createNestedObject(); titleItem["type"] = (int)UI_TITLE; titleItem["label"] = ui_title; - while (1) - { - control = prepareJSONChunk(client, control, &items); + prepareJSONChunk(client, startidx, &items); - String json; - serializeJson(document, json); + String json; + serializeJson(document, json); #if defined(DEBUG_ESPUI) - if (this->verbosity >= Verbosity::VerboseJSON) - { - Serial.println("Sending elements --------->"); - Serial.println(json); - } -#endif - if (client != nullptr) - client->text(json); - else - this->ws->textAll(json); - - if (control == nullptr) - break; - - document.clear(); - items.clear(); - document["type"] = (int)UI_EXTEND_GUI; - items = document.createNestedArray("controls"); + if (this->verbosity >= Verbosity::VerboseJSON) + { + Serial.println("Sending elements --------->"); + Serial.println(json); } +#endif + if (client != nullptr) + client->text(json); + else + this->ws->textAll(json); } /* Prepare a chunk of elements as a single JSON string. If the allowed number of elements is greater than the total -number this will represent the entire UI and this function will return null. If a control pointer is returned then the -limit was reached, the currently serialised must be sent, and then processing resumed to send the next chunk. */ -Control* ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, Control* control, JsonArray* items) +number this will represent the entire UI. More likely, it will represent a small section of the UI to be sent. The client +will acknoledge receipt by requesting the next chunk. */ +void ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startindex, JsonArray* items) { - int elementcount = 0; + //First check that there will be sufficient nodes in the list + if(startindex >= this->controlCount) + { + return; + } + //Follow the list until control points to the startindex'th node + Control* control = this->controls; + for(auto i = 0; i < startindex; i++) { + control = control->next; + } + + //To prevent overflow, keep track of the number of elements we have serialised into this message + int elementcount = 0; while (control != nullptr && elementcount < 10) { JsonObject item = items->createNestedObject(); @@ -1071,7 +1100,7 @@ Control* ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, Control* con control = control->next; elementcount++; } - return control; + return; } void ESPUIClass::jsonReload() diff --git a/src/ESPUI.h b/src/ESPUI.h index e3a53db..86634d3 100644 --- a/src/ESPUI.h +++ b/src/ESPUI.h @@ -298,7 +298,7 @@ public: const char* ui_title = "ESPUI"; // Store UI Title and Header Name Control* controls = nullptr; void jsonReload(); - void jsonDom(AsyncWebSocketClient* client = nullptr); + void jsonDom(uint16_t startidx, AsyncWebSocketClient* client = nullptr); Verbosity verbosity; @@ -310,7 +310,9 @@ private: const char* basicAuthPassword = nullptr; bool basicAuth = true; - Control* prepareJSONChunk(AsyncWebSocketClient* client, Control* control, JsonArray* items); + uint16_t controlCount = 0; + + void prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startindex, JsonArray* items); }; extern ESPUIClass ESPUI; diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h index bbaebe4..483e8f3 100644 --- a/src/dataControlsJS.h +++ b/src/dataControlsJS.h @@ -9,7 +9,9 @@ function conStatusError(){websockConnected=false;$("#conStatus").removeClass("co function handleVisibilityChange(){if(!websockConnected&&!document.hidden){restart();}} function start(){document.addEventListener("visibilitychange",handleVisibilityChange,false);if(window.location.port!=""||window.location.port!=80||window.location.port!=443){websock=new WebSocket("ws://"+window.location.hostname+":"+window.location.port+"/ws");}else{websock=new WebSocket("ws://"+window.location.hostname+"/ws");} websock.onopen=function(evt){console.log("websock open");$("#conStatus").addClass("color-green");$("#conStatus").text("Connected");websockConnected=true;};websock.onclose=function(evt){console.log("websock close");conStatusError();};websock.onerror=function(evt){console.log(evt);conStatusError();};var handleEvent=function(evt){console.log(evt);var data=JSON.parse(evt.data);var e=document.body;var center="";switch(data.type){case UI_INITIAL_GUI:$("#row").html("");$("#tabsnav").html("");$("#tabscontent").html("");if(data.sliderContinuous){sliderContinuous=data.sliderContinuous;} -data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} +data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>(data.controls.length-1)){websock.send("uiok:"+(data.controls.length-1));} +break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>data.startindex+(data.controls.length-1)){websock.send("uiok:"+(data.startindex+(data.controls.length-1)));} +break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} break;case UI_SWITCHER:if(data.visible){addToHTML(data);switcher(data.id,data.value);} break;case UI_CPAD:case UI_PAD:if(data.visible){addToHTML(data);$("#pf"+data.id).on({touchstart:function(e){e.preventDefault();padclick(UP,data.id,true);},touchend:function(e){e.preventDefault();padclick(UP,data.id,false);},});$("#pl"+data.id).on({touchstart:function(e){e.preventDefault();padclick(LEFT,data.id,true);},touchend:function(e){e.preventDefault();padclick(LEFT,data.id,false);},});$("#pr"+data.id).on({touchstart:function(e){e.preventDefault();padclick(RIGHT,data.id,true);},touchend:function(e){e.preventDefault();padclick(RIGHT,data.id,false);},});$("#pb"+data.id).on({touchstart:function(e){e.preventDefault();padclick(DOWN,data.id,true);},touchend:function(e){e.preventDefault();padclick(DOWN,data.id,false);},});$("#pc"+data.id).on({touchstart:function(e){e.preventDefault();padclick(CENTER,data.id,true);},touchend:function(e){e.preventDefault();padclick(CENTER,data.id,false);},});} break;case UI_SLIDER:if(data.visible){addToHTML(data);rangeSlider(!sliderContinuous);} @@ -86,4 +88,4 @@ value+"";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3761] PROGMEM = { 31,139,8,0,198,0,218,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,172,9,151,220,38,1,203,57,4,147,132,29,98,188,54,158,204,217,76,214,71,136,198,232,88,72,26,73,24,123,28,254,251,86,87,95,212,45,4,102,112,118,246,37,134,234,234,234,175,171,170,187,235,66,220,48,72,82,227,162,119,217,59,233,13,123,237,254,229,199,139,158,253,188,94,111,185,98,224,172,219,31,180,143,129,214,16,180,211,227,246,176,123,57,248,240,225,188,59,180,27,42,111,247,183,97,247,228,152,201,104,40,244,97,111,216,237,219,10,225,20,36,230,228,33,41,91,164,119,217,161,148,231,58,83,135,113,61,207,184,222,95,12,135,131,19,251,133,206,199,169,141,250,139,140,179,223,126,15,32,94,234,140,140,216,168,191,204,248,206,191,244,134,157,79,221,51,251,149,206,42,233,141,250,43,133,187,223,59,6,218,235,28,47,163,54,234,175,51,206,147,139,207,239,129,246,179,206,201,169,141,250,207,138,186,64,143,96,144,211,139,161,253,70,231,86,70,26,245,55,217,140,143,103,237,211,79,246,91,78,104,31,31,51,202,229,233,160,119,66,89,249,64,167,223,109,159,113,230,70,253,173,178,98,251,189,221,200,25,132,209,20,131,156,119,251,221,14,72,203,217,68,144,27,138,85,6,167,195,30,213,127,206,44,130,220,80,204,242,185,7,132,156,85,144,214,80,108,242,185,253,155,221,200,217,3,105,13,213,20,195,238,169,221,200,91,2,137,13,197,14,31,219,23,31,187,118,35,103,7,78,109,40,102,104,119,58,212,55,114,38,224,212,198,27,85,49,167,237,179,246,112,0,102,124,155,215,141,28,81,134,228,73,56,30,124,57,145,231,160,223,253,48,148,254,126,214,251,248,105,40,189,186,211,61,25,130,147,8,133,116,46,135,23,103,255,186,24,244,206,187,82,84,231,178,251,185,123,214,238,103,231,170,115,121,218,133,89,103,189,95,97,234,115,73,252,210,29,182,207,79,63,181,251,138,248,203,243,139,147,15,253,193,23,109,141,78,251,236,108,48,148,167,160,115,217,238,247,254,221,62,3,211,188,150,164,227,246,217,47,210,163,59,151,39,131,147,174,253,252,213,171,214,141,19,27,87,177,19,77,143,157,212,177,3,178,48,218,113,236,220,89,101,28,153,58,73,219,117,137,111,79,28,63,33,72,74,124,111,76,226,78,24,164,94,48,15,231,9,31,154,204,3,55,245,194,192,112,67,63,140,59,190,147,36,22,126,236,141,203,247,252,131,125,50,159,141,72,44,233,173,100,225,165,238,84,225,115,18,162,234,172,25,147,116,30,7,38,252,243,199,60,244,18,98,182,56,11,87,161,96,32,51,18,59,254,88,14,103,250,20,28,17,73,73,28,123,55,36,150,76,153,126,5,211,130,164,78,18,77,29,63,149,76,82,223,130,39,153,7,19,63,92,40,114,152,250,197,184,235,196,113,152,205,23,166,16,195,142,239,253,233,196,94,32,25,168,37,196,224,216,137,175,205,214,152,76,156,185,159,10,162,217,90,46,247,168,230,23,100,148,132,238,117,75,249,12,102,8,136,155,146,113,222,10,49,249,99,78,146,116,16,123,36,72,29,74,58,37,241,204,75,18,248,100,149,239,151,123,146,51,113,110,200,71,225,0,48,228,135,174,227,159,167,97,236,92,145,106,66,210,94,74,102,150,73,146,104,238,161,159,36,102,229,159,231,131,147,106,146,194,46,174,188,201,157,37,221,167,92,110,41,130,99,88,63,140,21,217,30,88,24,61,8,86,28,163,187,105,107,93,21,174,149,9,111,121,19,75,78,221,183,131,185,239,151,239,51,89,8,42,114,226,132,100,92,229,22,211,97,182,228,87,111,252,13,64,50,242,215,111,121,188,78,156,130,10,126,178,198,161,59,159,129,230,202,85,103,60,182,204,127,152,229,106,56,153,192,161,248,201,50,159,196,225,2,190,79,211,153,111,153,102,185,197,77,81,117,253,16,214,6,167,102,82,84,209,112,234,206,193,10,243,164,11,190,17,195,10,107,204,71,165,75,94,88,35,38,179,240,134,176,195,100,226,41,121,118,21,19,18,152,229,21,86,192,169,241,197,100,92,192,197,64,35,10,163,102,156,132,6,71,64,65,62,125,242,230,245,139,87,173,130,89,217,214,53,106,96,221,187,190,231,94,55,185,230,42,75,109,211,83,39,24,251,228,87,47,241,70,158,239,165,119,29,32,92,129,130,238,193,142,251,121,5,60,125,186,47,116,94,157,122,227,49,9,202,247,210,32,244,0,100,254,202,141,36,217,97,231,221,27,248,208,247,146,148,4,112,189,152,55,114,77,23,215,52,43,197,88,42,168,117,116,172,133,23,140,195,69,149,58,36,93,165,26,133,113,186,111,155,230,247,239,197,35,111,234,235,70,94,190,124,33,237,139,247,233,23,50,58,135,207,36,181,204,69,210,172,213,204,131,252,196,105,152,164,129,51,35,7,102,115,117,144,74,61,48,107,11,80,121,107,73,0,239,206,194,185,140,61,225,176,97,16,70,36,176,133,102,45,114,147,210,171,58,72,66,159,192,252,43,16,201,56,13,202,183,133,207,173,243,205,148,220,2,62,105,235,236,204,100,254,159,198,115,210,90,182,50,104,120,154,182,193,134,140,32,50,127,198,52,105,132,210,54,72,163,132,34,9,236,13,164,190,131,46,246,144,4,202,62,206,93,70,48,80,29,227,93,68,71,137,45,253,118,20,142,239,144,230,194,55,18,131,179,137,247,144,178,87,211,187,136,240,23,81,15,250,155,5,119,16,37,165,206,40,9,156,155,34,50,0,133,163,145,170,67,224,243,184,76,254,57,135,43,53,255,192,23,242,129,31,33,157,138,142,67,63,169,78,194,184,235,0,120,226,19,186,61,251,8,239,122,120,201,110,153,234,238,41,123,51,247,116,112,230,114,101,217,82,212,108,201,89,96,131,114,107,20,19,231,186,37,52,145,101,46,205,255,15,0,150,102,53,243,231,44,38,126,232,140,173,60,55,38,84,77,105,244,212,75,125,194,52,234,59,35,226,163,137,102,142,23,124,34,14,232,87,88,40,99,200,203,195,52,168,41,190,177,156,68,126,205,146,14,73,98,49,191,252,138,193,179,50,200,131,222,166,112,7,188,58,125,82,134,163,61,12,63,13,63,247,45,230,187,58,8,150,180,173,76,186,207,207,162,155,27,165,129,121,128,108,240,254,227,163,145,134,115,119,138,215,120,51,59,79,229,123,82,141,98,66,117,126,204,226,31,170,202,121,154,210,171,0,30,25,139,139,168,208,155,2,172,82,65,41,36,24,239,34,131,223,251,75,246,98,233,123,19,201,227,195,187,99,167,21,30,28,33,150,177,59,62,2,204,137,165,249,176,212,59,253,188,149,242,162,201,206,186,139,156,49,219,244,197,105,101,87,221,21,201,80,117,135,16,253,199,67,164,9,213,227,65,106,82,86,96,198,143,135,137,169,222,227,113,234,98,86,128,142,30,15,148,102,171,143,199,169,73,89,129,233,62,30,38,75,150,31,15,52,39,103,227,233,198,114,207,195,135,47,166,241,225,57,190,121,214,254,202,27,185,34,118,216,126,191,42,83,127,148,157,8,130,40,200,37,14,125,239,232,208,49,194,96,6,146,200,60,178,75,192,195,246,33,53,122,96,150,75,198,52,38,19,187,68,37,40,244,210,17,255,130,215,204,129,121,88,115,142,14,107,32,178,240,181,151,107,142,189,27,195,27,227,82,154,176,195,26,140,208,185,116,158,13,2,170,186,0,248,54,34,227,14,251,110,65,110,24,70,77,106,166,101,25,99,26,203,116,34,143,173,236,0,247,196,243,33,144,177,164,217,104,8,143,233,215,79,86,58,245,18,192,147,166,16,158,211,141,153,101,219,182,33,74,164,251,126,150,134,207,216,93,10,169,46,58,147,137,116,179,162,58,0,125,204,1,142,29,197,225,44,130,112,114,232,140,140,52,52,216,68,250,201,10,176,186,96,64,106,3,62,249,142,197,56,251,116,63,85,198,4,51,44,248,90,6,107,251,36,166,34,166,78,74,101,26,227,144,36,70,16,166,6,185,133,36,194,104,254,254,59,6,202,5,62,87,224,82,172,84,38,205,15,81,31,204,232,176,168,132,193,102,36,170,222,39,9,4,28,110,202,109,160,179,182,216,215,204,104,97,132,9,15,181,27,251,104,30,236,9,219,237,153,37,3,93,192,46,9,42,243,8,58,32,40,108,49,66,185,143,4,13,131,10,32,28,214,152,204,35,115,117,71,159,123,219,110,199,27,23,109,229,192,52,188,32,154,167,204,4,124,91,137,247,39,36,127,229,123,177,75,116,133,153,23,152,250,179,185,130,165,253,219,223,133,197,185,125,0,11,173,80,254,77,96,32,149,141,30,64,131,197,225,135,111,50,89,64,249,202,125,231,155,189,82,153,17,23,121,11,16,192,77,135,3,231,55,87,214,234,220,138,137,180,236,238,215,157,39,87,207,110,226,161,77,236,207,78,58,173,198,225,28,220,154,38,173,32,17,118,76,11,62,67,111,6,159,106,141,122,189,94,132,180,26,205,147,169,117,127,219,76,147,202,93,51,211,6,156,194,92,217,106,23,228,10,110,165,220,222,44,80,216,215,111,63,120,61,81,179,166,230,19,53,214,50,27,151,37,87,76,137,31,126,168,54,22,250,114,71,91,233,164,96,22,169,134,110,89,222,193,29,78,44,13,128,6,139,224,52,14,35,184,52,239,172,18,79,153,206,211,59,159,148,202,236,153,83,5,9,7,134,97,238,193,234,140,98,72,50,232,222,16,83,195,123,81,55,223,213,155,141,191,6,45,121,52,54,22,50,176,32,224,146,22,228,44,237,132,131,92,5,101,197,4,103,54,149,202,210,223,7,148,39,131,84,22,60,133,138,48,0,182,179,101,117,73,187,192,82,146,82,140,80,200,109,250,131,176,229,68,237,100,92,150,30,175,60,205,143,133,182,34,108,23,112,60,205,86,73,89,22,153,181,89,155,171,51,89,154,79,129,92,57,243,43,242,131,54,149,151,181,203,158,216,181,199,232,162,209,33,234,104,88,165,179,204,139,224,58,8,23,129,65,43,96,52,154,195,16,204,20,247,231,114,79,64,166,227,71,182,214,228,126,250,84,142,28,234,85,51,246,66,139,218,80,254,0,175,85,67,228,4,196,215,148,160,78,43,208,64,54,161,156,131,106,219,218,133,2,41,13,3,163,87,249,217,53,243,76,118,188,120,191,237,25,239,112,137,175,89,59,75,80,178,222,149,160,200,78,149,32,176,214,148,248,38,59,81,229,150,64,146,21,116,57,143,121,160,180,243,120,185,13,190,151,69,41,186,112,11,25,118,1,90,65,171,194,148,248,56,176,77,136,214,226,88,238,209,180,5,243,181,103,252,142,190,196,111,144,144,16,90,15,84,210,17,158,135,124,173,127,227,79,138,158,152,32,13,211,25,70,13,104,221,154,191,140,133,156,44,31,80,234,204,51,146,36,206,21,177,149,90,162,218,18,97,248,88,83,130,167,43,204,47,65,158,45,222,0,78,199,147,154,117,151,18,204,9,18,31,87,110,154,7,240,23,219,5,156,91,93,133,145,54,172,130,119,250,166,101,130,45,86,161,151,239,134,53,216,221,188,105,145,116,155,69,68,106,92,184,4,77,102,55,174,224,140,182,88,131,93,213,155,140,194,239,242,141,134,217,98,33,181,18,201,134,43,94,50,134,155,14,91,98,252,163,46,118,68,105,138,52,122,232,140,28,203,60,42,94,78,150,71,232,229,83,201,45,200,59,13,74,147,129,21,81,154,235,144,68,238,195,80,34,87,195,162,93,254,235,5,79,182,16,60,89,39,152,214,168,214,139,222,66,125,209,104,157,104,90,78,92,47,218,223,66,180,191,78,52,86,0,215,203,142,183,144,29,23,200,214,218,164,34,144,230,134,79,32,57,32,232,104,248,201,230,253,115,248,142,46,158,121,183,7,55,120,19,102,186,215,180,83,39,91,153,194,207,29,16,127,67,148,165,243,215,150,210,20,20,66,244,190,165,144,228,5,15,202,210,251,223,153,56,148,103,100,123,105,100,17,244,38,24,121,158,8,158,249,108,92,212,31,115,178,235,171,178,215,192,122,64,188,40,75,178,31,115,40,5,198,172,171,232,37,199,94,226,198,36,229,245,46,100,178,215,190,111,202,239,113,220,145,173,188,115,218,59,163,191,92,16,190,208,13,68,190,227,18,171,246,159,223,143,15,106,87,21,19,159,50,86,244,196,98,46,86,41,154,171,47,167,246,36,82,10,15,35,151,75,94,50,93,247,228,174,155,216,66,7,84,1,186,142,239,143,28,247,250,156,64,204,183,111,155,212,42,38,251,209,128,170,30,49,41,67,43,20,177,20,254,166,178,48,93,104,60,123,235,215,173,240,85,91,203,165,232,2,203,188,59,211,51,38,224,247,89,192,103,63,24,65,190,51,13,140,21,105,209,46,23,45,30,208,186,93,211,52,91,106,8,109,111,17,154,175,200,84,135,165,84,92,104,1,155,47,22,73,71,168,40,250,23,249,169,186,215,108,71,169,103,149,202,223,191,203,151,184,160,42,86,245,73,112,149,78,143,234,90,125,108,27,185,239,54,137,205,58,224,172,65,15,62,181,185,123,174,55,77,181,180,74,105,248,173,109,213,229,154,7,187,55,95,177,190,84,220,138,101,121,17,219,138,44,215,43,185,6,90,242,64,245,23,195,165,23,144,93,74,23,33,253,209,221,124,22,36,130,131,154,145,50,56,241,216,72,217,207,11,104,81,184,56,134,198,62,192,244,149,104,44,176,2,177,121,88,3,210,225,52,174,209,202,49,119,41,89,118,66,245,86,86,75,52,21,45,255,195,42,51,246,23,114,165,175,172,237,188,203,126,19,246,123,37,20,41,54,78,219,34,176,218,134,93,232,72,150,123,122,177,157,226,16,215,198,86,149,220,124,181,126,55,13,201,215,64,153,158,221,47,40,2,102,23,76,44,136,223,164,155,243,159,13,30,38,160,60,212,42,60,73,66,159,218,221,176,39,85,138,218,50,240,223,103,139,216,137,168,58,101,131,137,202,57,50,243,189,127,177,10,11,106,113,29,236,244,175,91,137,247,187,104,100,3,156,74,36,204,166,84,12,124,125,105,51,195,84,123,99,69,156,236,33,69,147,75,144,140,79,129,41,79,181,0,202,246,72,113,38,15,43,132,119,149,204,3,75,148,30,27,230,59,249,148,195,5,89,102,173,184,61,230,187,124,150,23,112,26,62,72,88,191,176,75,56,105,20,222,150,216,218,98,233,48,232,208,77,137,165,232,207,214,216,246,48,46,195,30,206,134,181,133,63,31,214,112,91,202,190,87,46,47,177,255,192,145,56,249,79,102,224,216,207,125,6,88,235,73,50,27,169,189,127,67,55,18,5,103,42,70,42,100,229,86,194,93,211,159,49,176,134,227,211,39,111,95,191,170,183,178,182,229,67,171,179,102,249,182,0,114,220,26,134,120,103,12,248,195,130,109,33,232,204,26,2,127,103,4,216,138,223,22,129,206,172,33,24,109,68,80,99,238,96,241,106,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,15,191,37,76,206,93,12,212,21,64,7,191,80,140,204,237,41,68,112,99,245,148,179,23,89,248,184,114,22,213,128,89,59,149,250,13,192,206,40,50,151,140,153,7,187,169,195,95,231,214,46,53,234,117,165,197,202,47,26,220,141,30,96,21,45,200,35,116,56,96,120,9,23,114,160,68,253,18,195,155,86,60,84,185,40,67,108,145,109,130,71,124,248,128,55,71,16,203,95,183,86,110,51,19,183,138,181,30,222,48,102,155,101,233,73,209,222,224,162,197,48,89,240,240,4,130,233,10,44,83,83,96,41,209,206,174,208,88,137,40,223,204,46,64,163,148,154,10,177,240,48,75,62,124,88,175,249,11,64,68,129,135,67,201,22,214,74,67,133,75,179,144,78,172,60,241,174,230,49,65,153,188,249,199,127,102,1,3,174,195,251,237,7,50,54,81,168,248,5,230,170,162,49,62,228,162,191,244,250,125,227,125,215,104,27,72,54,54,41,27,151,103,165,250,255,129,225,89,160,202,97,225,23,163,70,127,74,14,39,107,22,49,221,146,177,49,129,87,236,110,95,61,144,14,109,106,146,56,156,209,90,48,3,137,36,9,242,72,229,30,65,54,38,181,199,158,186,8,52,91,36,43,156,167,180,165,46,153,35,212,98,193,127,162,248,47,48,50,219,133,66,55,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3810] PROGMEM = { 31,139,8,0,242,53,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,96,65,192,21,45,58,90,218,14,7,185,10,202,170,9,206,108,42,213,179,191,15,40,79,6,169,44,184,10,21,97,0,108,103,203,234,146,118,129,165,36,165,24,161,144,187,244,47,194,150,19,181,147,113,89,122,188,114,53,63,21,218,138,176,93,192,241,52,91,37,101,89,100,214,74,110,173,142,100,105,62,5,114,237,204,175,201,95,180,168,188,172,93,214,196,142,61,70,23,205,28,81,43,196,74,164,101,94,6,55,65,184,8,12,90,229,163,209,28,134,96,166,56,63,151,123,178,34,4,239,143,108,173,145,255,252,185,124,115,168,87,6,217,13,45,202,83,249,13,188,86,13,145,19,16,95,83,130,58,172,64,3,217,128,114,14,170,109,107,7,10,164,52,12,140,222,201,96,199,204,129,236,234,241,158,226,1,239,226,137,199,172,101,39,40,89,127,78,80,100,55,78,16,88,251,77,60,201,110,91,185,45,144,100,69,107,206,99,86,148,150,37,47,145,193,115,89,148,219,11,151,144,97,23,160,21,180,42,76,137,143,3,219,132,104,45,142,229,30,77,91,48,95,59,224,103,244,21,62,65,66,66,104,73,82,73,71,120,30,242,181,241,141,95,41,122,98,130,52,76,103,24,53,160,181,121,126,51,22,114,178,124,64,169,165,207,72,146,56,215,196,86,202,153,106,219,135,225,99,141,23,158,174,48,191,4,121,182,184,3,56,29,119,106,214,65,99,229,203,196,199,153,91,102,5,254,98,75,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,141,11,167,160,201,236,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,86,34,217,235,170,151,140,225,164,195,182,31,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,229,17,122,248,84,115,19,242,110,138,210,72,97,69,148,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,53,170,245,162,183,80,95,52,90,39,154,150,19,215,139,246,183,16,237,175,19,141,21,192,245,178,227,45,100,199,5,178,181,86,176,8,164,185,225,19,72,14,8,58,26,254,178,249,55,2,240,140,46,158,121,183,7,39,120,11,70,186,55,180,27,153,239,159,36,14,136,191,37,202,212,249,99,75,105,124,10,33,122,111,86,72,242,130,71,101,233,61,254,76,28,202,51,178,181,52,179,8,122,19,140,60,79,4,215,124,246,94,212,31,115,178,27,171,178,215,192,122,68,188,40,75,178,15,86,148,2,99,214,57,245,146,99,47,113,99,146,242,122,23,50,217,107,239,55,229,155,35,119,100,43,247,156,118,207,232,55,23,132,47,116,1,145,239,184,196,170,255,231,183,227,74,253,186,106,226,85,198,138,158,88,204,197,42,69,107,245,230,212,174,68,74,225,97,228,114,201,75,166,235,174,220,117,3,219,232,128,42,64,215,241,253,145,227,222,92,16,136,249,246,109,147,90,197,100,31,70,168,234,17,131,50,180,66,17,75,225,111,42,11,211,133,198,179,183,126,222,42,159,181,189,92,138,78,183,204,187,51,61,99,2,254,144,5,124,246,163,17,228,59,211,192,88,145,22,237,114,209,98,133,214,237,90,166,217,86,67,104,123,139,208,124,69,166,250,90,74,197,137,22,176,248,98,145,244,13,21,69,255,34,63,85,247,154,229,40,245,172,82,249,251,119,121,19,23,84,197,120,31,245,168,161,213,199,182,145,251,110,147,216,172,203,207,62,66,0,159,218,252,133,128,222,52,213,210,42,165,225,183,182,85,151,107,30,236,222,124,197,250,82,113,43,150,229,69,108,41,178,92,175,228,26,104,201,138,234,47,134,75,15,32,187,148,46,66,250,97,225,124,22,36,130,131,154,145,50,56,241,216,72,217,39,20,180,40,92,28,67,99,31,96,250,90,52,22,88,129,216,60,172,3,233,112,26,215,105,229,152,187,148,44,59,161,122,171,171,37,154,170,150,255,97,149,25,251,11,185,210,87,214,118,222,101,189,9,251,38,11,69,138,133,211,182,8,204,182,97,21,58,146,229,158,94,108,167,56,196,177,177,85,37,55,95,173,223,77,67,242,54,80,134,103,231,11,138,128,209,5,3,11,226,55,233,230,252,211,200,195,4,148,135,90,133,43,73,232,83,59,27,246,164,74,81,91,6,254,123,176,136,157,136,170,83,54,152,168,156,35,51,223,251,23,179,176,160,22,231,193,78,255,186,153,120,191,139,70,54,192,169,68,194,108,72,213,192,219,151,54,51,76,181,55,86,196,201,46,82,52,185,4,201,248,20,152,114,87,11,160,108,141,20,103,242,184,66,120,87,201,172,88,162,244,216,52,223,201,171,28,14,200,50,107,197,237,49,223,229,163,188,128,211,240,66,194,250,133,93,194,65,163,240,174,196,230,22,83,135,65,151,46,74,76,69,63,205,99,203,195,184,12,123,56,27,230,22,254,124,88,199,101,41,235,94,57,188,196,250,3,71,226,228,159,185,192,182,159,251,12,176,214,147,100,54,82,123,255,134,110,36,10,206,84,140,84,200,202,173,132,171,166,159,49,176,134,227,243,103,63,189,121,221,104,103,109,203,199,102,103,205,242,109,1,228,184,53,12,241,206,24,240,195,130,109,33,232,204,26,2,127,103,4,216,138,223,22,129,206,172,33,24,109,68,80,103,238,96,241,106,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,15,191,37,76,206,93,12,212,21,64,79,127,166,24,153,219,83,136,224,198,234,46,103,55,178,240,113,101,47,170,1,179,182,43,245,19,128,237,81,100,46,25,51,15,86,211,128,191,206,157,93,106,54,26,74,139,149,31,52,184,26,61,192,42,154,144,71,232,176,193,240,16,46,228,64,137,250,33,134,39,173,184,168,114,81,134,88,34,91,4,143,248,240,2,111,141,32,150,191,105,175,156,102,38,46,21,107,61,188,97,204,22,203,210,147,162,181,193,65,139,97,178,224,225,9,4,211,21,88,166,174,192,82,162,157,93,161,177,18,81,190,153,93,128,70,41,53,21,98,225,97,150,188,248,176,94,243,39,128,136,2,15,135,146,77,172,149,134,10,167,102,33,157,152,121,226,93,207,99,130,50,121,243,143,127,102,1,47,92,135,247,219,43,50,54,81,168,248,0,99,85,209,24,31,114,209,95,250,131,129,241,190,103,116,12,36,27,155,148,141,211,179,82,253,255,192,240,44,80,229,176,240,193,168,211,207,229,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,77,77,18,135,51,90,11,102,32,145,36,65,30,169,220,35,200,198,164,246,216,85,23,129,102,139,100,133,243,148,182,212,37,115,132,90,44,248,143,34,255,5,35,73,65,184,38,56,0,0 };

From c059e30763f745e447843090edd508d8221e0230 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Wed, 12 Jan 2022 23:12:45 +0000
Subject: [PATCH 02/11] Fix issue with switchers getting out of sync with the
 DOM if updated.

---
 data/js/controls.js     | 2 +-
 data/js/controls.min.js | 2 +-
 src/dataControlsJS.h    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 12b2703..84feb42 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -631,7 +631,7 @@ function padclick(type, number, isdown) {
 
 function switcher(number, state) {
   if (state == null) {
-    if ($("#s" + number).is(":checked")) {
+    if (!$("#sl" + number).hasClass("checked")) {
       websock.send("sactive:" + number);
       $("#sl" + number).addClass("checked");
     } else {
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index c8fb6d9..5dbb0f0 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -48,7 +48,7 @@ function tabclick(number){var val=$("#tab"+number).val();websock.send("tabvalue:
 function selectchange(number){var val=$("#select"+number).val();websock.send("svalue:"+val+":"+number);}
 function buttonclick(number,isdown){if(isdown)websock.send("bdown:"+number);else websock.send("bup:"+number);}
 function padclick(type,number,isdown){switch(type){case CENTER:if(isdown)websock.send("pcdown:"+number);else websock.send("pcup:"+number);break;case UP:if(isdown)websock.send("pfdown:"+number);else websock.send("pfup:"+number);break;case DOWN:if(isdown)websock.send("pbdown:"+number);else websock.send("pbup:"+number);break;case LEFT:if(isdown)websock.send("pldown:"+number);else websock.send("plup:"+number);break;case RIGHT:if(isdown)websock.send("prdown:"+number);else websock.send("prup:"+number);break;}}
-function switcher(number,state){if(state==null){if($("#s"+number).is(":checked")){websock.send("sactive:"+number);$("#sl"+number).addClass("checked");}else{websock.send("sinactive:"+number);$("#sl"+number).removeClass("checked");}}else if(state==1){$("#sl"+number).addClass("checked");$("#sl"+number).prop("checked",true);}else if(state==0){$("#sl"+number).removeClass("checked");$("#sl"+number).prop("checked",false);}}
+function switcher(number,state){if(state==null){if(!$("#sl"+number).hasClass("checked")){websock.send("sactive:"+number);$("#sl"+number).addClass("checked");}else{websock.send("sinactive:"+number);$("#sl"+number).removeClass("checked");}}else if(state==1){$("#sl"+number).addClass("checked");$("#sl"+number).prop("checked",true);}else if(state==0){$("#sl"+number).removeClass("checked");$("#sl"+number).prop("checked",false);}}
 var rangeSlider=function(isDiscrete){var range=$(".range-slider__range");var slidercb=function(){sliderchange($(this).attr("id").replace(/^\D+/g,""));};range.on({input:function(){$(this).next().html(this.value)}});range.each(function(){$(this).next().html(this.value);if($(this).attr("callbackSet")!="true"){if(!isDiscrete){$(this).on({input:slidercb});}else{$(this).on({change:slidercb});}
 $(this).attr("callbackSet","true");}});};var addToHTML=function(data){panelStyle=data.hasOwnProperty('panelStyle')?" style='"+data.panelStyle+"' ":"";elementStyle=data.hasOwnProperty('elementStyle')?" style='"+data.elementStyle+"' ":"";panelwide=data.hasOwnProperty('wide')?"wide":"";if(!data.hasOwnProperty('parentControl')||$("#tab"+data.parentControl).length>0){var parent=data.hasOwnProperty('parentControl')?$("#tab"+data.parentControl):$("#row");var html="";switch(data.type){case UI_LABEL:case UI_BUTTON:case UI_SWITCHER:case UI_CPAD:case UI_PAD:case UI_SLIDER:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GRAPH:case UI_GAUGE:case UI_ACCEL:html="
"+data.label+"

"+ diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h index 483e8f3..1c924ae 100644 --- a/src/dataControlsJS.h +++ b/src/dataControlsJS.h @@ -49,7 +49,7 @@ function tabclick(number){var val=$("#tab"+number).val();websock.send("tabvalue: function selectchange(number){var val=$("#select"+number).val();websock.send("svalue:"+val+":"+number);} function buttonclick(number,isdown){if(isdown)websock.send("bdown:"+number);else websock.send("bup:"+number);} function padclick(type,number,isdown){switch(type){case CENTER:if(isdown)websock.send("pcdown:"+number);else websock.send("pcup:"+number);break;case UP:if(isdown)websock.send("pfdown:"+number);else websock.send("pfup:"+number);break;case DOWN:if(isdown)websock.send("pbdown:"+number);else websock.send("pbup:"+number);break;case LEFT:if(isdown)websock.send("pldown:"+number);else websock.send("plup:"+number);break;case RIGHT:if(isdown)websock.send("prdown:"+number);else websock.send("prup:"+number);break;}} -function switcher(number,state){if(state==null){if($("#s"+number).is(":checked")){websock.send("sactive:"+number);$("#sl"+number).addClass("checked");}else{websock.send("sinactive:"+number);$("#sl"+number).removeClass("checked");}}else if(state==1){$("#sl"+number).addClass("checked");$("#sl"+number).prop("checked",true);}else if(state==0){$("#sl"+number).removeClass("checked");$("#sl"+number).prop("checked",false);}} +function switcher(number,state){if(state==null){if(!$("#sl"+number).hasClass("checked")){websock.send("sactive:"+number);$("#sl"+number).addClass("checked");}else{websock.send("sinactive:"+number);$("#sl"+number).removeClass("checked");}}else if(state==1){$("#sl"+number).addClass("checked");$("#sl"+number).prop("checked",true);}else if(state==0){$("#sl"+number).removeClass("checked");$("#sl"+number).prop("checked",false);}} var rangeSlider=function(isDiscrete){var range=$(".range-slider__range");var slidercb=function(){sliderchange($(this).attr("id").replace(/^\D+/g,""));};range.on({input:function(){$(this).next().html(this.value)}});range.each(function(){$(this).next().html(this.value);if($(this).attr("callbackSet")!="true"){if(!isDiscrete){$(this).on({input:slidercb});}else{$(this).on({change:slidercb});} $(this).attr("callbackSet","true");}});};var addToHTML=function(data){panelStyle=data.hasOwnProperty('panelStyle')?" style='"+data.panelStyle+"' ":"";elementStyle=data.hasOwnProperty('elementStyle')?" style='"+data.elementStyle+"' ":"";panelwide=data.hasOwnProperty('wide')?"wide":"";if(!data.hasOwnProperty('parentControl')||$("#tab"+data.parentControl).length>0){var parent=data.hasOwnProperty('parentControl')?$("#tab"+data.parentControl):$("#row");var html="";switch(data.type){case UI_LABEL:case UI_BUTTON:case UI_SWITCHER:case UI_CPAD:case UI_PAD:case UI_SLIDER:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GRAPH:case UI_GAUGE:case UI_ACCEL:html="
"+data.label+"

"+ @@ -88,4 +88,4 @@ value+"
";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3810] PROGMEM = { 31,139,8,0,242,53,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,96,65,192,21,45,58,90,218,14,7,185,10,202,170,9,206,108,42,213,179,191,15,40,79,6,169,44,184,10,21,97,0,108,103,203,234,146,118,129,165,36,165,24,161,144,187,244,47,194,150,19,181,147,113,89,122,188,114,53,63,21,218,138,176,93,192,241,52,91,37,101,89,100,214,74,110,173,142,100,105,62,5,114,237,204,175,201,95,180,168,188,172,93,214,196,142,61,70,23,205,28,81,43,196,74,164,101,94,6,55,65,184,8,12,90,229,163,209,28,134,96,166,56,63,151,123,178,34,4,239,143,108,173,145,255,252,185,124,115,168,87,6,217,13,45,202,83,249,13,188,86,13,145,19,16,95,83,130,58,172,64,3,217,128,114,14,170,109,107,7,10,164,52,12,140,222,201,96,199,204,129,236,234,241,158,226,1,239,226,137,199,172,101,39,40,89,127,78,80,100,55,78,16,88,251,77,60,201,110,91,185,45,144,100,69,107,206,99,86,148,150,37,47,145,193,115,89,148,219,11,151,144,97,23,160,21,180,42,76,137,143,3,219,132,104,45,142,229,30,77,91,48,95,59,224,103,244,21,62,65,66,66,104,73,82,73,71,120,30,242,181,241,141,95,41,122,98,130,52,76,103,24,53,160,181,121,126,51,22,114,178,124,64,169,165,207,72,146,56,215,196,86,202,153,106,219,135,225,99,141,23,158,174,48,191,4,121,182,184,3,56,29,119,106,214,65,99,229,203,196,199,153,91,102,5,254,98,75,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,141,11,167,160,201,236,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,86,34,217,235,170,151,140,225,164,195,182,31,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,229,17,122,248,84,115,19,242,110,138,210,72,97,69,148,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,53,170,245,162,183,80,95,52,90,39,154,150,19,215,139,246,183,16,237,175,19,141,21,192,245,178,227,45,100,199,5,178,181,86,176,8,164,185,225,19,72,14,8,58,26,254,178,249,55,2,240,140,46,158,121,183,7,39,120,11,70,186,55,180,27,153,239,159,36,14,136,191,37,202,212,249,99,75,105,124,10,33,122,111,86,72,242,130,71,101,233,61,254,76,28,202,51,178,181,52,179,8,122,19,140,60,79,4,215,124,246,94,212,31,115,178,27,171,178,215,192,122,68,188,40,75,178,15,86,148,2,99,214,57,245,146,99,47,113,99,146,242,122,23,50,217,107,239,55,229,155,35,119,100,43,247,156,118,207,232,55,23,132,47,116,1,145,239,184,196,170,255,231,183,227,74,253,186,106,226,85,198,138,158,88,204,197,42,69,107,245,230,212,174,68,74,225,97,228,114,201,75,166,235,174,220,117,3,219,232,128,42,64,215,241,253,145,227,222,92,16,136,249,246,109,147,90,197,100,31,70,168,234,17,131,50,180,66,17,75,225,111,42,11,211,133,198,179,183,126,222,42,159,181,189,92,138,78,183,204,187,51,61,99,2,254,144,5,124,246,163,17,228,59,211,192,88,145,22,237,114,209,98,133,214,237,90,166,217,86,67,104,123,139,208,124,69,166,250,90,74,197,137,22,176,248,98,145,244,13,21,69,255,34,63,85,247,154,229,40,245,172,82,249,251,119,121,19,23,84,197,120,31,245,168,161,213,199,182,145,251,110,147,216,172,203,207,62,66,0,159,218,252,133,128,222,52,213,210,42,165,225,183,182,85,151,107,30,236,222,124,197,250,82,113,43,150,229,69,108,41,178,92,175,228,26,104,201,138,234,47,134,75,15,32,187,148,46,66,250,97,225,124,22,36,130,131,154,145,50,56,241,216,72,217,39,20,180,40,92,28,67,99,31,96,250,90,52,22,88,129,216,60,172,3,233,112,26,215,105,229,152,187,148,44,59,161,122,171,171,37,154,170,150,255,97,149,25,251,11,185,210,87,214,118,222,101,189,9,251,38,11,69,138,133,211,182,8,204,182,97,21,58,146,229,158,94,108,167,56,196,177,177,85,37,55,95,173,223,77,67,242,54,80,134,103,231,11,138,128,209,5,3,11,226,55,233,230,252,211,200,195,4,148,135,90,133,43,73,232,83,59,27,246,164,74,81,91,6,254,123,176,136,157,136,170,83,54,152,168,156,35,51,223,251,23,179,176,160,22,231,193,78,255,186,153,120,191,139,70,54,192,169,68,194,108,72,213,192,219,151,54,51,76,181,55,86,196,201,46,82,52,185,4,201,248,20,152,114,87,11,160,108,141,20,103,242,184,66,120,87,201,172,88,162,244,216,52,223,201,171,28,14,200,50,107,197,237,49,223,229,163,188,128,211,240,66,194,250,133,93,194,65,163,240,174,196,230,22,83,135,65,151,46,74,76,69,63,205,99,203,195,184,12,123,56,27,230,22,254,124,88,199,101,41,235,94,57,188,196,250,3,71,226,228,159,185,192,182,159,251,12,176,214,147,100,54,82,123,255,134,110,36,10,206,84,140,84,200,202,173,132,171,166,159,49,176,134,227,243,103,63,189,121,221,104,103,109,203,199,102,103,205,242,109,1,228,184,53,12,241,206,24,240,195,130,109,33,232,204,26,2,127,103,4,216,138,223,22,129,206,172,33,24,109,68,80,103,238,96,241,106,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,15,191,37,76,206,93,12,212,21,64,79,127,166,24,153,219,83,136,224,198,234,46,103,55,178,240,113,101,47,170,1,179,182,43,245,19,128,237,81,100,46,25,51,15,86,211,128,191,206,157,93,106,54,26,74,139,149,31,52,184,26,61,192,42,154,144,71,232,176,193,240,16,46,228,64,137,250,33,134,39,173,184,168,114,81,134,88,34,91,4,143,248,240,2,111,141,32,150,191,105,175,156,102,38,46,21,107,61,188,97,204,22,203,210,147,162,181,193,65,139,97,178,224,225,9,4,211,21,88,166,174,192,82,162,157,93,161,177,18,81,190,153,93,128,70,41,53,21,98,225,97,150,188,248,176,94,243,39,128,136,2,15,135,146,77,172,149,134,10,167,102,33,157,152,121,226,93,207,99,130,50,121,243,143,127,102,1,47,92,135,247,219,43,50,54,81,168,248,0,99,85,209,24,31,114,209,95,250,131,129,241,190,103,116,12,36,27,155,148,141,211,179,82,253,255,192,240,44,80,229,176,240,193,168,211,207,229,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,77,77,18,135,51,90,11,102,32,145,36,65,30,169,220,35,200,198,164,246,216,85,23,129,102,139,100,133,243,148,182,212,37,115,132,90,44,248,143,34,255,5,35,73,65,184,38,56,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3809] PROGMEM = { 31,139,8,0,184,95,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,96,65,192,21,45,58,90,218,14,7,185,10,202,170,9,206,108,42,213,179,191,15,40,79,6,169,44,184,10,21,97,0,108,103,203,234,146,118,129,165,36,165,24,161,144,187,244,47,194,150,19,181,147,113,89,122,188,114,53,63,21,218,138,176,93,192,241,52,91,37,101,89,100,214,74,110,173,142,100,105,62,5,114,237,204,175,201,95,180,168,188,172,93,214,196,142,61,70,23,205,28,81,43,196,74,164,101,94,6,55,65,184,8,12,90,229,163,209,28,134,96,166,56,63,151,123,178,34,4,239,143,108,173,145,255,252,185,124,115,168,87,6,217,13,45,202,83,249,13,188,86,13,145,19,16,95,83,130,58,172,64,3,217,128,114,14,170,109,107,7,10,164,52,12,140,222,201,96,199,204,129,236,234,241,158,226,1,239,226,137,199,172,101,39,40,89,127,78,80,100,55,78,16,88,251,77,60,201,110,91,185,45,144,100,69,107,206,99,86,148,150,37,47,145,193,115,89,148,219,11,151,144,97,23,160,21,180,42,76,137,143,3,219,132,104,45,142,229,30,77,91,48,95,59,224,103,244,21,62,65,66,66,104,73,82,73,71,120,30,242,181,241,141,95,41,122,98,130,52,76,103,24,53,160,181,121,126,51,22,114,178,124,64,169,165,207,72,146,56,215,196,86,202,153,106,219,135,225,99,141,23,158,174,48,191,4,121,182,184,3,56,29,119,106,214,65,99,229,203,196,199,153,91,102,5,254,98,75,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,141,11,167,160,201,236,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,86,34,217,235,170,151,140,225,164,195,182,31,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,229,17,122,248,84,115,19,242,110,138,210,72,97,69,148,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,53,170,245,162,183,80,95,52,90,39,154,150,19,215,139,246,183,16,237,175,19,141,21,192,245,178,227,45,100,199,5,178,181,86,176,8,164,185,225,19,72,14,8,58,26,254,178,249,55,2,180,68,146,63,120,224,14,20,173,203,41,113,111,104,83,50,223,70,73,28,152,229,150,40,8,242,66,148,254,167,16,162,183,104,133,36,47,120,84,150,222,234,207,196,161,60,35,91,82,51,11,164,55,193,200,243,68,112,219,103,239,69,25,50,39,187,177,42,123,13,172,71,196,139,234,36,251,110,69,169,51,102,13,84,47,57,246,18,55,38,41,47,123,33,147,189,246,154,83,62,61,114,71,182,114,221,105,215,141,126,129,65,20,67,23,16,249,142,75,172,250,127,126,59,174,212,175,171,38,222,104,172,246,137,53,93,44,86,180,86,47,80,237,102,164,20,30,77,46,151,188,114,186,238,230,93,55,144,198,95,58,64,215,241,253,145,227,222,92,16,8,253,246,109,147,90,197,100,254,170,170,71,12,202,208,10,69,44,133,191,169,44,76,23,26,207,222,250,121,171,124,214,246,114,41,26,222,50,253,206,244,140,121,248,67,22,247,217,143,6,146,239,76,3,67,70,90,187,203,5,141,21,90,190,107,153,102,91,141,164,237,45,34,244,21,153,234,107,41,21,39,90,192,226,139,69,210,55,84,20,253,139,252,84,221,107,150,163,148,181,74,229,239,223,229,133,92,80,28,227,237,212,163,134,86,38,219,70,238,187,77,98,179,102,63,251,22,1,124,106,243,135,2,122,239,84,203,174,148,190,223,218,142,93,174,135,176,123,15,22,203,76,197,29,89,150,30,177,165,200,170,189,146,114,160,37,43,170,191,24,46,61,128,236,82,186,8,233,247,133,243,89,144,8,14,106,70,202,224,196,99,35,101,95,82,208,218,112,113,40,141,237,128,233,107,209,95,96,117,98,243,176,14,164,195,105,92,167,5,100,238,82,178,250,132,234,173,174,86,106,170,90,26,136,197,102,108,51,228,42,96,89,247,121,151,245,38,236,211,44,20,41,22,78,187,35,48,219,134,85,232,72,150,123,122,205,157,226,16,199,198,86,5,221,124,209,126,55,13,201,219,64,25,158,157,47,40,2,70,23,12,44,8,227,164,155,243,47,36,15,19,80,30,106,21,174,36,161,79,237,108,216,147,42,69,109,25,248,239,193,34,118,34,170,78,217,103,162,114,142,204,252,39,0,98,22,22,219,226,60,216,240,95,55,19,111,123,209,0,7,56,149,128,152,13,169,26,120,251,210,158,134,169,182,200,138,56,217,69,138,38,151,32,25,159,2,83,238,106,1,148,173,145,226,76,30,87,8,111,46,153,21,75,84,32,155,230,59,121,149,195,1,89,102,29,185,61,230,187,124,148,23,112,26,94,72,88,198,176,75,56,104,20,222,149,216,220,98,234,48,232,210,69,137,169,232,23,122,108,121,24,158,97,43,103,195,220,194,159,15,235,184,44,101,221,43,135,151,88,127,224,72,156,252,107,23,216,246,115,159,1,214,90,147,204,70,234,39,0,134,110,36,10,206,84,140,84,200,202,173,132,171,166,95,51,176,190,227,243,103,63,189,121,221,104,103,221,203,199,102,103,61,243,109,1,228,184,53,12,241,206,24,240,251,130,109,33,232,204,26,2,127,103,4,216,145,223,22,129,206,172,33,24,109,68,80,103,238,96,241,162,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,29,191,37,76,206,93,12,212,21,64,79,127,166,24,153,219,83,136,224,198,234,46,103,55,178,240,113,101,47,170,1,179,182,43,245,19,128,237,81,100,46,25,51,15,86,211,128,191,206,157,93,106,54,26,74,167,149,31,52,184,26,61,192,42,154,144,71,232,176,193,240,16,46,228,64,137,250,33,134,39,173,184,168,114,81,134,88,34,91,4,143,248,240,2,111,141,32,150,191,105,175,156,102,38,46,21,75,62,188,111,204,22,203,210,147,162,181,193,65,139,97,178,224,225,9,4,211,21,88,166,174,192,82,162,157,93,161,177,74,81,190,167,93,128,70,169,56,21,98,225,97,150,188,248,176,108,243,39,128,136,58,15,135,146,77,172,85,136,10,167,102,33,157,152,121,226,93,207,99,130,50,121,15,144,127,109,1,47,92,135,183,221,43,50,54,81,168,248,0,99,85,209,24,31,114,209,95,250,131,129,241,190,103,116,12,36,27,155,148,141,211,179,138,253,255,192,240,44,80,229,176,240,193,168,211,175,230,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,189,77,18,135,51,90,18,102,32,145,36,65,30,169,220,35,200,198,164,246,216,85,23,129,102,139,100,133,243,148,118,214,37,115,132,90,44,248,255,34,255,5,24,169,5,77,45,56,0,0 };

From dd0fe3165f0bd21e4b7986122534ea24e57ecc31 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Wed, 12 Jan 2022 23:53:55 +0000
Subject: [PATCH 03/11] Fix bug with updating slider values programatically

---
 data/js/controls.js     | 1 +
 data/js/controls.min.js | 3 ++-
 src/dataControlsJS.h    | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 84feb42..34e522d 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -500,6 +500,7 @@ function start() {
         break;
 
       case UPDATE_SLIDER:
+        $("#sl" + data.id).attr("value", data.value)
         slider_move($("#id" + data.id), data.value, "100", false);
         if(data.hasOwnProperty('elementStyle')) {
           $("#sl" + data.id).attr("style", data.elementStyle);
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index 5dbb0f0..24a4a13 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -32,7 +32,8 @@ break;case UI_GRAPH:if(data.visible){addToHTML(data);graphData[data.id]=restoreG
 break;case ADD_GRAPH_POINT:var ts=Math.round(new Date().getTime()/1000);graphData[data.id].push({x:ts,y:data.value});saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case CLEAR_GRAPH:graphData[data.id]=[];saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case UI_ACCEL:if(hasAccel)break;hasAccel=true;if(data.visible){addToHTML(data);requestOrientationPermission();}
 break;case UPDATE_LABEL:$("#l"+data.id).html(data.value);if(data.hasOwnProperty('elementStyle')){$("#l"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_SWITCHER:switcher(data.id,data.value=="0"?0:1);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
-break;case UPDATE_SLIDER:slider_move($("#id"+data.id),data.value,"100",false);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
+break;case UPDATE_SLIDER:$("#sl"+data.id).attr("value",data.value)
+slider_move($("#id"+data.id),data.value,"100",false);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_NUMBER:$("#num"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#num"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_TEXT_INPUT:$("#text"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#text"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_SELECT:$("#select"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#select"+data.id).attr("style",data.elementStyle);}
diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h
index 1c924ae..4549c46 100644
--- a/src/dataControlsJS.h
+++ b/src/dataControlsJS.h
@@ -33,7 +33,8 @@ break;case UI_GRAPH:if(data.visible){addToHTML(data);graphData[data.id]=restoreG
 break;case ADD_GRAPH_POINT:var ts=Math.round(new Date().getTime()/1000);graphData[data.id].push({x:ts,y:data.value});saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case CLEAR_GRAPH:graphData[data.id]=[];saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case UI_ACCEL:if(hasAccel)break;hasAccel=true;if(data.visible){addToHTML(data);requestOrientationPermission();}
 break;case UPDATE_LABEL:$("#l"+data.id).html(data.value);if(data.hasOwnProperty('elementStyle')){$("#l"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_SWITCHER:switcher(data.id,data.value=="0"?0:1);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
-break;case UPDATE_SLIDER:slider_move($("#id"+data.id),data.value,"100",false);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
+break;case UPDATE_SLIDER:$("#sl"+data.id).attr("value",data.value)
+slider_move($("#id"+data.id),data.value,"100",false);if(data.hasOwnProperty('elementStyle')){$("#sl"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_NUMBER:$("#num"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#num"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_TEXT_INPUT:$("#text"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#text"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_SELECT:$("#select"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#select"+data.id).attr("style",data.elementStyle);}
@@ -88,4 +89,4 @@ value+"
";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3809] PROGMEM = { 31,139,8,0,184,95,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,96,65,192,21,45,58,90,218,14,7,185,10,202,170,9,206,108,42,213,179,191,15,40,79,6,169,44,184,10,21,97,0,108,103,203,234,146,118,129,165,36,165,24,161,144,187,244,47,194,150,19,181,147,113,89,122,188,114,53,63,21,218,138,176,93,192,241,52,91,37,101,89,100,214,74,110,173,142,100,105,62,5,114,237,204,175,201,95,180,168,188,172,93,214,196,142,61,70,23,205,28,81,43,196,74,164,101,94,6,55,65,184,8,12,90,229,163,209,28,134,96,166,56,63,151,123,178,34,4,239,143,108,173,145,255,252,185,124,115,168,87,6,217,13,45,202,83,249,13,188,86,13,145,19,16,95,83,130,58,172,64,3,217,128,114,14,170,109,107,7,10,164,52,12,140,222,201,96,199,204,129,236,234,241,158,226,1,239,226,137,199,172,101,39,40,89,127,78,80,100,55,78,16,88,251,77,60,201,110,91,185,45,144,100,69,107,206,99,86,148,150,37,47,145,193,115,89,148,219,11,151,144,97,23,160,21,180,42,76,137,143,3,219,132,104,45,142,229,30,77,91,48,95,59,224,103,244,21,62,65,66,66,104,73,82,73,71,120,30,242,181,241,141,95,41,122,98,130,52,76,103,24,53,160,181,121,126,51,22,114,178,124,64,169,165,207,72,146,56,215,196,86,202,153,106,219,135,225,99,141,23,158,174,48,191,4,121,182,184,3,56,29,119,106,214,65,99,229,203,196,199,153,91,102,5,254,98,75,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,141,11,167,160,201,236,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,86,34,217,235,170,151,140,225,164,195,182,31,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,229,17,122,248,84,115,19,242,110,138,210,72,97,69,148,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,53,170,245,162,183,80,95,52,90,39,154,150,19,215,139,246,183,16,237,175,19,141,21,192,245,178,227,45,100,199,5,178,181,86,176,8,164,185,225,19,72,14,8,58,26,254,178,249,55,2,180,68,146,63,120,224,14,20,173,203,41,113,111,104,83,50,223,70,73,28,152,229,150,40,8,242,66,148,254,167,16,162,183,104,133,36,47,120,84,150,222,234,207,196,161,60,35,91,82,51,11,164,55,193,200,243,68,112,219,103,239,69,25,50,39,187,177,42,123,13,172,71,196,139,234,36,251,110,69,169,51,102,13,84,47,57,246,18,55,38,41,47,123,33,147,189,246,154,83,62,61,114,71,182,114,221,105,215,141,126,129,65,20,67,23,16,249,142,75,172,250,127,126,59,174,212,175,171,38,222,104,172,246,137,53,93,44,86,180,86,47,80,237,102,164,20,30,77,46,151,188,114,186,238,230,93,55,144,198,95,58,64,215,241,253,145,227,222,92,16,8,253,246,109,147,90,197,100,254,170,170,71,12,202,208,10,69,44,133,191,169,44,76,23,26,207,222,250,121,171,124,214,246,114,41,26,222,50,253,206,244,140,121,248,67,22,247,217,143,6,146,239,76,3,67,70,90,187,203,5,141,21,90,190,107,153,102,91,141,164,237,45,34,244,21,153,234,107,41,21,39,90,192,226,139,69,210,55,84,20,253,139,252,84,221,107,150,163,148,181,74,229,239,223,229,133,92,80,28,227,237,212,163,134,86,38,219,70,238,187,77,98,179,102,63,251,22,1,124,106,243,135,2,122,239,84,203,174,148,190,223,218,142,93,174,135,176,123,15,22,203,76,197,29,89,150,30,177,165,200,170,189,146,114,160,37,43,170,191,24,46,61,128,236,82,186,8,233,247,133,243,89,144,8,14,106,70,202,224,196,99,35,101,95,82,208,218,112,113,40,141,237,128,233,107,209,95,96,117,98,243,176,14,164,195,105,92,167,5,100,238,82,178,250,132,234,173,174,86,106,170,90,26,136,197,102,108,51,228,42,96,89,247,121,151,245,38,236,211,44,20,41,22,78,187,35,48,219,134,85,232,72,150,123,122,205,157,226,16,199,198,86,5,221,124,209,126,55,13,201,219,64,25,158,157,47,40,2,70,23,12,44,8,227,164,155,243,47,36,15,19,80,30,106,21,174,36,161,79,237,108,216,147,42,69,109,25,248,239,193,34,118,34,170,78,217,103,162,114,142,204,252,39,0,98,22,22,219,226,60,216,240,95,55,19,111,123,209,0,7,56,149,128,152,13,169,26,120,251,210,158,134,169,182,200,138,56,217,69,138,38,151,32,25,159,2,83,238,106,1,148,173,145,226,76,30,87,8,111,46,153,21,75,84,32,155,230,59,121,149,195,1,89,102,29,185,61,230,187,124,148,23,112,26,94,72,88,198,176,75,56,104,20,222,149,216,220,98,234,48,232,210,69,137,169,232,23,122,108,121,24,158,97,43,103,195,220,194,159,15,235,184,44,101,221,43,135,151,88,127,224,72,156,252,107,23,216,246,115,159,1,214,90,147,204,70,234,39,0,134,110,36,10,206,84,140,84,200,202,173,132,171,166,95,51,176,190,227,243,103,63,189,121,221,104,103,221,203,199,102,103,61,243,109,1,228,184,53,12,241,206,24,240,251,130,109,33,232,204,26,2,127,103,4,216,145,223,22,129,206,172,33,24,109,68,80,103,238,96,241,162,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,29,191,37,76,206,93,12,212,21,64,79,127,166,24,153,219,83,136,224,198,234,46,103,55,178,240,113,101,47,170,1,179,182,43,245,19,128,237,81,100,46,25,51,15,86,211,128,191,206,157,93,106,54,26,74,167,149,31,52,184,26,61,192,42,154,144,71,232,176,193,240,16,46,228,64,137,250,33,134,39,173,184,168,114,81,134,88,34,91,4,143,248,240,2,111,141,32,150,191,105,175,156,102,38,46,21,75,62,188,111,204,22,203,210,147,162,181,193,65,139,97,178,224,225,9,4,211,21,88,166,174,192,82,162,157,93,161,177,74,81,190,167,93,128,70,169,56,21,98,225,97,150,188,248,176,108,243,39,128,136,58,15,135,146,77,172,85,136,10,167,102,33,157,152,121,226,93,207,99,130,50,121,15,144,127,109,1,47,92,135,183,221,43,50,54,81,168,248,0,99,85,209,24,31,114,209,95,250,131,129,241,190,103,116,12,36,27,155,148,141,211,179,138,253,255,192,240,44,80,229,176,240,193,168,211,175,230,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,189,77,18,135,51,90,18,102,32,145,36,65,30,169,220,35,200,198,164,246,216,85,23,129,102,139,100,133,243,148,118,214,37,115,132,90,44,248,255,34,255,5,24,169,5,77,45,56,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3819] PROGMEM = { 31,139,8,0,27,104,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,88,35,11,161,105,59,117,143,133,11,87,180,60,105,105,103,1,140,82,24,171,38,184,189,169,212,217,254,190,37,241,180,145,202,130,75,83,17,6,192,118,246,1,93,210,46,176,148,244,21,99,25,114,151,254,69,216,114,162,118,114,3,150,72,175,92,226,79,133,182,34,108,23,112,60,33,87,73,89,190,153,53,157,91,171,35,89,65,128,2,185,118,230,215,228,47,90,84,94,214,46,107,98,7,36,163,139,182,143,168,42,98,205,210,50,47,131,155,32,92,4,6,173,7,210,184,15,131,53,83,156,180,203,61,89,59,130,247,71,182,214,242,127,254,92,190,57,212,107,136,236,46,23,133,172,252,6,94,171,134,200,9,136,175,41,65,29,86,160,129,108,64,57,7,213,182,181,163,7,146,31,6,70,239,121,176,99,230,64,246,255,120,247,241,128,247,251,196,99,214,220,19,148,172,147,39,40,178,111,39,8,172,81,39,158,100,95,174,220,22,72,178,242,54,231,49,43,74,115,147,23,211,224,185,44,10,243,133,75,200,176,11,208,10,90,21,166,196,199,129,109,66,180,22,199,114,143,38,56,152,217,29,240,51,250,10,159,32,117,33,180,120,169,36,46,60,99,249,218,248,198,47,31,61,133,97,167,62,77,124,24,53,160,85,124,126,135,22,114,178,204,65,169,186,207,72,146,56,215,196,86,10,159,106,131,136,225,99,45,26,158,216,48,191,4,121,182,184,3,56,29,119,106,214,107,99,133,206,196,199,153,91,102,5,254,98,243,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,162,11,167,160,105,239,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,214,44,217,235,170,151,140,225,164,195,6,33,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,133,20,122,248,84,115,19,242,190,139,210,114,97,229,150,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,213,172,245,162,183,80,95,52,90,39,154,22,30,215,139,246,183,16,237,175,19,141,181,194,245,178,227,45,100,199,5,178,181,166,177,8,185,185,225,19,72,35,8,58,26,254,178,249,215,4,180,152,146,63,120,224,14,20,77,206,41,113,111,104,251,50,223,112,73,28,152,229,150,40,8,242,66,148,78,169,16,162,55,115,133,36,47,120,84,150,254,81,64,38,14,229,25,217,146,154,89,32,189,9,70,158,39,130,219,62,123,47,10,150,57,217,141,85,217,107,96,61,34,94,212,49,217,23,46,74,69,50,107,181,122,201,177,151,184,49,73,121,129,12,153,236,181,215,156,242,145,146,59,178,149,235,78,187,110,244,11,12,162,24,186,128,200,119,92,98,213,255,243,219,113,165,126,93,53,241,70,99,85,82,172,254,98,89,163,181,122,129,106,55,35,165,240,104,114,185,228,53,214,117,55,239,186,129,52,254,210,1,186,142,239,143,28,247,230,130,64,232,183,111,155,212,42,38,243,87,85,61,98,80,134,86,40,98,41,252,77,101,97,186,208,120,246,214,207,91,229,179,182,151,75,209,26,151,137,122,166,103,204,216,31,178,184,207,126,52,144,124,103,26,24,50,210,42,95,46,104,172,208,66,95,203,52,219,106,36,109,111,17,161,175,200,84,95,75,169,56,209,2,22,95,44,146,190,161,162,232,95,228,167,234,94,179,28,165,0,86,42,127,255,46,47,228,130,50,26,111,188,30,53,180,130,218,54,114,223,109,18,155,125,22,192,190,90,0,159,218,252,73,129,222,101,213,178,43,165,67,184,182,183,151,235,54,236,222,173,197,130,84,113,239,150,165,71,108,41,178,190,175,164,28,104,201,138,234,47,134,75,15,32,187,148,46,66,250,37,226,124,22,36,130,131,154,145,50,56,241,216,72,217,55,23,180,138,92,28,74,99,227,96,250,90,116,34,88,69,217,60,172,3,233,112,26,215,105,169,153,187,148,172,83,161,122,171,171,53,157,170,150,6,98,89,26,27,18,185,90,89,214,167,222,101,189,9,251,136,11,69,138,133,211,62,10,204,182,97,21,58,146,229,158,94,157,167,56,196,177,177,85,233,55,95,222,223,77,67,242,54,80,134,103,231,11,138,128,209,5,3,11,194,56,233,230,252,91,202,195,4,148,135,90,133,43,73,232,83,59,27,246,164,74,81,91,6,254,123,176,136,157,136,170,83,118,164,168,156,35,51,255,177,128,152,133,197,182,56,15,126,26,176,110,38,222,32,163,1,14,112,42,1,49,27,82,53,240,246,165,221,15,83,109,166,21,113,178,139,20,77,46,65,50,62,5,166,220,213,2,40,91,35,197,153,60,174,16,222,134,50,43,150,168,85,54,205,119,242,42,135,3,178,204,122,119,123,204,119,249,40,47,224,52,188,144,176,140,97,151,112,208,40,188,43,177,185,197,212,97,208,165,139,18,83,209,111,249,216,242,48,60,195,166,207,134,185,133,63,31,214,113,89,202,186,87,14,47,177,254,192,145,56,249,119,49,176,237,231,62,3,172,53,49,153,141,212,143,5,12,221,72,20,156,169,24,169,144,149,91,9,87,77,191,123,96,29,202,231,207,126,122,243,186,209,206,250,156,143,205,206,186,235,219,2,200,113,107,24,226,157,49,224,151,8,219,66,208,153,53,4,254,206,8,176,119,191,45,2,157,89,67,48,218,136,160,206,220,193,226,69,43,230,76,239,76,64,149,57,206,196,139,103,165,53,40,121,227,126,75,152,156,187,24,168,43,128,158,254,76,49,50,183,167,16,193,141,213,93,206,110,100,225,227,202,94,84,3,102,109,87,234,39,0,219,163,200,92,50,102,30,172,166,1,127,157,59,187,212,108,52,148,158,44,63,104,112,53,122,128,85,52,33,143,208,97,131,225,33,92,200,129,18,245,67,12,79,90,113,81,229,162,12,177,68,182,8,30,241,225,5,222,26,65,44,127,211,94,57,205,76,92,42,150,124,120,135,153,45,150,165,39,69,107,131,131,22,195,100,193,195,19,8,166,43,176,76,93,129,165,68,59,187,66,99,149,162,124,247,187,0,141,82,113,42,196,194,195,44,121,241,97,217,230,79,0,17,117,30,14,37,155,88,171,16,21,78,205,66,58,49,243,196,187,158,199,4,101,242,110,33,255,46,3,94,184,14,111,208,87,100,108,162,80,241,1,198,170,162,49,62,228,162,191,244,7,3,227,125,207,232,24,72,54,54,41,27,167,103,21,251,255,129,225,89,160,202,97,225,131,81,167,223,215,195,206,154,69,76,183,100,108,76,224,22,187,223,87,55,164,67,187,160,36,14,103,180,36,204,64,34,73,130,60,82,185,71,144,141,73,237,177,171,46,2,205,22,201,10,231,41,237,193,75,230,8,181,88,240,63,75,254,11,213,162,242,140,87,56,0,0 };

From a9460c8c694c1988459365e3ad6ad88f2bfcace9 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Thu, 13 Jan 2022 17:26:00 +0000
Subject: [PATCH 04/11] Allow runtime updates to button controls.

---
 data/js/controls.js     | 6 ++++++
 data/js/controls.min.js | 3 ++-
 src/dataControlsJS.h    | 5 +++--
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 34e522d..1cdc764 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -529,6 +529,12 @@ function start() {
         break;
 
       case UPDATE_BUTTON:
+        $("#btn" + data.id).val(data.value);
+        if(data.hasOwnProperty('elementStyle')) {
+          $("#btn" + data.id).attr("style", data.elementStyle);
+        }
+        break;
+      
       case UPDATE_PAD:
       case UPDATE_CPAD:
         break;
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index 24a4a13..caba3d4 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -37,7 +37,8 @@ slider_move($("#id"+data.id),data.value,"100",false);if(data.hasOwnProperty('ele
 break;case UPDATE_NUMBER:$("#num"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#num"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_TEXT_INPUT:$("#text"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#text"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_SELECT:$("#select"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#select"+data.id).attr("style",data.elementStyle);}
-break;case UPDATE_BUTTON:case UPDATE_PAD:case UPDATE_CPAD:break;case UPDATE_GAUGE:$("#gauge"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#gauge"+data.id).attr("style",data.elementStyle);}
+break;case UPDATE_BUTTON:$("#btn"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#btn"+data.id).attr("style",data.elementStyle);}
+break;case UPDATE_PAD:case UPDATE_CPAD:break;case UPDATE_GAUGE:$("#gauge"+data.id).val(data.value);if(data.hasOwnProperty('elementStyle')){$("#gauge"+data.id).attr("style",data.elementStyle);}
 break;case UPDATE_ACCEL:break;default:console.error("Unknown type or event");break;}
 if(data.type>=UPDATE_OFFSET&&data.type=UPDATE_OFFSET&&data.type";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3819] PROGMEM = { 31,139,8,0,27,104,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,88,35,11,161,105,59,117,143,133,11,87,180,60,105,105,103,1,140,82,24,171,38,184,189,169,212,217,254,190,37,241,180,145,202,130,75,83,17,6,192,118,246,1,93,210,46,176,148,244,21,99,25,114,151,254,69,216,114,162,118,114,3,150,72,175,92,226,79,133,182,34,108,23,112,60,33,87,73,89,190,153,53,157,91,171,35,89,65,128,2,185,118,230,215,228,47,90,84,94,214,46,107,98,7,36,163,139,182,143,168,42,98,205,210,50,47,131,155,32,92,4,6,173,7,210,184,15,131,53,83,156,180,203,61,89,59,130,247,71,182,214,242,127,254,92,190,57,212,107,136,236,46,23,133,172,252,6,94,171,134,200,9,136,175,41,65,29,86,160,129,108,64,57,7,213,182,181,163,7,146,31,6,70,239,121,176,99,230,64,246,255,120,247,241,128,247,251,196,99,214,220,19,148,172,147,39,40,178,111,39,8,172,81,39,158,100,95,174,220,22,72,178,242,54,231,49,43,74,115,147,23,211,224,185,44,10,243,133,75,200,176,11,208,10,90,21,166,196,199,129,109,66,180,22,199,114,143,38,56,152,217,29,240,51,250,10,159,32,117,33,180,120,169,36,46,60,99,249,218,248,198,47,31,61,133,97,167,62,77,124,24,53,160,85,124,126,135,22,114,178,204,65,169,186,207,72,146,56,215,196,86,10,159,106,131,136,225,99,45,26,158,216,48,191,4,121,182,184,3,56,29,119,106,214,107,99,133,206,196,199,153,91,102,5,254,98,243,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,162,11,167,160,105,239,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,214,44,217,235,170,151,140,225,164,195,6,33,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,133,20,122,248,84,115,19,242,190,139,210,114,97,229,150,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,213,172,245,162,183,80,95,52,90,39,154,22,30,215,139,246,183,16,237,175,19,141,181,194,245,178,227,45,100,199,5,178,181,166,177,8,185,185,225,19,72,35,8,58,26,254,178,249,215,4,180,152,146,63,120,224,14,20,77,206,41,113,111,104,251,50,223,112,73,28,152,229,150,40,8,242,66,148,78,169,16,162,55,115,133,36,47,120,84,150,254,81,64,38,14,229,25,217,146,154,89,32,189,9,70,158,39,130,219,62,123,47,10,150,57,217,141,85,217,107,96,61,34,94,212,49,217,23,46,74,69,50,107,181,122,201,177,151,184,49,73,121,129,12,153,236,181,215,156,242,145,146,59,178,149,235,78,187,110,244,11,12,162,24,186,128,200,119,92,98,213,255,243,219,113,165,126,93,53,241,70,99,85,82,172,254,98,89,163,181,122,129,106,55,35,165,240,104,114,185,228,53,214,117,55,239,186,129,52,254,210,1,186,142,239,143,28,247,230,130,64,232,183,111,155,212,42,38,243,87,85,61,98,80,134,86,40,98,41,252,77,101,97,186,208,120,246,214,207,91,229,179,182,151,75,209,26,151,137,122,166,103,204,216,31,178,184,207,126,52,144,124,103,26,24,50,210,42,95,46,104,172,208,66,95,203,52,219,106,36,109,111,17,161,175,200,84,95,75,169,56,209,2,22,95,44,146,190,161,162,232,95,228,167,234,94,179,28,165,0,86,42,127,255,46,47,228,130,50,26,111,188,30,53,180,130,218,54,114,223,109,18,155,125,22,192,190,90,0,159,218,252,73,129,222,101,213,178,43,165,67,184,182,183,151,235,54,236,222,173,197,130,84,113,239,150,165,71,108,41,178,190,175,164,28,104,201,138,234,47,134,75,15,32,187,148,46,66,250,37,226,124,22,36,130,131,154,145,50,56,241,216,72,217,55,23,180,138,92,28,74,99,227,96,250,90,116,34,88,69,217,60,172,3,233,112,26,215,105,169,153,187,148,172,83,161,122,171,171,53,157,170,150,6,98,89,26,27,18,185,90,89,214,167,222,101,189,9,251,136,11,69,138,133,211,62,10,204,182,97,21,58,146,229,158,94,157,167,56,196,177,177,85,233,55,95,222,223,77,67,242,54,80,134,103,231,11,138,128,209,5,3,11,194,56,233,230,252,91,202,195,4,148,135,90,133,43,73,232,83,59,27,246,164,74,81,91,6,254,123,176,136,157,136,170,83,118,164,168,156,35,51,255,177,128,152,133,197,182,56,15,126,26,176,110,38,222,32,163,1,14,112,42,1,49,27,82,53,240,246,165,221,15,83,109,166,21,113,178,139,20,77,46,65,50,62,5,166,220,213,2,40,91,35,197,153,60,174,16,222,134,50,43,150,168,85,54,205,119,242,42,135,3,178,204,122,119,123,204,119,249,40,47,224,52,188,144,176,140,97,151,112,208,40,188,43,177,185,197,212,97,208,165,139,18,83,209,111,249,216,242,48,60,195,166,207,134,185,133,63,31,214,113,89,202,186,87,14,47,177,254,192,145,56,249,119,49,176,237,231,62,3,172,53,49,153,141,212,143,5,12,221,72,20,156,169,24,169,144,149,91,9,87,77,191,123,96,29,202,231,207,126,122,243,186,209,206,250,156,143,205,206,186,235,219,2,200,113,107,24,226,157,49,224,151,8,219,66,208,153,53,4,254,206,8,176,119,191,45,2,157,89,67,48,218,136,160,206,220,193,226,69,43,230,76,239,76,64,149,57,206,196,139,103,165,53,40,121,227,126,75,152,156,187,24,168,43,128,158,254,76,49,50,183,167,16,193,141,213,93,206,110,100,225,227,202,94,84,3,102,109,87,234,39,0,219,163,200,92,50,102,30,172,166,1,127,157,59,187,212,108,52,148,158,44,63,104,112,53,122,128,85,52,33,143,208,97,131,225,33,92,200,129,18,245,67,12,79,90,113,81,229,162,12,177,68,182,8,30,241,225,5,222,26,65,44,127,211,94,57,205,76,92,42,150,124,120,135,153,45,150,165,39,69,107,131,131,22,195,100,193,195,19,8,166,43,176,76,93,129,165,68,59,187,66,99,149,162,124,247,187,0,141,82,113,42,196,194,195,44,121,241,97,217,230,79,0,17,117,30,14,37,155,88,171,16,21,78,205,66,58,49,243,196,187,158,199,4,101,242,110,33,255,46,3,94,184,14,111,208,87,100,108,162,80,241,1,198,170,162,49,62,228,162,191,244,7,3,227,125,207,232,24,72,54,54,41,27,167,103,21,251,255,129,225,89,160,202,97,225,131,81,167,223,215,195,206,154,69,76,183,100,108,76,224,22,187,223,87,55,164,67,187,160,36,14,103,180,36,204,64,34,73,130,60,82,185,71,144,141,73,237,177,171,46,2,205,22,201,10,231,41,237,193,75,230,8,181,88,240,63,75,254,11,213,162,242,140,87,56,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3827] PROGMEM = { 31,139,8,0,188,95,224,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,111,239,75,140,122,122,186,123,186,123,102,250,49,113,195,32,73,141,203,254,85,255,164,63,236,119,6,87,31,47,251,246,139,70,163,237,138,129,243,222,224,180,115,12,176,166,128,157,29,119,134,189,171,211,15,31,46,122,67,187,169,226,246,126,29,246,78,142,25,141,166,2,31,246,135,189,129,173,0,206,128,98,142,30,130,50,38,253,171,46,133,188,208,145,186,12,235,69,134,245,254,114,56,60,61,177,95,234,120,28,218,108,188,204,48,7,157,247,32,196,43,29,145,1,155,141,87,25,222,197,151,254,176,251,169,119,110,191,214,81,37,188,217,120,173,96,15,250,199,0,123,147,195,101,208,102,227,77,134,121,114,249,249,61,192,126,212,49,57,180,217,248,81,81,23,232,17,12,114,118,57,180,223,234,216,202,72,179,241,54,155,241,241,188,115,246,201,254,137,3,58,199,199,12,114,117,118,218,63,161,168,124,160,59,232,117,206,57,114,179,241,147,194,177,243,222,110,230,12,194,96,138,65,46,122,131,94,23,168,229,108,34,192,77,197,42,167,103,195,62,213,127,206,44,2,220,84,204,242,185,15,128,156,85,16,214,84,108,242,185,243,171,221,204,217,3,97,77,213,20,195,222,153,221,204,91,2,129,77,197,14,31,59,151,31,123,118,51,103,7,14,109,42,102,232,116,187,212,55,114,38,224,208,230,91,85,49,103,157,243,206,240,20,204,248,83,94,55,114,68,25,146,59,225,248,244,203,137,220,7,131,222,135,161,244,247,243,254,199,79,67,233,213,221,222,201,16,156,68,40,164,123,53,188,60,255,215,229,105,255,162,39,73,117,175,122,159,123,231,157,65,182,175,186,87,103,61,152,117,222,255,5,166,190,144,192,47,189,97,231,226,236,83,103,160,144,191,186,184,60,249,48,56,253,162,241,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,18,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,71,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,135,38,243,192,77,189,48,48,220,208,15,227,174,239,36,137,133,63,251,227,242,3,255,97,159,204,103,35,18,75,120,59,89,120,169,59,85,240,156,132,168,58,107,197,36,157,199,129,9,255,252,62,15,189,132,152,109,142,194,85,40,16,200,140,196,142,63,150,195,153,62,5,70,68,82,18,199,222,45,137,37,82,166,95,129,180,32,169,147,68,83,199,79,37,146,212,183,192,73,230,193,196,15,23,10,29,166,126,49,238,58,113,28,102,243,133,41,196,176,227,123,127,56,177,23,72,4,106,9,49,56,118,226,27,179,61,38,19,103,238,167,2,104,182,151,203,61,170,249,5,25,37,161,123,211,86,126,131,25,2,226,166,100,156,183,66,76,126,159,147,36,61,141,61,18,164,14,5,157,145,120,230,37,9,252,178,202,15,203,61,137,153,56,183,228,163,112,0,24,242,67,215,241,47,210,48,118,174,73,45,33,105,63,37,51,203,36,73,52,247,208,79,18,179,250,207,139,211,147,90,146,194,42,174,189,201,189,37,221,167,92,110,43,132,99,224,31,198,10,109,15,44,140,30,4,28,199,232,110,26,175,235,66,94,25,241,182,55,177,228,212,125,59,152,251,126,249,33,163,133,66,69,78,156,144,12,171,220,102,58,204,88,126,245,198,223,64,72,6,254,250,45,47,175,19,167,160,130,31,172,113,232,206,103,160,185,114,205,25,143,45,243,31,102,185,22,78,38,176,41,126,176,204,103,113,184,128,239,105,58,243,45,211,44,183,185,41,106,174,31,2,111,112,106,70,69,37,13,187,238,2,172,48,79,122,224,27,49,112,88,99,62,74,93,226,2,143,152,204,194,91,194,54,147,137,187,228,224,58,38,36,48,203,43,168,32,167,134,23,147,113,1,22,19,26,165,48,234,198,73,104,112,9,168,144,207,159,189,125,243,242,117,187,96,86,182,116,13,26,88,15,174,239,185,55,45,174,185,234,82,91,244,212,9,198,62,249,197,75,188,145,231,123,233,125,23,0,215,160,160,7,176,227,126,94,1,207,159,239,11,157,215,166,222,120,76,130,242,131,52,8,221,0,153,191,114,35,73,116,88,121,239,22,126,12,188,36,37,1,28,47,230,173,228,233,34,79,179,90,44,75,21,181,142,142,181,240,130,113,184,168,81,135,164,92,106,81,24,167,251,182,105,126,255,94,60,242,182,177,110,228,213,171,151,210,190,120,158,126,33,163,11,248,77,82,203,92,36,173,122,221,172,228,39,78,195,36,13,156,25,169,152,173,213,65,74,181,98,214,23,160,242,246,146,128,188,59,19,231,52,246,132,195,134,65,24,145,192,22,154,181,200,109,74,143,234,32,9,125,2,243,175,129,36,195,52,40,222,22,62,183,206,55,83,114,7,242,73,91,103,123,38,243,255,52,158,147,246,178,157,137,134,187,105,27,217,16,17,72,230,247,152,70,141,80,216,6,106,20,80,68,129,221,129,212,119,208,197,30,163,64,209,199,185,195,8,6,106,99,60,139,232,40,177,165,223,142,194,241,61,194,92,248,34,49,56,155,184,15,41,122,45,189,143,8,191,17,245,160,191,85,112,6,81,80,234,140,146,192,185,45,2,131,160,176,53,82,117,8,124,30,217,228,175,115,56,82,243,23,124,33,30,248,17,194,41,233,56,244,147,218,36,140,123,14,8,79,124,66,151,103,31,225,89,15,55,217,29,83,221,3,69,111,229,174,14,142,92,174,46,219,138,154,45,57,11,108,144,137,154,134,169,227,11,126,71,150,206,222,39,193,117,58,61,104,150,229,230,131,203,43,128,179,123,238,133,55,176,173,214,162,195,66,70,49,113,110,218,66,213,89,106,212,250,255,174,144,233,157,30,119,176,165,201,93,101,167,21,111,51,127,85,7,44,149,108,229,207,146,152,248,161,51,134,157,161,99,99,210,216,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,169,94,75,124,177,188,75,126,102,137,149,4,177,188,70,126,98,130,160,12,242,192,190,37,180,140,215,131,79,202,112,124,13,195,79,195,207,3,139,237,79,93,8,150,152,174,76,122,200,207,162,139,27,165,129,89,65,52,136,113,240,98,76,195,185,59,69,221,183,178,51,163,252,64,106,81,76,168,217,143,89,140,71,85,57,79,83,122,220,193,69,106,113,18,85,122,26,130,81,170,72,5,108,186,11,13,126,183,45,217,173,172,175,77,36,200,143,175,142,157,72,112,169,10,178,12,221,241,81,192,28,89,154,243,75,189,211,223,91,41,47,154,236,172,187,200,25,179,69,95,158,85,119,213,93,17,13,85,119,40,162,255,116,17,105,210,248,116,33,53,42,43,98,198,79,23,19,211,217,167,203,169,147,89,17,116,244,116,65,105,70,254,116,57,53,42,43,98,186,79,23,147,21,4,158,46,104,142,206,198,221,141,37,173,199,55,95,76,99,224,11,188,215,173,253,149,56,96,133,236,176,243,126,149,166,30,120,56,81,132,55,208,161,239,29,29,58,70,24,204,128,18,153,71,118,9,112,216,58,164,70,43,102,185,100,76,99,50,177,75,148,130,2,47,29,241,15,60,102,42,230,97,221,57,58,172,3,201,194,136,70,242,28,123,183,134,55,70,86,26,177,195,58,140,208,185,116,158,13,4,106,58,1,248,26,145,113,151,125,91,144,255,134,81,139,154,105,89,198,184,205,50,157,200,99,156,29,192,158,120,62,4,107,150,52,27,77,83,48,197,252,193,74,167,94,2,242,164,41,164,32,116,97,102,217,182,109,136,132,233,186,15,210,240,128,157,165,144,206,163,51,153,8,55,171,170,3,208,120,2,196,177,163,56,156,69,16,50,15,157,145,145,134,6,155,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,144,96,134,5,159,16,19,56,62,137,41,137,169,147,82,154,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,51,186,44,146,96,98,51,16,85,239,179,4,98,30,55,229,54,208,81,219,236,51,51,90,24,97,82,71,237,198,126,154,149,61,97,187,61,179,100,160,11,216,37,1,101,30,65,7,4,132,49,35,20,251,72,192,48,168,0,192,97,157,209,60,50,87,87,244,185,191,237,114,188,113,209,82,42,166,225,5,209,60,101,38,224,203,74,188,63,32,193,45,63,136,85,162,43,204,188,192,212,175,205,21,89,58,191,254,93,178,56,119,143,200,66,171,176,127,147,48,144,174,71,143,72,131,5,240,199,79,50,89,36,250,202,125,231,155,189,82,125,18,7,121,27,36,128,147,14,7,46,110,175,173,213,185,85,19,97,217,217,175,59,79,174,102,223,194,77,155,216,159,157,116,90,139,195,57,184,53,77,204,129,34,172,152,22,181,134,222,12,126,213,155,141,70,163,72,210,90,52,79,166,214,195,93,43,77,170,247,173,76,27,176,11,115,165,185,93,36,87,228,86,90,10,173,2,133,125,253,246,23,243,19,117,121,106,62,81,71,46,179,113,89,86,198,180,255,241,139,106,99,49,51,183,181,149,110,17,102,202,106,232,150,229,29,220,225,4,107,16,232,116,17,156,197,97,4,135,230,189,85,226,89,219,69,122,239,147,82,153,93,115,42,33,225,192,48,204,61,88,157,81,44,146,12,186,55,196,212,112,95,52,204,119,141,86,243,207,137,150,60,89,54,22,50,172,161,133,162,105,59,117,143,133,11,87,180,60,105,105,103,1,204,82,16,171,38,184,189,169,212,217,254,190,37,241,180,145,210,130,75,83,33,6,130,237,236,3,58,165,93,196,82,210,87,140,101,200,93,250,23,201,150,35,181,147,27,176,68,122,229,18,127,170,104,43,196,118,17,142,39,228,171,249,246,83,36,211,41,237,34,86,150,243,102,141,239,214,42,26,43,74,80,150,215,206,252,154,252,69,226,231,105,237,178,0,118,72,51,184,104,61,137,202,38,214,77,45,243,50,184,9,194,69,96,208,154,36,141,61,49,96,52,197,105,191,220,147,245,43,24,63,178,181,103,7,207,159,203,145,67,189,142,201,226,9,81,76,203,31,34,107,213,16,57,1,241,53,37,168,211,10,52,144,77,40,231,68,181,109,237,248,131,4,140,9,163,247,93,216,81,119,32,123,144,188,3,122,192,123,142,226,51,107,48,10,72,214,77,20,16,217,59,20,0,214,44,20,95,178,55,88,110,11,73,178,18,59,199,49,43,74,131,149,23,244,224,187,44,154,3,133,75,200,100,23,66,43,210,170,98,74,249,184,96,155,36,90,43,199,114,143,38,89,152,93,30,240,123,226,10,191,32,125,34,180,128,170,36,79,60,107,250,218,248,198,47,64,61,141,98,55,15,77,190,24,52,160,157,4,126,143,23,98,178,236,69,169,252,207,72,146,56,215,196,86,138,175,106,147,138,201,199,218,68,60,185,98,126,9,244,108,113,15,113,56,238,212,172,223,199,138,173,137,143,156,91,102,5,254,98,3,135,99,171,92,24,104,3,23,188,87,54,177,9,182,224,66,47,128,13,60,216,253,176,137,73,186,13,19,145,200,23,178,160,169,247,70,14,206,104,11,30,236,186,216,100,20,126,159,108,52,204,22,140,212,186,41,27,174,122,201,24,78,58,108,82,242,159,58,217,17,133,41,212,232,166,51,114,40,243,168,152,157,44,230,208,195,167,154,99,200,123,63,74,219,135,149,124,90,235,36,137,220,199,69,137,92,77,22,237,240,95,79,120,178,5,225,201,58,194,180,162,182,158,244,22,234,139,70,235,72,211,226,231,122,210,254,22,164,253,117,164,177,94,185,158,118,188,5,237,184,128,182,214,184,22,97,63,55,124,2,169,12,65,71,195,95,54,127,209,64,11,58,249,131,7,238,64,209,104,157,18,247,134,182,80,243,77,159,196,1,46,183,68,145,32,79,68,233,214,10,34,122,67,89,80,242,130,71,105,233,15,19,50,114,72,207,200,150,212,204,130,249,77,98,228,113,34,184,237,179,113,81,52,205,209,110,172,210,94,35,214,35,228,69,45,149,189,178,81,170,162,89,187,215,75,142,189,196,141,73,202,139,116,136,100,175,189,230,148,135,82,238,200,86,174,59,237,186,209,47,48,136,98,232,2,34,223,113,137,85,255,207,111,199,149,250,117,213,196,27,141,85,106,177,2,141,165,149,214,234,5,170,221,140,20,194,163,201,229,146,215,121,215,221,188,235,38,210,248,75,23,208,117,124,127,228,184,55,23,4,66,191,125,219,164,86,49,153,191,170,234,17,147,50,105,133,34,150,194,223,84,20,166,11,13,103,111,61,223,42,231,218,94,46,69,123,94,22,11,50,61,99,213,224,33,139,251,236,71,3,201,119,166,129,33,35,173,52,230,130,198,10,45,54,182,76,179,173,70,210,246,22,17,250,10,77,117,88,82,69,70,11,88,124,49,73,58,66,73,209,191,136,79,213,189,102,57,74,17,174,84,254,254,93,94,200,5,165,60,222,252,61,106,104,69,189,109,232,190,219,68,54,123,154,192,94,78,128,79,109,126,214,160,119,122,121,134,183,210,165,92,219,95,204,117,60,118,239,24,99,81,172,184,127,204,210,35,182,20,217,99,80,82,14,180,100,69,245,23,195,165,7,144,93,74,23,33,125,13,57,159,5,137,192,160,102,164,8,78,60,54,82,246,238,131,86,178,139,67,105,108,94,76,95,139,110,8,171,106,155,135,117,0,29,78,227,58,45,119,115,151,146,181,50,84,111,117,181,174,84,213,210,64,44,141,99,83,36,87,175,203,122,229,187,172,55,97,15,201,144,164,88,56,237,229,0,183,13,171,208,37,89,238,233,29,2,42,135,56,54,182,42,63,231,91,12,187,105,72,222,6,202,244,236,124,65,18,48,187,96,98,65,24,39,221,156,191,231,60,76,64,121,168,85,184,146,132,62,181,179,97,79,170,20,181,101,224,191,7,139,216,137,168,58,101,87,140,210,57,50,243,15,22,4,23,22,219,34,31,44,114,172,227,196,155,116,52,192,1,76,37,32,102,83,170,6,222,190,180,3,99,170,13,189,34,76,118,145,162,201,165,144,12,79,17,83,238,106,33,40,91,35,149,51,121,92,33,188,21,102,86,44,81,47,109,154,239,228,85,14,7,100,153,245,15,247,152,239,242,89,94,192,97,120,33,97,25,195,46,225,164,81,120,87,98,188,5,235,48,232,210,69,9,86,244,61,33,91,30,134,103,216,120,218,192,91,248,243,97,29,151,165,172,123,229,240,18,235,15,28,41,39,127,155,3,219,126,238,51,129,181,70,42,179,145,250,96,193,208,141,68,133,51,21,35,21,162,114,43,225,170,233,219,11,214,37,125,254,236,167,55,175,27,237,172,215,250,24,119,214,225,223,86,128,28,182,38,67,188,179,12,248,26,98,91,17,116,100,77,2,127,103,9,240,253,192,182,18,232,200,154,4,163,141,18,212,153,59,88,188,104,197,156,233,157,9,82,101,142,51,241,226,89,105,141,148,252,241,192,150,98,114,236,98,65,93,33,232,233,207,84,70,230,246,84,68,112,99,117,151,179,27,89,248,184,178,23,213,128,89,219,149,250,9,192,246,40,34,151,140,153,7,171,105,192,95,231,206,46,53,27,13,165,47,204,15,26,92,141,30,96,21,49,228,17,58,108,48,60,132,11,49,144,162,126,136,225,73,43,46,170,92,148,33,150,200,22,193,35,62,188,192,91,35,136,229,111,218,43,167,153,137,75,197,146,15,239,114,179,197,178,244,164,104,109,112,208,98,152,44,112,120,2,193,116,5,150,169,43,98,41,209,206,174,162,177,74,81,190,3,95,32,141,82,113,42,148,133,135,89,242,226,195,178,205,159,16,68,212,121,184,40,25,99,173,66,84,200,154,133,116,130,243,196,187,158,199,4,105,242,142,37,127,27,2,3,174,195,31,9,84,100,108,162,64,241,3,230,170,164,49,62,228,164,191,244,7,3,227,125,207,232,24,8,54,54,41,27,217,179,138,253,255,192,240,44,80,229,98,225,135,81,167,111,252,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,157,88,18,135,51,90,18,102,66,34,72,10,121,164,98,143,32,27,147,218,99,87,93,4,154,45,162,21,206,83,250,14,64,34,71,168,197,130,255,221,242,95,254,182,162,176,219,56,0,0 };

From 3b8f71a0f5a5e00bc5794dd11651019c5564d17b Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Thu, 13 Jan 2022 18:26:50 +0000
Subject: [PATCH 05/11] Fix a bug where the Dark colour wasn't being correctly
 applied.

---
 data/js/controls.js     | 1 +
 data/js/controls.min.js | 2 +-
 src/dataControlsJS.h    | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 1cdc764..d358b0b 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -102,6 +102,7 @@ function colorClass(colorId) {
     case C_ALIZARIN:
       return "alizarin";
 
+    case C_DARK:
     case C_NONE:
       return "dark";
     default:
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index caba3d4..ea012a9 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -1,4 +1,4 @@
-const UI_INITIAL_GUI=200;const UI_RELOAD=201;const UPDATE_OFFSET=100;const UI_EXTEND_GUI=210;const UI_TITEL=0;const UI_PAD=1;const UPDATE_PAD=101;const UI_CPAD=2;const UPDATE_CPAD=102;const UI_BUTTON=3;const UPDATE_BUTTON=103;const UI_LABEL=4;const UPDATE_LABEL=104;const UI_SWITCHER=5;const UPDATE_SWITCHER=105;const UI_SLIDER=6;const UPDATE_SLIDER=106;const UI_NUMBER=7;const UPDATE_NUMBER=107;const UI_TEXT_INPUT=8;const UPDATE_TEXT_INPUT=108;const UI_GRAPH=9;const ADD_GRAPH_POINT=10;const CLEAR_GRAPH=109;const UI_TAB=11;const UPDATE_TAB=111;const UI_SELECT=12;const UPDATE_SELECT=112;const UI_OPTION=13;const UPDATE_OPTION=113;const UI_MIN=14;const UPDATE_MIN=114;const UI_MAX=15;const UPDATE_MAX=115;const UI_STEP=16;const UPDATE_STEP=116;const UI_GAUGE=17;const UPDATE_GAUGE=117;const UI_ACCEL=18;const UPDATE_ACCEL=118;const UI_SEPARATOR=19;const UPDATE_SEPARATOR=119;const UP=0;const DOWN=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_DARK=7;const C_NONE=255;var graphData=new Array();var hasAccel=false;var sliderContinuous=false;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";case C_EMERALD:return"emerald";case C_PETERRIVER:return"peterriver";case C_WETASPHALT:return"wetasphalt";case C_SUNFLOWER:return"sunflower";case C_CARROT:return"carrot";case C_ALIZARIN:return"alizarin";case C_NONE:return"dark";default:return"";}}
+const UI_INITIAL_GUI=200;const UI_RELOAD=201;const UPDATE_OFFSET=100;const UI_EXTEND_GUI=210;const UI_TITEL=0;const UI_PAD=1;const UPDATE_PAD=101;const UI_CPAD=2;const UPDATE_CPAD=102;const UI_BUTTON=3;const UPDATE_BUTTON=103;const UI_LABEL=4;const UPDATE_LABEL=104;const UI_SWITCHER=5;const UPDATE_SWITCHER=105;const UI_SLIDER=6;const UPDATE_SLIDER=106;const UI_NUMBER=7;const UPDATE_NUMBER=107;const UI_TEXT_INPUT=8;const UPDATE_TEXT_INPUT=108;const UI_GRAPH=9;const ADD_GRAPH_POINT=10;const CLEAR_GRAPH=109;const UI_TAB=11;const UPDATE_TAB=111;const UI_SELECT=12;const UPDATE_SELECT=112;const UI_OPTION=13;const UPDATE_OPTION=113;const UI_MIN=14;const UPDATE_MIN=114;const UI_MAX=15;const UPDATE_MAX=115;const UI_STEP=16;const UPDATE_STEP=116;const UI_GAUGE=17;const UPDATE_GAUGE=117;const UI_ACCEL=18;const UPDATE_ACCEL=118;const UI_SEPARATOR=19;const UPDATE_SEPARATOR=119;const UP=0;const DOWN=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_DARK=7;const C_NONE=255;var graphData=new Array();var hasAccel=false;var sliderContinuous=false;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";case C_EMERALD:return"emerald";case C_PETERRIVER:return"peterriver";case C_WETASPHALT:return"wetasphalt";case C_SUNFLOWER:return"sunflower";case C_CARROT:return"carrot";case C_ALIZARIN:return"alizarin";case C_DARK:case C_NONE:return"dark";default:return"";}}
 var websock;var websockConnected=false;function requestOrientationPermission(){}
 function saveGraphData(){localStorage.setItem("espuigraphs",JSON.stringify(graphData));}
 function restoreGraphData(id){var savedData=localStorage.getItem("espuigraphs",graphData);if(savedData!=null){savedData=JSON.parse(savedData);return savedData[id];}
diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h
index d60f712..fa67d25 100644
--- a/src/dataControlsJS.h
+++ b/src/dataControlsJS.h
@@ -1,5 +1,5 @@
 const char JS_CONTROLS[] PROGMEM = R"=====(
-const UI_INITIAL_GUI=200;const UI_RELOAD=201;const UPDATE_OFFSET=100;const UI_EXTEND_GUI=210;const UI_TITEL=0;const UI_PAD=1;const UPDATE_PAD=101;const UI_CPAD=2;const UPDATE_CPAD=102;const UI_BUTTON=3;const UPDATE_BUTTON=103;const UI_LABEL=4;const UPDATE_LABEL=104;const UI_SWITCHER=5;const UPDATE_SWITCHER=105;const UI_SLIDER=6;const UPDATE_SLIDER=106;const UI_NUMBER=7;const UPDATE_NUMBER=107;const UI_TEXT_INPUT=8;const UPDATE_TEXT_INPUT=108;const UI_GRAPH=9;const ADD_GRAPH_POINT=10;const CLEAR_GRAPH=109;const UI_TAB=11;const UPDATE_TAB=111;const UI_SELECT=12;const UPDATE_SELECT=112;const UI_OPTION=13;const UPDATE_OPTION=113;const UI_MIN=14;const UPDATE_MIN=114;const UI_MAX=15;const UPDATE_MAX=115;const UI_STEP=16;const UPDATE_STEP=116;const UI_GAUGE=17;const UPDATE_GAUGE=117;const UI_ACCEL=18;const UPDATE_ACCEL=118;const UI_SEPARATOR=19;const UPDATE_SEPARATOR=119;const UP=0;const DOWN=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_DARK=7;const C_NONE=255;var graphData=new Array();var hasAccel=false;var sliderContinuous=false;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";case C_EMERALD:return"emerald";case C_PETERRIVER:return"peterriver";case C_WETASPHALT:return"wetasphalt";case C_SUNFLOWER:return"sunflower";case C_CARROT:return"carrot";case C_ALIZARIN:return"alizarin";case C_NONE:return"dark";default:return"";}}
+const UI_INITIAL_GUI=200;const UI_RELOAD=201;const UPDATE_OFFSET=100;const UI_EXTEND_GUI=210;const UI_TITEL=0;const UI_PAD=1;const UPDATE_PAD=101;const UI_CPAD=2;const UPDATE_CPAD=102;const UI_BUTTON=3;const UPDATE_BUTTON=103;const UI_LABEL=4;const UPDATE_LABEL=104;const UI_SWITCHER=5;const UPDATE_SWITCHER=105;const UI_SLIDER=6;const UPDATE_SLIDER=106;const UI_NUMBER=7;const UPDATE_NUMBER=107;const UI_TEXT_INPUT=8;const UPDATE_TEXT_INPUT=108;const UI_GRAPH=9;const ADD_GRAPH_POINT=10;const CLEAR_GRAPH=109;const UI_TAB=11;const UPDATE_TAB=111;const UI_SELECT=12;const UPDATE_SELECT=112;const UI_OPTION=13;const UPDATE_OPTION=113;const UI_MIN=14;const UPDATE_MIN=114;const UI_MAX=15;const UPDATE_MAX=115;const UI_STEP=16;const UPDATE_STEP=116;const UI_GAUGE=17;const UPDATE_GAUGE=117;const UI_ACCEL=18;const UPDATE_ACCEL=118;const UI_SEPARATOR=19;const UPDATE_SEPARATOR=119;const UP=0;const DOWN=1;const LEFT=2;const RIGHT=3;const CENTER=4;const C_TURQUOISE=0;const C_EMERALD=1;const C_PETERRIVER=2;const C_WETASPHALT=3;const C_SUNFLOWER=4;const C_CARROT=5;const C_ALIZARIN=6;const C_DARK=7;const C_NONE=255;var graphData=new Array();var hasAccel=false;var sliderContinuous=false;function colorClass(colorId){colorId=Number(colorId);switch(colorId){case C_TURQUOISE:return"turquoise";case C_EMERALD:return"emerald";case C_PETERRIVER:return"peterriver";case C_WETASPHALT:return"wetasphalt";case C_SUNFLOWER:return"sunflower";case C_CARROT:return"carrot";case C_ALIZARIN:return"alizarin";case C_DARK:case C_NONE:return"dark";default:return"";}}
 var websock;var websockConnected=false;function requestOrientationPermission(){}
 function saveGraphData(){localStorage.setItem("espuigraphs",JSON.stringify(graphData));}
 function restoreGraphData(id){var savedData=localStorage.getItem("espuigraphs",graphData);if(savedData!=null){savedData=JSON.parse(savedData);return savedData[id];}
@@ -90,4 +90,4 @@ value+"";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3827] PROGMEM = { 31,139,8,0,188,95,224,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,111,239,75,140,122,122,186,123,186,123,102,250,49,113,195,32,73,141,203,254,85,255,164,63,236,119,6,87,31,47,251,246,139,70,163,237,138,129,243,222,224,180,115,12,176,166,128,157,29,119,134,189,171,211,15,31,46,122,67,187,169,226,246,126,29,246,78,142,25,141,166,2,31,246,135,189,129,173,0,206,128,98,142,30,130,50,38,253,171,46,133,188,208,145,186,12,235,69,134,245,254,114,56,60,61,177,95,234,120,28,218,108,188,204,48,7,157,247,32,196,43,29,145,1,155,141,87,25,222,197,151,254,176,251,169,119,110,191,214,81,37,188,217,120,173,96,15,250,199,0,123,147,195,101,208,102,227,77,134,121,114,249,249,61,192,126,212,49,57,180,217,248,81,81,23,232,17,12,114,118,57,180,223,234,216,202,72,179,241,54,155,241,241,188,115,246,201,254,137,3,58,199,199,12,114,117,118,218,63,161,168,124,160,59,232,117,206,57,114,179,241,147,194,177,243,222,110,230,12,194,96,138,65,46,122,131,94,23,168,229,108,34,192,77,197,42,167,103,195,62,213,127,206,44,2,220,84,204,242,185,15,128,156,85,16,214,84,108,242,185,243,171,221,204,217,3,97,77,213,20,195,222,153,221,204,91,2,129,77,197,14,31,59,151,31,123,118,51,103,7,14,109,42,102,232,116,187,212,55,114,38,224,208,230,91,85,49,103,157,243,206,240,20,204,248,83,94,55,114,68,25,146,59,225,248,244,203,137,220,7,131,222,135,161,244,247,243,254,199,79,67,233,213,221,222,201,16,156,68,40,164,123,53,188,60,255,215,229,105,255,162,39,73,117,175,122,159,123,231,157,65,182,175,186,87,103,61,152,117,222,255,5,166,190,144,192,47,189,97,231,226,236,83,103,160,144,191,186,184,60,249,48,56,253,162,241,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,18,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,71,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,135,38,243,192,77,189,48,48,220,208,15,227,174,239,36,137,133,63,251,227,242,3,255,97,159,204,103,35,18,75,120,59,89,120,169,59,85,240,156,132,168,58,107,197,36,157,199,129,9,255,252,62,15,189,132,152,109,142,194,85,40,16,200,140,196,142,63,150,195,153,62,5,70,68,82,18,199,222,45,137,37,82,166,95,129,180,32,169,147,68,83,199,79,37,146,212,183,192,73,230,193,196,15,23,10,29,166,126,49,238,58,113,28,102,243,133,41,196,176,227,123,127,56,177,23,72,4,106,9,49,56,118,226,27,179,61,38,19,103,238,167,2,104,182,151,203,61,170,249,5,25,37,161,123,211,86,126,131,25,2,226,166,100,156,183,66,76,126,159,147,36,61,141,61,18,164,14,5,157,145,120,230,37,9,252,178,202,15,203,61,137,153,56,183,228,163,112,0,24,242,67,215,241,47,210,48,118,174,73,45,33,105,63,37,51,203,36,73,52,247,208,79,18,179,250,207,139,211,147,90,146,194,42,174,189,201,189,37,221,167,92,110,43,132,99,224,31,198,10,109,15,44,140,30,4,28,199,232,110,26,175,235,66,94,25,241,182,55,177,228,212,125,59,152,251,126,249,33,163,133,66,69,78,156,144,12,171,220,102,58,204,88,126,245,198,223,64,72,6,254,250,45,47,175,19,167,160,130,31,172,113,232,206,103,160,185,114,205,25,143,45,243,31,102,185,22,78,38,176,41,126,176,204,103,113,184,128,239,105,58,243,45,211,44,183,185,41,106,174,31,2,111,112,106,70,69,37,13,187,238,2,172,48,79,122,224,27,49,112,88,99,62,74,93,226,2,143,152,204,194,91,194,54,147,137,187,228,224,58,38,36,48,203,43,168,32,167,134,23,147,113,1,22,19,26,165,48,234,198,73,104,112,9,168,144,207,159,189,125,243,242,117,187,96,86,182,116,13,26,88,15,174,239,185,55,45,174,185,234,82,91,244,212,9,198,62,249,197,75,188,145,231,123,233,125,23,0,215,160,160,7,176,227,126,94,1,207,159,239,11,157,215,166,222,120,76,130,242,131,52,8,221,0,153,191,114,35,73,116,88,121,239,22,126,12,188,36,37,1,28,47,230,173,228,233,34,79,179,90,44,75,21,181,142,142,181,240,130,113,184,168,81,135,164,92,106,81,24,167,251,182,105,126,255,94,60,242,182,177,110,228,213,171,151,210,190,120,158,126,33,163,11,248,77,82,203,92,36,173,122,221,172,228,39,78,195,36,13,156,25,169,152,173,213,65,74,181,98,214,23,160,242,246,146,128,188,59,19,231,52,246,132,195,134,65,24,145,192,22,154,181,200,109,74,143,234,32,9,125,2,243,175,129,36,195,52,40,222,22,62,183,206,55,83,114,7,242,73,91,103,123,38,243,255,52,158,147,246,178,157,137,134,187,105,27,217,16,17,72,230,247,152,70,141,80,216,6,106,20,80,68,129,221,129,212,119,208,197,30,163,64,209,199,185,195,8,6,106,99,60,139,232,40,177,165,223,142,194,241,61,194,92,248,34,49,56,155,184,15,41,122,45,189,143,8,191,17,245,160,191,85,112,6,81,80,234,140,146,192,185,45,2,131,160,176,53,82,117,8,124,30,217,228,175,115,56,82,243,23,124,33,30,248,17,194,41,233,56,244,147,218,36,140,123,14,8,79,124,66,151,103,31,225,89,15,55,217,29,83,221,3,69,111,229,174,14,142,92,174,46,219,138,154,45,57,11,108,144,137,154,134,169,227,11,126,71,150,206,222,39,193,117,58,61,104,150,229,230,131,203,43,128,179,123,238,133,55,176,173,214,162,195,66,70,49,113,110,218,66,213,89,106,212,250,255,174,144,233,157,30,119,176,165,201,93,101,167,21,111,51,127,85,7,44,149,108,229,207,146,152,248,161,51,134,157,161,99,99,210,216,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,169,94,75,124,177,188,75,126,102,137,149,4,177,188,70,126,98,130,160,12,242,192,190,37,180,140,215,131,79,202,112,124,13,195,79,195,207,3,139,237,79,93,8,150,152,174,76,122,200,207,162,139,27,165,129,89,65,52,136,113,240,98,76,195,185,59,69,221,183,178,51,163,252,64,106,81,76,168,217,143,89,140,71,85,57,79,83,122,220,193,69,106,113,18,85,122,26,130,81,170,72,5,108,186,11,13,126,183,45,217,173,172,175,77,36,200,143,175,142,157,72,112,169,10,178,12,221,241,81,192,28,89,154,243,75,189,211,223,91,41,47,154,236,172,187,200,25,179,69,95,158,85,119,213,93,17,13,85,119,40,162,255,116,17,105,210,248,116,33,53,42,43,98,198,79,23,19,211,217,167,203,169,147,89,17,116,244,116,65,105,70,254,116,57,53,42,43,98,186,79,23,147,21,4,158,46,104,142,206,198,221,141,37,173,199,55,95,76,99,224,11,188,215,173,253,149,56,96,133,236,176,243,126,149,166,30,120,56,81,132,55,208,161,239,29,29,58,70,24,204,128,18,153,71,118,9,112,216,58,164,70,43,102,185,100,76,99,50,177,75,148,130,2,47,29,241,15,60,102,42,230,97,221,57,58,172,3,201,194,136,70,242,28,123,183,134,55,70,86,26,177,195,58,140,208,185,116,158,13,4,106,58,1,248,26,145,113,151,125,91,144,255,134,81,139,154,105,89,198,184,205,50,157,200,99,156,29,192,158,120,62,4,107,150,52,27,77,83,48,197,252,193,74,167,94,2,242,164,41,164,32,116,97,102,217,182,109,136,132,233,186,15,210,240,128,157,165,144,206,163,51,153,8,55,171,170,3,208,120,2,196,177,163,56,156,69,16,50,15,157,145,145,134,6,155,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,144,96,134,5,159,16,19,56,62,137,41,137,169,147,82,154,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,51,186,44,146,96,98,51,16,85,239,179,4,98,30,55,229,54,208,81,219,236,51,51,90,24,97,82,71,237,198,126,154,149,61,97,187,61,179,100,160,11,216,37,1,101,30,65,7,4,132,49,35,20,251,72,192,48,168,0,192,97,157,209,60,50,87,87,244,185,191,237,114,188,113,209,82,42,166,225,5,209,60,101,38,224,203,74,188,63,32,193,45,63,136,85,162,43,204,188,192,212,175,205,21,89,58,191,254,93,178,56,119,143,200,66,171,176,127,147,48,144,174,71,143,72,131,5,240,199,79,50,89,36,250,202,125,231,155,189,82,125,18,7,121,27,36,128,147,14,7,46,110,175,173,213,185,85,19,97,217,217,175,59,79,174,102,223,194,77,155,216,159,157,116,90,139,195,57,184,53,77,204,129,34,172,152,22,181,134,222,12,126,213,155,141,70,163,72,210,90,52,79,166,214,195,93,43,77,170,247,173,76,27,176,11,115,165,185,93,36,87,228,86,90,10,173,2,133,125,253,246,23,243,19,117,121,106,62,81,71,46,179,113,89,86,198,180,255,241,139,106,99,49,51,183,181,149,110,17,102,202,106,232,150,229,29,220,225,4,107,16,232,116,17,156,197,97,4,135,230,189,85,226,89,219,69,122,239,147,82,153,93,115,42,33,225,192,48,204,61,88,157,81,44,146,12,186,55,196,212,112,95,52,204,119,141,86,243,207,137,150,60,89,54,22,50,172,161,133,162,105,59,117,143,133,11,87,180,60,105,105,103,1,204,82,16,171,38,184,189,169,212,217,254,190,37,241,180,145,210,130,75,83,33,6,130,237,236,3,58,165,93,196,82,210,87,140,101,200,93,250,23,201,150,35,181,147,27,176,68,122,229,18,127,170,104,43,196,118,17,142,39,228,171,249,246,83,36,211,41,237,34,86,150,243,102,141,239,214,42,26,43,74,80,150,215,206,252,154,252,69,226,231,105,237,178,0,118,72,51,184,104,61,137,202,38,214,77,45,243,50,184,9,194,69,96,208,154,36,141,61,49,96,52,197,105,191,220,147,245,43,24,63,178,181,103,7,207,159,203,145,67,189,142,201,226,9,81,76,203,31,34,107,213,16,57,1,241,53,37,168,211,10,52,144,77,40,231,68,181,109,237,248,131,4,140,9,163,247,93,216,81,119,32,123,144,188,3,122,192,123,142,226,51,107,48,10,72,214,77,20,16,217,59,20,0,214,44,20,95,178,55,88,110,11,73,178,18,59,199,49,43,74,131,149,23,244,224,187,44,154,3,133,75,200,100,23,66,43,210,170,98,74,249,184,96,155,36,90,43,199,114,143,38,89,152,93,30,240,123,226,10,191,32,125,34,180,128,170,36,79,60,107,250,218,248,198,47,64,61,141,98,55,15,77,190,24,52,160,157,4,126,143,23,98,178,236,69,169,252,207,72,146,56,215,196,86,138,175,106,147,138,201,199,218,68,60,185,98,126,9,244,108,113,15,113,56,238,212,172,223,199,138,173,137,143,156,91,102,5,254,98,3,135,99,171,92,24,104,3,23,188,87,54,177,9,182,224,66,47,128,13,60,216,253,176,137,73,186,13,19,145,200,23,178,160,169,247,70,14,206,104,11,30,236,186,216,100,20,126,159,108,52,204,22,140,212,186,41,27,174,122,201,24,78,58,108,82,242,159,58,217,17,133,41,212,232,166,51,114,40,243,168,152,157,44,230,208,195,167,154,99,200,123,63,74,219,135,149,124,90,235,36,137,220,199,69,137,92,77,22,237,240,95,79,120,178,5,225,201,58,194,180,162,182,158,244,22,234,139,70,235,72,211,226,231,122,210,254,22,164,253,117,164,177,94,185,158,118,188,5,237,184,128,182,214,184,22,97,63,55,124,2,169,12,65,71,195,95,54,127,209,64,11,58,249,131,7,238,64,209,104,157,18,247,134,182,80,243,77,159,196,1,46,183,68,145,32,79,68,233,214,10,34,122,67,89,80,242,130,71,105,233,15,19,50,114,72,207,200,150,212,204,130,249,77,98,228,113,34,184,237,179,113,81,52,205,209,110,172,210,94,35,214,35,228,69,45,149,189,178,81,170,162,89,187,215,75,142,189,196,141,73,202,139,116,136,100,175,189,230,148,135,82,238,200,86,174,59,237,186,209,47,48,136,98,232,2,34,223,113,137,85,255,207,111,199,149,250,117,213,196,27,141,85,106,177,2,141,165,149,214,234,5,170,221,140,20,194,163,201,229,146,215,121,215,221,188,235,38,210,248,75,23,208,117,124,127,228,184,55,23,4,66,191,125,219,164,86,49,153,191,170,234,17,147,50,105,133,34,150,194,223,84,20,166,11,13,103,111,61,223,42,231,218,94,46,69,123,94,22,11,50,61,99,213,224,33,139,251,236,71,3,201,119,166,129,33,35,173,52,230,130,198,10,45,54,182,76,179,173,70,210,246,22,17,250,10,77,117,88,82,69,70,11,88,124,49,73,58,66,73,209,191,136,79,213,189,102,57,74,17,174,84,254,254,93,94,200,5,165,60,222,252,61,106,104,69,189,109,232,190,219,68,54,123,154,192,94,78,128,79,109,126,214,160,119,122,121,134,183,210,165,92,219,95,204,117,60,118,239,24,99,81,172,184,127,204,210,35,182,20,217,99,80,82,14,180,100,69,245,23,195,165,7,144,93,74,23,33,125,13,57,159,5,137,192,160,102,164,8,78,60,54,82,246,238,131,86,178,139,67,105,108,94,76,95,139,110,8,171,106,155,135,117,0,29,78,227,58,45,119,115,151,146,181,50,84,111,117,181,174,84,213,210,64,44,141,99,83,36,87,175,203,122,229,187,172,55,97,15,201,144,164,88,56,237,229,0,183,13,171,208,37,89,238,233,29,2,42,135,56,54,182,42,63,231,91,12,187,105,72,222,6,202,244,236,124,65,18,48,187,96,98,65,24,39,221,156,191,231,60,76,64,121,168,85,184,146,132,62,181,179,97,79,170,20,181,101,224,191,7,139,216,137,168,58,101,87,140,210,57,50,243,15,22,4,23,22,219,34,31,44,114,172,227,196,155,116,52,192,1,76,37,32,102,83,170,6,222,190,180,3,99,170,13,189,34,76,118,145,162,201,165,144,12,79,17,83,238,106,33,40,91,35,149,51,121,92,33,188,21,102,86,44,81,47,109,154,239,228,85,14,7,100,153,245,15,247,152,239,242,89,94,192,97,120,33,97,25,195,46,225,164,81,120,87,98,188,5,235,48,232,210,69,9,86,244,61,33,91,30,134,103,216,120,218,192,91,248,243,97,29,151,165,172,123,229,240,18,235,15,28,41,39,127,155,3,219,126,238,51,129,181,70,42,179,145,250,96,193,208,141,68,133,51,21,35,21,162,114,43,225,170,233,219,11,214,37,125,254,236,167,55,175,27,237,172,215,250,24,119,214,225,223,86,128,28,182,38,67,188,179,12,248,26,98,91,17,116,100,77,2,127,103,9,240,253,192,182,18,232,200,154,4,163,141,18,212,153,59,88,188,104,197,156,233,157,9,82,101,142,51,241,226,89,105,141,148,252,241,192,150,98,114,236,98,65,93,33,232,233,207,84,70,230,246,84,68,112,99,117,151,179,27,89,248,184,178,23,213,128,89,219,149,250,9,192,246,40,34,151,140,153,7,171,105,192,95,231,206,46,53,27,13,165,47,204,15,26,92,141,30,96,21,49,228,17,58,108,48,60,132,11,49,144,162,126,136,225,73,43,46,170,92,148,33,150,200,22,193,35,62,188,192,91,35,136,229,111,218,43,167,153,137,75,197,146,15,239,114,179,197,178,244,164,104,109,112,208,98,152,44,112,120,2,193,116,5,150,169,43,98,41,209,206,174,162,177,74,81,190,3,95,32,141,82,113,42,148,133,135,89,242,226,195,178,205,159,16,68,212,121,184,40,25,99,173,66,84,200,154,133,116,130,243,196,187,158,199,4,105,242,142,37,127,27,2,3,174,195,31,9,84,100,108,162,64,241,3,230,170,164,49,62,228,164,191,244,7,3,227,125,207,232,24,8,54,54,41,27,217,179,138,253,255,192,240,44,80,229,98,225,135,81,167,111,252,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,157,88,18,135,51,90,18,102,66,34,72,10,121,164,98,143,32,27,147,218,99,87,93,4,154,45,162,21,206,83,250,14,64,34,71,168,197,130,255,221,242,95,254,182,162,176,219,56,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3831] PROGMEM = { 31,139,8,0,122,110,224,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,111,239,75,140,90,61,221,61,221,61,211,47,197,13,131,36,53,46,251,87,253,147,254,176,223,25,92,125,188,236,219,47,26,141,182,43,94,156,247,6,167,157,99,128,53,5,236,236,184,51,236,93,157,126,248,112,209,27,218,77,21,183,247,235,176,119,114,204,104,52,21,248,176,63,236,13,108,5,112,6,20,115,244,16,148,49,233,95,117,41,228,133,142,212,101,88,47,50,172,247,151,195,225,233,137,253,82,199,227,208,102,227,101,134,57,232,188,7,33,94,233,136,12,216,108,188,202,240,46,190,244,135,221,79,189,115,251,181,142,42,225,205,198,107,5,123,208,63,6,216,155,28,46,131,54,27,111,50,204,147,203,207,239,1,246,163,142,201,161,205,198,143,138,186,64,143,96,144,179,203,161,253,86,199,86,222,52,27,111,179,21,31,207,59,103,159,236,159,56,160,115,124,204,32,87,103,167,253,19,138,202,95,116,7,189,206,57,71,110,54,126,82,56,118,222,219,205,156,65,24,76,49,200,69,111,208,235,2,181,156,77,4,184,169,88,229,244,108,216,167,250,207,153,69,128,155,138,89,62,247,1,144,179,10,194,154,138,77,62,119,126,181,155,57,123,32,172,169,154,98,216,59,179,155,121,75,32,176,169,216,225,99,231,242,99,207,110,230,236,192,161,77,197,12,157,110,151,250,70,206,4,28,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,147,112,124,250,229,68,158,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,164,186,87,189,207,189,243,206,32,59,87,221,171,179,30,172,58,239,255,2,75,95,72,224,151,222,176,115,113,246,169,51,80,200,95,93,92,158,124,24,156,126,209,120,116,59,231,231,167,67,121,10,186,87,157,65,255,223,157,115,48,205,27,9,58,238,156,255,44,61,186,123,117,114,122,210,179,95,188,126,221,190,117,98,227,58,118,162,233,177,147,58,118,64,22,70,39,142,157,123,171,140,111,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,95,77,230,129,155,122,97,96,184,161,31,198,93,223,73,18,11,127,246,199,229,7,254,195,62,153,207,70,36,150,240,118,178,240,82,119,170,224,57,9,81,117,214,138,73,58,143,3,19,254,249,125,30,122,9,49,219,28,133,171,80,32,144,25,137,29,127,44,95,103,250,20,24,17,73,73,28,123,183,36,150,72,153,126,5,210,130,164,78,18,77,29,63,149,72,82,223,2,39,153,7,19,63,92,40,116,152,250,197,123,215,137,227,48,91,47,76,33,94,59,190,247,135,19,123,129,68,160,134,105,241,223,212,42,2,113,236,196,55,102,123,76,38,206,220,79,5,208,108,47,151,123,212,10,11,50,74,66,247,166,173,252,6,147,4,196,77,201,56,111,145,152,252,62,39,73,122,26,123,36,72,29,10,58,35,241,204,75,18,248,101,149,31,150,123,18,51,113,110,201,71,225,12,240,202,15,93,199,191,72,195,216,185,38,181,132,164,253,148,204,44,147,36,209,220,67,159,73,204,234,63,47,78,79,106,73,10,59,186,246,38,247,150,116,165,114,185,173,16,142,129,127,24,43,180,61,176,54,122,19,112,28,163,235,105,188,174,11,121,101,196,219,222,196,146,75,247,237,96,238,251,229,135,140,22,10,21,57,113,66,50,172,114,155,233,48,99,249,213,27,127,3,33,25,248,235,183,188,188,78,156,130,10,126,176,198,161,59,159,129,230,202,53,103,60,182,204,127,152,229,90,56,153,192,1,249,193,50,159,197,225,2,158,167,233,204,183,76,179,220,230,166,168,185,126,8,188,193,193,25,21,149,52,156,192,11,176,194,60,233,129,159,196,192,97,141,249,40,117,137,11,60,98,50,11,111,9,59,88,38,158,152,131,235,152,144,192,44,175,160,130,156,26,94,76,198,5,88,76,104,148,194,168,27,39,161,193,37,160,66,62,127,246,246,205,203,215,237,130,85,217,214,53,104,96,61,184,190,231,222,180,184,230,170,75,109,211,83,39,24,251,228,23,47,241,70,158,239,165,247,93,0,92,131,130,30,192,142,251,121,5,60,127,190,47,116,94,155,122,227,49,9,202,15,210,32,244,0,100,254,202,141,36,209,97,231,189,91,248,49,240,146,148,4,112,213,152,183,146,167,139,60,205,106,177,44,85,212,58,58,214,194,11,198,225,162,70,29,146,114,169,69,97,156,238,219,166,249,253,123,241,155,183,141,117,111,94,189,122,41,237,139,119,235,23,50,186,128,223,36,181,204,69,210,170,215,205,74,126,225,52,76,210,192,153,145,138,217,90,125,73,169,86,204,250,2,84,222,94,18,144,119,103,226,156,198,158,112,216,48,8,35,18,216,66,179,22,185,77,233,181,29,36,161,79,96,253,53,144,100,152,6,197,219,194,231,214,249,102,74,238,64,62,105,235,236,204,100,254,159,198,115,210,94,182,51,209,240,52,109,35,27,34,2,201,252,25,211,168,17,10,219,64,141,2,138,40,176,120,72,125,7,93,236,49,10,20,125,156,187,140,224,69,109,140,119,17,125,75,108,233,183,163,112,124,143,48,23,158,72,12,206,38,98,35,69,175,165,247,17,225,209,81,47,0,90,5,119,16,5,165,206,40,9,156,219,34,48,8,10,71,35,85,95,129,207,35,155,124,104,135,43,53,31,236,11,241,192,143,16,78,73,199,161,159,212,38,97,220,115,64,120,226,19,186,61,251,8,239,122,136,100,119,76,117,15,20,189,149,11,29,28,185,92,93,182,21,53,91,114,21,216,32,19,53,13,83,199,23,252,142,44,157,189,79,130,235,116,122,208,44,203,195,7,193,43,128,187,123,238,133,55,112,172,214,162,195,70,70,49,113,110,218,66,213,89,153,212,250,255,238,144,233,157,94,119,112,164,201,93,101,167,29,111,179,126,85,7,172,172,108,229,239,146,152,248,161,51,134,147,161,99,99,1,217,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,101,95,75,60,177,26,76,62,102,69,150,4,177,26,71,62,98,177,160,188,228,73,126,75,104,25,195,131,79,202,112,125,13,195,79,195,207,3,139,157,79,93,8,86,164,174,44,122,200,175,162,155,27,165,129,89,65,52,200,113,48,48,166,225,220,157,162,238,91,217,157,81,126,32,181,40,38,212,236,199,44,199,163,170,156,167,41,189,238,32,144,90,156,68,149,222,134,96,148,42,82,1,155,238,66,131,199,182,37,139,202,250,222,68,177,252,248,238,216,141,4,65,85,144,101,232,142,143,2,230,200,210,250,95,234,157,254,222,74,121,209,100,103,221,69,206,152,109,250,242,172,186,171,238,138,104,168,186,67,17,253,167,139,72,11,200,167,11,169,81,89,17,51,126,186,152,88,218,62,93,78,157,204,138,160,163,167,11,74,171,243,167,203,169,81,89,17,211,125,186,152,172,57,240,116,65,115,116,54,158,110,108,111,61,126,248,98,154,3,95,96,92,183,246,87,242,128,21,178,195,206,251,85,154,122,226,225,68,17,70,160,67,223,59,58,116,140,48,152,1,37,50,143,236,18,224,176,125,72,141,86,204,114,201,152,198,100,98,151,40,5,5,94,58,226,15,120,205,84,204,195,186,115,116,88,7,146,133,25,141,228,57,246,110,13,111,140,172,52,98,135,117,120,67,215,210,117,54,16,168,233,4,224,105,68,198,93,246,108,65,253,27,70,45,106,166,101,25,243,54,203,116,34,143,113,118,0,123,226,249,144,172,89,210,108,180,76,193,18,243,7,43,157,122,9,200,147,166,80,130,208,141,153,101,219,182,33,19,166,251,62,72,195,3,118,151,66,57,143,206,100,34,220,172,170,14,64,243,9,16,199,142,226,112,22,65,202,60,116,70,70,26,26,108,33,253,101,5,216,77,49,160,124,3,159,124,199,242,184,125,186,159,26,67,130,21,22,60,66,78,224,248,36,166,36,166,78,74,105,26,227,144,36,70,16,166,6,185,131,66,201,104,253,246,27,22,3,5,62,87,224,82,172,53,40,205,15,153,45,172,232,178,76,130,137,205,64,84,189,207,18,200,121,220,148,219,64,71,109,179,199,204,104,97,132,69,29,181,27,251,105,86,246,132,237,246,204,146,129,46,96,151,4,148,121,4,125,33,32,140,25,161,216,71,2,134,73,5,0,14,235,140,230,145,185,186,163,207,253,109,183,227,141,139,182,82,49,13,47,136,230,41,51,1,223,86,226,253,1,5,110,249,65,236,18,93,97,230,5,166,30,54,87,100,233,252,250,119,201,226,220,61,34,11,237,200,254,77,194,64,185,30,61,34,13,54,195,31,191,201,100,147,232,43,247,157,111,246,74,247,73,92,228,109,144,0,110,58,124,113,113,123,109,173,174,173,154,8,203,238,126,221,121,114,253,251,22,30,218,196,254,236,164,211,90,28,206,193,173,105,97,14,20,97,199,180,169,53,244,102,240,171,222,108,52,26,69,146,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,83,152,107,205,237,34,185,34,183,50,94,104,21,40,236,235,183,191,152,159,232,209,83,243,137,158,114,153,189,151,45,102,44,251,31,15,84,27,155,153,185,163,173,76,142,176,82,86,83,183,172,238,224,14,39,88,131,64,167,139,224,44,14,35,184,52,239,173,18,175,218,46,210,123,159,148,202,44,204,169,132,132,3,195,107,238,193,234,138,98,145,100,210,189,33,167,134,120,209,48,223,53,90,205,63,39,90,242,100,217,88,202,176,134,22,138,166,157,212,61,150,46,92,209,246,164,165,221,5,176,74,65,172,154,224,246,166,210,103,251,251,182,196,203,70,74,11,130,166,66,12,4,219,217,7,116,74,187,136,165,148,175,152,203,144,187,244,47,146,45,71,106,39,55,96,133,244,74,16,127,170,104,43,196,118,17,142,23,228,171,245,246,83,36,211,41,237,34,86,86,243,102,67,240,214,42,26,107,74,80,150,215,206,252,154,252,69,226,231,105,237,178,1,118,73,51,184,24,61,137,206,38,246,77,45,243,50,184,9,194,69,96,208,158,36,205,61,49,97,52,197,109,191,220,147,253,43,120,127,100,107,159,32,60,127,46,223,28,234,125,76,150,79,136,102,90,254,18,89,171,134,200,9,136,175,41,65,93,86,160,129,108,65,57,39,170,109,107,215,31,20,96,76,24,125,238,194,174,186,3,57,143,228,211,208,3,62,127,20,143,217,176,81,64,178,201,162,128,200,57,162,0,176,193,161,120,146,115,194,114,91,72,146,181,216,57,142,89,81,134,173,188,161,7,207,101,49,28,40,220,66,38,187,16,90,145,86,21,83,202,199,5,219,36,209,90,57,150,123,180,200,194,234,242,128,199,137,43,124,130,242,137,208,6,170,82,60,241,170,233,107,227,27,15,128,122,25,197,34,15,45,190,24,52,160,147,4,30,199,11,49,89,245,162,116,254,103,36,73,156,107,98,43,205,87,117,72,197,228,99,99,34,94,92,49,191,4,122,182,136,67,28,142,39,53,155,247,177,102,107,226,35,231,150,89,129,191,56,192,225,216,42,23,6,218,192,5,227,202,38,54,193,22,92,104,0,216,192,131,197,135,77,76,210,109,152,136,66,190,144,5,45,189,55,114,112,70,91,240,96,225,98,147,81,120,60,217,104,152,45,24,169,125,83,246,186,234,37,99,184,233,112,72,201,127,234,100,71,20,166,80,163,135,206,200,161,204,163,98,118,178,153,67,47,159,106,142,33,159,253,40,99,31,214,242,105,173,147,36,114,31,23,37,114,53,89,180,203,127,61,225,201,22,132,39,235,8,211,142,218,122,210,91,168,47,26,173,35,77,155,159,235,73,251,91,144,246,215,145,198,126,229,122,218,241,22,180,227,2,218,218,224,90,164,253,220,240,9,148,50,4,29,13,127,217,252,139,6,218,208,201,95,60,16,3,197,160,117,74,220,27,58,66,205,15,125,18,7,184,220,18,69,130,60,17,101,90,43,136,232,3,101,65,201,11,30,165,165,127,152,144,145,67,122,70,182,165,102,150,204,111,18,35,143,19,65,180,207,222,139,166,105,142,118,99,149,246,26,177,30,33,47,122,169,236,43,27,165,43,154,141,123,189,228,216,75,220,152,164,188,73,135,72,246,218,48,167,124,52,229,142,108,37,220,105,225,70,15,96,144,197,208,13,68,190,227,18,171,254,159,223,142,43,245,235,170,137,17,141,117,106,177,3,141,173,149,214,106,0,213,34,35,133,240,108,114,185,228,125,222,117,145,119,221,66,154,127,233,2,186,142,239,143,28,247,230,130,64,234,183,111,155,212,42,38,243,87,85,61,98,81,38,173,80,196,82,248,155,138,194,116,161,225,236,173,231,91,229,92,219,203,165,24,207,203,102,65,166,103,236,26,60,100,121,159,253,104,34,249,206,52,48,101,164,157,198,92,210,88,161,205,198,150,105,182,213,76,218,222,34,67,95,161,169,190,150,84,145,209,2,54,95,76,146,190,161,164,232,95,196,167,234,94,179,29,165,9,87,42,127,255,46,3,114,65,43,143,15,127,143,26,90,83,111,27,186,239,54,145,205,62,77,96,95,78,128,79,109,254,172,65,159,244,242,10,111,101,74,185,118,190,152,155,120,236,62,49,198,166,88,241,252,152,149,71,108,43,114,198,160,148,28,104,201,138,234,47,134,75,47,32,187,148,46,66,250,101,228,124,22,36,2,131,154,145,34,56,241,216,72,217,119,31,180,147,93,156,74,227,240,98,250,90,76,67,88,87,219,60,172,3,232,112,26,215,105,187,155,187,148,236,149,161,122,171,171,125,165,170,86,6,98,107,28,135,34,185,126,93,54,43,223,101,191,9,251,144,12,73,138,141,211,89,14,112,219,176,11,93,146,229,158,62,33,160,114,136,107,99,171,246,115,126,196,176,155,134,100,52,80,150,103,247,11,146,128,213,5,11,11,210,56,233,230,252,123,206,195,4,148,135,90,133,144,36,244,169,221,13,123,82,165,168,45,3,255,61,88,196,78,68,213,41,167,98,148,206,145,153,255,96,65,112,97,185,45,242,193,38,199,58,78,124,72,71,19,28,192,84,18,98,182,164,106,96,244,165,19,24,83,29,232,21,97,178,64,138,38,151,66,50,60,69,76,121,170,133,160,108,143,84,206,228,113,133,240,81,152,89,177,68,191,180,105,190,147,161,28,46,200,50,155,31,238,49,223,229,171,188,128,195,48,32,97,27,195,46,225,162,81,120,87,98,188,5,235,48,232,210,77,9,86,244,123,66,182,61,76,207,112,240,180,129,183,240,231,195,58,110,75,217,247,202,229,37,246,31,56,82,78,254,109,14,28,251,185,207,4,214,6,169,204,70,234,7,11,134,110,36,42,156,169,24,169,16,149,91,9,119,77,191,189,96,83,210,231,207,126,122,243,186,209,206,102,173,143,113,103,19,254,109,5,200,97,107,50,196,59,203,128,95,67,108,43,130,142,172,73,224,239,44,1,126,63,176,173,4,58,178,38,193,104,163,4,117,230,14,22,111,90,49,103,122,103,130,84,153,227,76,188,120,86,90,35,37,255,120,96,75,49,57,118,177,160,174,16,244,244,103,42,35,115,123,42,34,184,177,122,202,89,68,22,62,174,156,69,53,97,214,78,165,126,3,176,51,138,200,37,99,230,193,110,26,240,215,185,179,75,205,70,67,153,11,243,139,6,119,163,39,88,69,12,121,134,14,7,12,47,225,66,12,164,168,95,98,120,211,138,64,149,203,50,196,22,217,38,120,198,135,1,188,53,130,92,254,166,189,114,155,153,184,85,108,249,240,41,55,219,44,43,79,138,246,6,23,45,166,201,2,135,23,16,76,87,96,153,186,34,150,146,237,236,42,26,235,20,229,39,240,5,210,40,29,167,66,89,120,154,37,3,31,182,109,254,132,32,162,207,195,69,201,24,107,29,162,66,214,44,165,19,156,39,222,245,60,38,72,147,79,44,249,183,33,240,194,117,248,71,2,21,153,155,40,80,124,128,181,42,105,204,15,57,233,47,253,193,192,120,223,51,58,6,130,141,77,202,70,246,172,99,255,63,48,60,75,84,185,88,248,96,212,233,55,254,112,178,102,17,211,45,25,27,19,136,98,247,251,234,129,116,232,36,150,196,225,140,182,132,153,144,8,146,66,30,169,216,35,168,198,164,246,88,168,139,64,179,69,180,194,121,74,191,3,144,200,17,106,177,224,127,183,252,23,28,53,75,87,231,56,0,0 };

From 254912aee51ee9e080b00f49094ba445250a6ed6 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Thu, 13 Jan 2022 21:29:22 +0000
Subject: [PATCH 06/11] Add a null check in updateControl

This means that calling any updates before the GUI is created will
now not cause a crash.
---
 src/ESPUI.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp
index 58e5081..43b8fb7 100644
--- a/src/ESPUI.cpp
+++ b/src/ESPUI.cpp
@@ -763,6 +763,11 @@ void ESPUIClass::updateControl(Control* control, int clientId)
         return;
     }
 
+    if (this->ws == nullptr)
+    {
+        return;
+    }
+
     String json;
     DynamicJsonDocument document(jsonUpdateDocumentSize);
     JsonObject root = document.to();

From 6a513e9f65378750dc1a774e47011863578fc519 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Fri, 14 Jan 2022 20:24:23 +0000
Subject: [PATCH 07/11] Allow Max control to add maxlength to text input.
 Update docs.

---
 README.md               | 11 +++++++++++
 data/js/controls.js     |  8 +++++++-
 data/js/controls.min.js |  2 +-
 src/dataControlsJS.h    |  4 ++--
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index da14940..409bc63 100644
--- a/README.md
+++ b/README.md
@@ -267,6 +267,17 @@ The textinput works very similar like the number input but with a string. You
 can enter a String into it and when you are done with your change it is sent to
 the ESP.
 
+If you attach a Max control to the text input then a max length will be applied
+to the control. 
+
+```
+ text = ESPUI.text("Label", callback, ControlColor::Dark, "Initial value");
+ ESPUI.addControl(ControlType::Max, "", "32", ControlColor::None, text);
+```
+
+However even with a set maximum length, user input should still be validated 
+because it is easy to bypass client-side checks.
+
 #### Graph
 
 ![graph](https://github.com/s00500/ESPUI/blob/master/docs/ui_graph.png)
diff --git a/data/js/controls.js b/data/js/controls.js
index d358b0b..10dd4a4 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -441,7 +441,13 @@ function start() {
         if (data.parentControl) {
           var parent = $("#id" + data.parentControl + " input");
           if (parent.size()) {
-            parent.attr("max", data.value);
+            if(!parent.attr("type")) {
+              //type is not set so therefore it is a text input
+              parent.attr("maxlength", data.value);
+            } else {
+              //type might be range (slider) or number
+              parent.attr("max", data.value);
+            }
           }
         }
         break;
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index ea012a9..54f4c41 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -26,7 +26,7 @@ data.selected+
 data.label+
 "");}
 break;case UI_MIN:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("min",data.value);}}
-break;case UI_MAX:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("max",data.value);}}
+break;case UI_MAX:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){if(!parent.attr("type")){parent.attr("maxlength",data.value);}else{parent.attr("max",data.value);}}}
 break;case UI_STEP:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("step",data.value);}}
 break;case UI_GRAPH:if(data.visible){addToHTML(data);graphData[data.id]=restoreGraphData(data.id);renderGraphSvg(graphData[data.id],"graph"+data.id);}
 break;case ADD_GRAPH_POINT:var ts=Math.round(new Date().getTime()/1000);graphData[data.id].push({x:ts,y:data.value});saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case CLEAR_GRAPH:graphData[data.id]=[];saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case UI_ACCEL:if(hasAccel)break;hasAccel=true;if(data.visible){addToHTML(data);requestOrientationPermission();}
diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h
index fa67d25..02a0539 100644
--- a/src/dataControlsJS.h
+++ b/src/dataControlsJS.h
@@ -27,7 +27,7 @@ data.selected+
 data.label+
 "");}
 break;case UI_MIN:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("min",data.value);}}
-break;case UI_MAX:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("max",data.value);}}
+break;case UI_MAX:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){if(!parent.attr("type")){parent.attr("maxlength",data.value);}else{parent.attr("max",data.value);}}}
 break;case UI_STEP:if(data.parentControl){var parent=$("#id"+data.parentControl+" input");if(parent.size()){parent.attr("step",data.value);}}
 break;case UI_GRAPH:if(data.visible){addToHTML(data);graphData[data.id]=restoreGraphData(data.id);renderGraphSvg(graphData[data.id],"graph"+data.id);}
 break;case ADD_GRAPH_POINT:var ts=Math.round(new Date().getTime()/1000);graphData[data.id].push({x:ts,y:data.value});saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case CLEAR_GRAPH:graphData[data.id]=[];saveGraphData();renderGraphSvg(graphData[data.id],"graph"+data.id);break;case UI_ACCEL:if(hasAccel)break;hasAccel=true;if(data.visible){addToHTML(data);requestOrientationPermission();}
@@ -90,4 +90,4 @@ value+"";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3831] PROGMEM = { 31,139,8,0,122,110,224,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,111,239,75,140,90,61,221,61,221,61,211,47,197,13,131,36,53,46,251,87,253,147,254,176,223,25,92,125,188,236,219,47,26,141,182,43,94,156,247,6,167,157,99,128,53,5,236,236,184,51,236,93,157,126,248,112,209,27,218,77,21,183,247,235,176,119,114,204,104,52,21,248,176,63,236,13,108,5,112,6,20,115,244,16,148,49,233,95,117,41,228,133,142,212,101,88,47,50,172,247,151,195,225,233,137,253,82,199,227,208,102,227,101,134,57,232,188,7,33,94,233,136,12,216,108,188,202,240,46,190,244,135,221,79,189,115,251,181,142,42,225,205,198,107,5,123,208,63,6,216,155,28,46,131,54,27,111,50,204,147,203,207,239,1,246,163,142,201,161,205,198,143,138,186,64,143,96,144,179,203,161,253,86,199,86,222,52,27,111,179,21,31,207,59,103,159,236,159,56,160,115,124,204,32,87,103,167,253,19,138,202,95,116,7,189,206,57,71,110,54,126,82,56,118,222,219,205,156,65,24,76,49,200,69,111,208,235,2,181,156,77,4,184,169,88,229,244,108,216,167,250,207,153,69,128,155,138,89,62,247,1,144,179,10,194,154,138,77,62,119,126,181,155,57,123,32,172,169,154,98,216,59,179,155,121,75,32,176,169,216,225,99,231,242,99,207,110,230,236,192,161,77,197,12,157,110,151,250,70,206,4,28,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,147,112,124,250,229,68,158,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,164,186,87,189,207,189,243,206,32,59,87,221,171,179,30,172,58,239,255,2,75,95,72,224,151,222,176,115,113,246,169,51,80,200,95,93,92,158,124,24,156,126,209,120,116,59,231,231,167,67,121,10,186,87,157,65,255,223,157,115,48,205,27,9,58,238,156,255,44,61,186,123,117,114,122,210,179,95,188,126,221,190,117,98,227,58,118,162,233,177,147,58,118,64,22,70,39,142,157,123,171,140,111,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,95,77,230,129,155,122,97,96,184,161,31,198,93,223,73,18,11,127,246,199,229,7,254,195,62,153,207,70,36,150,240,118,178,240,82,119,170,224,57,9,81,117,214,138,73,58,143,3,19,254,249,125,30,122,9,49,219,28,133,171,80,32,144,25,137,29,127,44,95,103,250,20,24,17,73,73,28,123,183,36,150,72,153,126,5,210,130,164,78,18,77,29,63,149,72,82,223,2,39,153,7,19,63,92,40,116,152,250,197,123,215,137,227,48,91,47,76,33,94,59,190,247,135,19,123,129,68,160,134,105,241,223,212,42,2,113,236,196,55,102,123,76,38,206,220,79,5,208,108,47,151,123,212,10,11,50,74,66,247,166,173,252,6,147,4,196,77,201,56,111,145,152,252,62,39,73,122,26,123,36,72,29,10,58,35,241,204,75,18,248,101,149,31,150,123,18,51,113,110,201,71,225,12,240,202,15,93,199,191,72,195,216,185,38,181,132,164,253,148,204,44,147,36,209,220,67,159,73,204,234,63,47,78,79,106,73,10,59,186,246,38,247,150,116,165,114,185,173,16,142,129,127,24,43,180,61,176,54,122,19,112,28,163,235,105,188,174,11,121,101,196,219,222,196,146,75,247,237,96,238,251,229,135,140,22,10,21,57,113,66,50,172,114,155,233,48,99,249,213,27,127,3,33,25,248,235,183,188,188,78,156,130,10,126,176,198,161,59,159,129,230,202,53,103,60,182,204,127,152,229,90,56,153,192,1,249,193,50,159,197,225,2,158,167,233,204,183,76,179,220,230,166,168,185,126,8,188,193,193,25,21,149,52,156,192,11,176,194,60,233,129,159,196,192,97,141,249,40,117,137,11,60,98,50,11,111,9,59,88,38,158,152,131,235,152,144,192,44,175,160,130,156,26,94,76,198,5,88,76,104,148,194,168,27,39,161,193,37,160,66,62,127,246,246,205,203,215,237,130,85,217,214,53,104,96,61,184,190,231,222,180,184,230,170,75,109,211,83,39,24,251,228,23,47,241,70,158,239,165,247,93,0,92,131,130,30,192,142,251,121,5,60,127,190,47,116,94,155,122,227,49,9,202,15,210,32,244,0,100,254,202,141,36,209,97,231,189,91,248,49,240,146,148,4,112,213,152,183,146,167,139,60,205,106,177,44,85,212,58,58,214,194,11,198,225,162,70,29,146,114,169,69,97,156,238,219,166,249,253,123,241,155,183,141,117,111,94,189,122,41,237,139,119,235,23,50,186,128,223,36,181,204,69,210,170,215,205,74,126,225,52,76,210,192,153,145,138,217,90,125,73,169,86,204,250,2,84,222,94,18,144,119,103,226,156,198,158,112,216,48,8,35,18,216,66,179,22,185,77,233,181,29,36,161,79,96,253,53,144,100,152,6,197,219,194,231,214,249,102,74,238,64,62,105,235,236,204,100,254,159,198,115,210,94,182,51,209,240,52,109,35,27,34,2,201,252,25,211,168,17,10,219,64,141,2,138,40,176,120,72,125,7,93,236,49,10,20,125,156,187,140,224,69,109,140,119,17,125,75,108,233,183,163,112,124,143,48,23,158,72,12,206,38,98,35,69,175,165,247,17,225,209,81,47,0,90,5,119,16,5,165,206,40,9,156,219,34,48,8,10,71,35,85,95,129,207,35,155,124,104,135,43,53,31,236,11,241,192,143,16,78,73,199,161,159,212,38,97,220,115,64,120,226,19,186,61,251,8,239,122,136,100,119,76,117,15,20,189,149,11,29,28,185,92,93,182,21,53,91,114,21,216,32,19,53,13,83,199,23,252,142,44,157,189,79,130,235,116,122,208,44,203,195,7,193,43,128,187,123,238,133,55,112,172,214,162,195,70,70,49,113,110,218,66,213,89,153,212,250,255,238,144,233,157,94,119,112,164,201,93,101,167,29,111,179,126,85,7,172,172,108,229,239,146,152,248,161,51,134,147,161,99,99,1,217,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,101,95,75,60,177,26,76,62,102,69,150,4,177,26,71,62,98,177,160,188,228,73,126,75,104,25,195,131,79,202,112,125,13,195,79,195,207,3,139,157,79,93,8,86,164,174,44,122,200,175,162,155,27,165,129,89,65,52,200,113,48,48,166,225,220,157,162,238,91,217,157,81,126,32,181,40,38,212,236,199,44,199,163,170,156,167,41,189,238,32,144,90,156,68,149,222,134,96,148,42,82,1,155,238,66,131,199,182,37,139,202,250,222,68,177,252,248,238,216,141,4,65,85,144,101,232,142,143,2,230,200,210,250,95,234,157,254,222,74,121,209,100,103,221,69,206,152,109,250,242,172,186,171,238,138,104,168,186,67,17,253,167,139,72,11,200,167,11,169,81,89,17,51,126,186,152,88,218,62,93,78,157,204,138,160,163,167,11,74,171,243,167,203,169,81,89,17,211,125,186,152,172,57,240,116,65,115,116,54,158,110,108,111,61,126,248,98,154,3,95,96,92,183,246,87,242,128,21,178,195,206,251,85,154,122,226,225,68,17,70,160,67,223,59,58,116,140,48,152,1,37,50,143,236,18,224,176,125,72,141,86,204,114,201,152,198,100,98,151,40,5,5,94,58,226,15,120,205,84,204,195,186,115,116,88,7,146,133,25,141,228,57,246,110,13,111,140,172,52,98,135,117,120,67,215,210,117,54,16,168,233,4,224,105,68,198,93,246,108,65,253,27,70,45,106,166,101,25,243,54,203,116,34,143,113,118,0,123,226,249,144,172,89,210,108,180,76,193,18,243,7,43,157,122,9,200,147,166,80,130,208,141,153,101,219,182,33,19,166,251,62,72,195,3,118,151,66,57,143,206,100,34,220,172,170,14,64,243,9,16,199,142,226,112,22,65,202,60,116,70,70,26,26,108,33,253,101,5,216,77,49,160,124,3,159,124,199,242,184,125,186,159,26,67,130,21,22,60,66,78,224,248,36,166,36,166,78,74,105,26,227,144,36,70,16,166,6,185,131,66,201,104,253,246,27,22,3,5,62,87,224,82,172,53,40,205,15,153,45,172,232,178,76,130,137,205,64,84,189,207,18,200,121,220,148,219,64,71,109,179,199,204,104,97,132,69,29,181,27,251,105,86,246,132,237,246,204,146,129,46,96,151,4,148,121,4,125,33,32,140,25,161,216,71,2,134,73,5,0,14,235,140,230,145,185,186,163,207,253,109,183,227,141,139,182,82,49,13,47,136,230,41,51,1,223,86,226,253,1,5,110,249,65,236,18,93,97,230,5,166,30,54,87,100,233,252,250,119,201,226,220,61,34,11,237,200,254,77,194,64,185,30,61,34,13,54,195,31,191,201,100,147,232,43,247,157,111,246,74,247,73,92,228,109,144,0,110,58,124,113,113,123,109,173,174,173,154,8,203,238,126,221,121,114,253,251,22,30,218,196,254,236,164,211,90,28,206,193,173,105,97,14,20,97,199,180,169,53,244,102,240,171,222,108,52,26,69,146,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,83,152,107,205,237,34,185,34,183,50,94,104,21,40,236,235,183,191,152,159,232,209,83,243,137,158,114,153,189,151,45,102,44,251,31,15,84,27,155,153,185,163,173,76,142,176,82,86,83,183,172,238,224,14,39,88,131,64,167,139,224,44,14,35,184,52,239,173,18,175,218,46,210,123,159,148,202,44,204,169,132,132,3,195,107,238,193,234,138,98,145,100,210,189,33,167,134,120,209,48,223,53,90,205,63,39,90,242,100,217,88,202,176,134,22,138,166,157,212,61,150,46,92,209,246,164,165,221,5,176,74,65,172,154,224,246,166,210,103,251,251,182,196,203,70,74,11,130,166,66,12,4,219,217,7,116,74,187,136,165,148,175,152,203,144,187,244,47,146,45,71,106,39,55,96,133,244,74,16,127,170,104,43,196,118,17,142,23,228,171,245,246,83,36,211,41,237,34,86,86,243,102,67,240,214,42,26,107,74,80,150,215,206,252,154,252,69,226,231,105,237,178,1,118,73,51,184,24,61,137,206,38,246,77,45,243,50,184,9,194,69,96,208,158,36,205,61,49,97,52,197,109,191,220,147,253,43,120,127,100,107,159,32,60,127,46,223,28,234,125,76,150,79,136,102,90,254,18,89,171,134,200,9,136,175,41,65,93,86,160,129,108,65,57,39,170,109,107,215,31,20,96,76,24,125,238,194,174,186,3,57,143,228,211,208,3,62,127,20,143,217,176,81,64,178,201,162,128,200,57,162,0,176,193,161,120,146,115,194,114,91,72,146,181,216,57,142,89,81,134,173,188,161,7,207,101,49,28,40,220,66,38,187,16,90,145,86,21,83,202,199,5,219,36,209,90,57,150,123,180,200,194,234,242,128,199,137,43,124,130,242,137,208,6,170,82,60,241,170,233,107,227,27,15,128,122,25,197,34,15,45,190,24,52,160,147,4,30,199,11,49,89,245,162,116,254,103,36,73,156,107,98,43,205,87,117,72,197,228,99,99,34,94,92,49,191,4,122,182,136,67,28,142,39,53,155,247,177,102,107,226,35,231,150,89,129,191,56,192,225,216,42,23,6,218,192,5,227,202,38,54,193,22,92,104,0,216,192,131,197,135,77,76,210,109,152,136,66,190,144,5,45,189,55,114,112,70,91,240,96,225,98,147,81,120,60,217,104,152,45,24,169,125,83,246,186,234,37,99,184,233,112,72,201,127,234,100,71,20,166,80,163,135,206,200,161,204,163,98,118,178,153,67,47,159,106,142,33,159,253,40,99,31,214,242,105,173,147,36,114,31,23,37,114,53,89,180,203,127,61,225,201,22,132,39,235,8,211,142,218,122,210,91,168,47,26,173,35,77,155,159,235,73,251,91,144,246,215,145,198,126,229,122,218,241,22,180,227,2,218,218,224,90,164,253,220,240,9,148,50,4,29,13,127,217,252,139,6,218,208,201,95,60,16,3,197,160,117,74,220,27,58,66,205,15,125,18,7,184,220,18,69,130,60,17,101,90,43,136,232,3,101,65,201,11,30,165,165,127,152,144,145,67,122,70,182,165,102,150,204,111,18,35,143,19,65,180,207,222,139,166,105,142,118,99,149,246,26,177,30,33,47,122,169,236,43,27,165,43,154,141,123,189,228,216,75,220,152,164,188,73,135,72,246,218,48,167,124,52,229,142,108,37,220,105,225,70,15,96,144,197,208,13,68,190,227,18,171,254,159,223,142,43,245,235,170,137,17,141,117,106,177,3,141,173,149,214,106,0,213,34,35,133,240,108,114,185,228,125,222,117,145,119,221,66,154,127,233,2,186,142,239,143,28,247,230,130,64,234,183,111,155,212,42,38,243,87,85,61,98,81,38,173,80,196,82,248,155,138,194,116,161,225,236,173,231,91,229,92,219,203,165,24,207,203,102,65,166,103,236,26,60,100,121,159,253,104,34,249,206,52,48,101,164,157,198,92,210,88,161,205,198,150,105,182,213,76,218,222,34,67,95,161,169,190,150,84,145,209,2,54,95,76,146,190,161,164,232,95,196,167,234,94,179,29,165,9,87,42,127,255,46,3,114,65,43,143,15,127,143,26,90,83,111,27,186,239,54,145,205,62,77,96,95,78,128,79,109,254,172,65,159,244,242,10,111,101,74,185,118,190,152,155,120,236,62,49,198,166,88,241,252,152,149,71,108,43,114,198,160,148,28,104,201,138,234,47,134,75,47,32,187,148,46,66,250,101,228,124,22,36,2,131,154,145,34,56,241,216,72,217,119,31,180,147,93,156,74,227,240,98,250,90,76,67,88,87,219,60,172,3,232,112,26,215,105,187,155,187,148,236,149,161,122,171,171,125,165,170,86,6,98,107,28,135,34,185,126,93,54,43,223,101,191,9,251,144,12,73,138,141,211,89,14,112,219,176,11,93,146,229,158,62,33,160,114,136,107,99,171,246,115,126,196,176,155,134,100,52,80,150,103,247,11,146,128,213,5,11,11,210,56,233,230,252,123,206,195,4,148,135,90,133,144,36,244,169,221,13,123,82,165,168,45,3,255,61,88,196,78,68,213,41,167,98,148,206,145,153,255,96,65,112,97,185,45,242,193,38,199,58,78,124,72,71,19,28,192,84,18,98,182,164,106,96,244,165,19,24,83,29,232,21,97,178,64,138,38,151,66,50,60,69,76,121,170,133,160,108,143,84,206,228,113,133,240,81,152,89,177,68,191,180,105,190,147,161,28,46,200,50,155,31,238,49,223,229,171,188,128,195,48,32,97,27,195,46,225,162,81,120,87,98,188,5,235,48,232,210,77,9,86,244,123,66,182,61,76,207,112,240,180,129,183,240,231,195,58,110,75,217,247,202,229,37,246,31,56,82,78,254,109,14,28,251,185,207,4,214,6,169,204,70,234,7,11,134,110,36,42,156,169,24,169,16,149,91,9,119,77,191,189,96,83,210,231,207,126,122,243,186,209,206,102,173,143,113,103,19,254,109,5,200,97,107,50,196,59,203,128,95,67,108,43,130,142,172,73,224,239,44,1,126,63,176,173,4,58,178,38,193,104,163,4,117,230,14,22,111,90,49,103,122,103,130,84,153,227,76,188,120,86,90,35,37,255,120,96,75,49,57,118,177,160,174,16,244,244,103,42,35,115,123,42,34,184,177,122,202,89,68,22,62,174,156,69,53,97,214,78,165,126,3,176,51,138,200,37,99,230,193,110,26,240,215,185,179,75,205,70,67,153,11,243,139,6,119,163,39,88,69,12,121,134,14,7,12,47,225,66,12,164,168,95,98,120,211,138,64,149,203,50,196,22,217,38,120,198,135,1,188,53,130,92,254,166,189,114,155,153,184,85,108,249,240,41,55,219,44,43,79,138,246,6,23,45,166,201,2,135,23,16,76,87,96,153,186,34,150,146,237,236,42,26,235,20,229,39,240,5,210,40,29,167,66,89,120,154,37,3,31,182,109,254,132,32,162,207,195,69,201,24,107,29,162,66,214,44,165,19,156,39,222,245,60,38,72,147,79,44,249,183,33,240,194,117,248,71,2,21,153,155,40,80,124,128,181,42,105,204,15,57,233,47,253,193,192,120,223,51,58,6,130,141,77,202,70,246,172,99,255,63,48,60,75,84,185,88,248,96,212,233,55,254,112,178,102,17,211,45,25,27,19,136,98,247,251,234,129,116,232,36,150,196,225,140,182,132,153,144,8,146,66,30,169,216,35,168,198,164,246,88,168,139,64,179,69,180,194,121,74,191,3,144,200,17,106,177,224,127,183,252,23,28,53,75,87,231,56,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3853] PROGMEM = { 31,139,8,0,223,219,225,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,247,238,75,140,90,61,221,61,221,61,211,47,197,13,131,36,53,46,251,87,253,147,254,176,223,25,92,125,188,236,219,47,26,141,182,43,94,156,247,6,167,157,99,128,53,5,236,236,184,51,236,93,157,126,248,112,209,27,218,77,21,183,247,235,176,119,114,204,104,52,21,248,176,63,236,13,108,5,112,6,20,115,244,16,148,49,233,95,117,41,228,133,142,212,101,88,47,50,172,247,151,195,225,233,137,253,82,199,227,208,102,227,101,134,57,232,188,7,33,94,233,136,12,216,108,188,202,240,46,190,244,135,221,79,189,115,251,181,142,42,225,205,198,107,5,123,208,63,6,216,155,28,46,131,54,27,111,50,204,147,203,207,239,1,246,163,142,201,161,205,198,143,138,186,64,143,96,144,179,203,161,253,86,199,86,222,52,27,111,179,21,31,207,59,103,159,236,159,56,160,115,124,204,32,87,103,167,253,19,138,202,95,116,7,189,206,57,71,110,54,126,82,56,118,222,219,205,156,65,24,76,49,200,69,111,208,235,2,181,156,77,4,184,169,88,229,244,108,216,167,250,207,153,69,128,155,138,89,62,247,1,144,179,10,194,154,138,77,62,119,126,181,155,57,123,32,172,169,154,98,216,59,179,155,121,75,32,176,169,216,225,99,231,242,99,207,110,230,236,192,161,77,197,12,157,110,151,250,70,206,4,28,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,147,112,124,250,229,68,158,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,164,186,87,189,207,189,243,206,32,59,87,221,171,179,30,172,58,239,255,2,75,95,72,224,151,222,176,115,113,246,169,51,80,200,95,93,92,158,124,24,156,126,209,120,116,59,231,231,167,67,121,10,186,87,157,65,255,223,157,115,48,205,27,9,58,238,156,255,44,61,186,123,117,114,122,210,179,95,188,126,221,190,117,98,227,58,118,162,233,177,147,58,118,64,22,70,39,142,157,123,171,140,111,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,95,77,230,129,155,122,97,96,184,161,31,198,93,223,73,18,11,127,246,199,229,7,254,195,62,153,207,70,36,150,240,118,178,240,82,119,170,224,57,9,81,117,214,138,73,58,143,3,19,254,249,125,30,122,9,49,219,28,133,171,80,32,144,25,137,29,127,44,95,103,250,20,24,17,73,73,28,123,183,36,150,72,153,126,5,210,130,164,78,18,77,29,63,149,72,82,223,2,39,153,7,19,63,92,40,116,152,250,197,123,215,137,227,48,91,47,76,33,94,59,190,247,135,19,123,129,68,160,134,105,241,223,212,42,2,113,236,196,55,102,123,76,38,206,220,79,5,208,108,47,151,123,212,10,11,50,74,66,247,166,173,252,6,147,4,196,77,201,56,111,145,152,252,62,39,73,122,26,123,36,72,29,10,58,35,241,204,75,18,248,101,149,31,150,123,18,51,113,110,201,71,225,12,240,202,15,93,199,191,72,195,216,185,38,181,132,164,253,148,204,44,147,36,209,220,67,159,73,204,234,63,47,78,79,106,73,10,59,186,246,38,247,150,116,165,114,185,173,16,142,129,127,24,43,180,61,176,54,122,19,112,28,163,235,105,188,174,11,121,101,196,219,222,196,146,75,247,237,96,238,251,229,135,140,22,10,21,57,113,66,50,172,114,155,233,48,99,249,213,27,127,3,33,25,248,235,183,188,188,78,156,130,10,126,176,198,161,59,159,129,230,202,53,103,60,182,204,127,152,229,90,56,153,192,1,249,193,50,159,197,225,2,158,167,233,204,183,76,179,220,230,166,168,185,126,8,188,193,193,25,21,149,52,156,192,11,176,194,60,233,129,159,196,192,97,141,249,40,117,137,11,60,98,50,11,111,9,59,88,38,158,152,131,235,152,144,192,44,175,160,130,156,26,94,76,198,5,88,76,104,148,194,168,27,39,161,193,37,160,66,62,127,246,246,205,203,215,237,130,85,217,214,53,104,96,61,184,190,231,222,180,184,230,170,75,109,211,83,39,24,251,228,23,47,241,70,158,239,165,247,93,0,92,131,130,30,192,142,251,121,5,60,127,190,47,116,94,155,122,227,49,9,202,15,210,32,244,0,100,254,202,141,36,209,97,231,189,91,248,49,240,146,148,4,112,213,152,183,146,167,139,60,205,106,177,44,85,212,58,58,214,194,11,198,225,162,70,29,146,114,169,69,97,156,238,219,166,249,253,123,241,155,183,141,117,111,94,189,122,41,237,139,119,235,23,50,186,128,223,36,181,204,69,210,170,215,205,74,126,225,52,76,210,192,153,145,138,217,90,125,73,169,86,204,250,2,84,222,94,18,144,119,103,226,156,198,158,112,216,48,8,35,18,216,66,179,22,185,77,233,181,29,36,161,79,96,253,53,144,100,152,6,197,219,194,231,214,249,102,74,238,64,62,105,235,236,204,100,254,159,198,115,210,94,182,51,209,240,52,109,35,27,34,2,201,252,25,211,168,17,10,219,64,141,2,138,40,176,120,72,125,7,93,236,49,10,20,125,156,187,140,224,69,109,140,119,17,125,75,108,233,183,163,112,124,143,48,23,158,72,12,206,38,98,35,69,175,165,247,17,225,209,81,47,0,90,5,119,16,5,165,206,40,9,156,219,34,48,8,10,71,35,85,95,129,207,35,155,124,104,135,43,53,31,236,11,241,192,143,16,78,73,199,161,159,212,38,97,220,115,64,120,226,19,186,61,251,8,239,122,136,100,119,76,117,15,20,189,149,11,29,28,185,92,93,182,21,53,91,114,21,216,32,19,53,13,83,199,23,252,142,44,157,189,79,130,235,116,122,208,44,203,195,7,193,43,128,187,123,238,133,55,112,172,214,162,195,70,70,49,113,110,218,66,213,89,153,212,250,255,238,144,233,157,94,119,112,164,201,93,101,167,29,111,179,126,85,7,172,172,108,229,239,146,152,248,161,51,134,147,161,99,99,1,217,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,101,95,75,60,177,26,76,62,102,69,150,4,177,26,71,62,98,177,160,188,228,73,126,75,104,25,195,131,79,202,112,125,13,195,79,195,207,3,139,157,79,93,8,86,164,174,44,122,200,175,162,155,27,165,129,89,65,52,200,113,48,48,166,225,220,157,162,238,91,217,157,81,126,32,181,40,38,212,236,199,44,199,163,170,156,167,41,189,238,32,144,90,156,68,149,222,134,96,148,42,82,1,155,238,66,131,199,182,37,139,202,250,222,68,177,252,248,238,216,141,4,65,85,144,101,232,142,143,2,230,200,210,250,95,234,157,254,222,74,121,209,100,103,221,69,206,152,109,250,242,172,186,171,238,138,104,168,186,67,17,253,167,139,72,11,200,167,11,169,81,89,17,51,126,186,152,88,218,62,93,78,157,204,138,160,163,167,11,74,171,243,167,203,169,81,89,17,211,125,186,152,172,57,240,116,65,115,116,54,158,110,108,111,61,126,248,98,154,3,95,96,92,183,246,87,242,128,21,178,195,206,251,85,154,122,226,225,68,17,70,160,67,223,59,58,116,140,48,152,1,37,50,143,236,18,224,176,125,72,141,86,204,114,201,152,198,100,98,151,40,5,5,94,58,226,15,120,205,84,204,195,186,115,116,88,7,146,133,25,141,228,57,246,110,13,111,140,172,52,98,135,117,120,67,215,210,117,54,16,168,233,4,224,105,68,198,93,246,108,65,253,27,70,45,106,166,101,25,243,54,203,116,34,143,113,118,0,123,226,249,144,172,89,210,108,180,76,193,18,243,7,43,157,122,9,200,147,166,80,130,208,141,153,101,219,182,33,19,166,251,62,72,195,3,118,151,66,57,143,206,100,34,220,172,170,14,64,243,9,16,199,142,226,112,22,65,202,60,116,70,70,26,26,108,33,253,101,5,216,77,49,160,124,3,159,124,199,242,184,125,186,159,26,67,130,21,22,60,66,78,224,248,36,166,36,166,78,74,105,26,227,144,36,70,16,166,6,185,131,66,201,104,253,246,27,22,3,5,62,87,224,82,172,53,40,205,15,153,45,172,232,178,76,130,137,205,64,84,189,207,18,200,121,220,148,219,64,71,109,179,199,204,104,97,132,69,29,181,27,251,105,86,246,132,237,246,204,146,129,46,96,151,4,148,121,4,125,33,32,140,25,161,216,71,2,134,73,5,0,14,235,140,230,145,185,186,163,207,253,109,183,227,141,139,182,82,49,13,47,136,230,41,51,1,223,86,226,253,1,5,110,249,65,236,18,93,97,230,5,166,30,54,87,100,233,252,250,247,201,66,29,68,147,135,22,22,230,138,144,206,29,203,7,115,162,98,193,153,199,204,111,103,229,2,26,246,206,254,71,202,133,146,63,122,68,187,216,80,127,252,54,148,141,166,175,220,255,190,217,43,29,44,17,12,218,32,1,220,150,248,226,226,246,218,90,93,91,53,17,150,197,15,221,1,115,51,128,22,30,252,196,254,236,164,211,90,28,206,225,104,208,226,30,40,194,142,105,99,108,232,205,224,87,189,217,104,52,138,36,173,69,243,100,106,61,220,181,210,164,122,223,202,180,1,39,57,215,222,219,69,114,69,110,101,68,209,42,80,216,215,111,127,49,63,209,231,167,230,19,125,233,50,123,47,219,212,216,58,120,60,216,109,108,136,230,174,7,101,250,132,213,182,154,254,101,181,11,119,56,193,26,4,58,93,4,103,113,24,193,197,123,111,149,120,229,119,145,222,251,164,84,102,161,82,37,36,28,24,94,115,15,86,87,20,139,36,19,247,13,121,57,196,156,134,249,174,209,106,254,57,209,146,39,203,198,210,142,53,180,80,52,237,164,238,177,148,227,138,182,56,45,237,46,128,85,10,98,213,4,183,55,149,94,221,255,110,75,188,244,164,180,32,240,42,196,64,176,157,125,64,167,180,139,88,74,9,140,249,16,185,75,255,34,217,114,164,118,114,3,86,140,175,36,2,79,21,109,133,216,46,194,241,162,126,181,102,127,138,100,58,165,93,196,202,234,230,108,144,222,90,69,99,141,13,202,242,218,153,95,147,191,72,252,60,173,93,54,192,46,105,6,23,227,43,209,29,197,222,171,101,94,6,55,65,184,8,12,154,126,208,252,21,147,78,83,220,246,203,61,217,3,131,247,71,182,246,25,195,243,231,242,205,161,222,11,101,249,132,104,200,229,47,145,181,106,136,156,128,248,154,18,212,101,5,26,200,22,148,115,162,218,182,118,253,65,17,199,132,209,103,55,236,170,59,144,51,77,62,81,61,224,51,76,241,152,13,44,5,36,155,78,10,136,156,69,10,0,27,62,138,39,57,107,44,183,133,36,89,155,158,227,152,21,101,96,203,155,130,240,92,22,249,94,225,22,50,217,133,208,138,180,170,152,82,62,46,216,38,137,214,202,177,220,163,133,26,86,168,7,60,78,92,225,19,148,96,132,54,97,149,2,140,87,94,95,27,223,120,0,212,75,49,22,121,104,1,199,160,1,157,70,240,56,94,136,201,42,32,101,122,48,35,73,226,92,19,91,105,224,170,131,46,38,31,27,53,241,2,141,249,37,208,179,69,28,226,112,60,169,217,204,144,53,108,19,31,57,183,204,10,252,197,33,16,199,86,185,48,208,6,46,24,87,54,177,9,182,224,66,3,192,6,30,44,62,108,98,146,110,195,68,52,3,10,89,208,242,125,35,7,103,180,5,15,22,46,54,25,133,199,147,141,134,217,130,145,218,123,101,175,171,94,50,134,155,14,75,47,254,83,39,59,162,48,133,26,61,116,70,14,101,30,21,179,147,13,33,122,249,84,115,12,249,252,72,25,29,177,182,81,107,157,36,145,251,184,40,145,171,201,162,93,254,235,9,79,182,32,60,89,71,152,118,229,214,147,222,66,125,209,104,29,105,218,64,93,79,218,223,130,180,191,142,52,246,60,215,211,142,183,160,29,23,208,214,134,223,34,237,231,134,79,160,148,33,232,104,248,203,230,95,69,208,154,63,127,241,64,12,20,195,218,41,113,111,232,24,54,63,56,74,28,224,114,75,20,9,242,68,148,137,175,32,162,15,165,5,37,47,120,148,150,254,113,67,70,14,233,25,217,150,154,89,50,191,73,140,60,78,4,209,62,123,47,26,175,57,218,141,85,218,107,196,122,132,188,232,199,178,47,117,148,206,106,54,50,246,146,99,47,113,99,146,242,70,31,34,217,107,195,156,242,225,149,59,178,149,112,167,133,27,61,128,65,22,67,55,16,249,142,75,172,250,127,126,59,174,212,175,171,38,70,52,214,237,197,46,54,182,86,90,171,1,84,139,140,20,194,179,201,229,146,247,138,215,69,222,117,11,105,254,165,11,232,58,190,63,114,220,155,11,2,169,223,190,109,82,171,152,204,95,85,245,136,69,153,180,66,17,75,225,111,42,10,211,133,134,179,183,158,111,149,115,109,47,151,98,196,47,155,5,153,158,177,107,240,144,229,125,246,163,137,228,59,211,192,148,145,118,43,115,73,99,133,54,44,91,166,217,86,51,105,123,139,12,125,133,166,250,90,82,69,70,11,216,124,49,73,250,134,146,162,127,17,159,170,123,205,118,148,38,92,169,252,253,187,12,200,5,173,60,62,64,62,106,104,77,189,109,232,190,219,68,54,251,188,129,125,125,1,62,181,249,211,8,125,90,204,43,188,149,73,231,218,25,101,110,106,178,251,212,25,155,98,197,51,104,86,30,177,173,200,57,133,82,114,160,37,43,170,191,24,46,189,128,236,82,186,8,233,215,149,243,89,144,8,12,106,70,138,224,196,99,35,101,223,142,208,110,120,113,42,141,3,144,233,107,49,81,97,157,113,243,176,14,160,195,105,92,167,45,115,238,82,178,87,134,234,173,174,246,149,170,90,25,136,237,117,28,172,228,250,117,217,188,125,151,253,38,236,99,52,36,41,54,78,231,65,192,109,195,46,116,73,150,123,250,148,129,202,33,174,141,173,218,207,249,49,197,110,26,146,209,64,89,158,221,47,72,2,86,23,44,44,72,227,164,155,243,111,66,15,19,80,30,106,21,66,146,208,167,118,55,236,73,149,162,182,12,252,247,96,17,59,17,85,167,156,172,81,58,71,102,254,163,7,193,133,229,182,200,7,155,28,235,56,241,65,31,77,112,0,83,73,136,217,146,170,129,209,151,78,113,76,117,40,88,132,201,2,41,154,92,10,201,240,20,49,229,169,22,130,178,61,82,57,147,199,21,194,199,105,102,197,18,253,210,166,249,78,134,114,184,32,203,108,6,185,199,124,151,175,242,2,14,195,128,132,109,12,187,132,139,70,225,93,137,241,22,172,195,160,75,55,37,88,209,111,18,217,246,48,61,195,225,213,6,222,194,159,15,235,184,45,101,223,43,151,151,216,127,224,72,57,249,247,61,112,236,231,62,19,88,27,198,50,27,169,31,61,24,186,145,168,112,166,98,164,66,84,110,37,220,53,253,126,131,77,90,159,63,251,233,205,235,70,59,155,215,62,198,157,125,37,176,173,0,57,108,77,134,120,103,25,240,139,138,109,69,208,145,53,9,252,157,37,192,111,16,182,149,64,71,214,36,24,109,148,160,206,220,193,226,77,43,230,76,239,76,144,42,115,156,137,23,207,74,107,164,228,31,32,108,41,38,199,46,22,212,21,130,158,254,76,101,100,110,79,69,4,55,86,79,57,139,200,194,199,149,179,168,38,204,218,169,212,111,0,118,70,17,185,100,204,60,216,77,3,254,58,119,118,169,217,104,40,179,101,126,209,224,110,244,4,171,136,33,207,208,225,128,225,37,92,136,129,20,245,75,12,111,90,17,168,114,89,134,216,34,219,4,207,248,48,128,183,70,144,203,223,180,87,110,51,19,183,138,45,31,62,41,103,155,101,229,73,209,222,224,162,197,52,89,224,240,2,130,233,10,44,83,87,196,82,178,157,93,69,99,157,162,252,20,191,64,26,165,227,84,40,11,79,179,100,224,195,182,205,159,16,68,244,121,184,40,25,99,173,67,84,200,154,165,116,130,243,196,187,158,199,4,105,242,137,37,255,190,4,94,184,14,255,208,160,34,115,19,5,138,15,176,86,37,141,249,33,39,253,165,63,24,24,239,123,70,199,64,176,177,73,217,200,158,117,236,255,6,195,179,68,149,139,133,15,70,157,254,63,1,56,89,179,136,233,150,140,141,9,68,177,251,125,245,64,58,116,18,75,226,112,70,91,194,76,72,4,73,33,143,84,236,17,84,99,82,123,44,212,69,160,217,34,90,225,60,165,223,1,72,228,8,181,88,240,63,100,254,11,99,55,32,241,43,57,0,0 };

From 9eddf2c50406b4bd97d68fe48bffcb20af9bea67 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Sat, 15 Jan 2022 14:29:03 +0000
Subject: [PATCH 08/11] Improve documentation.

---
 README.md | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 409bc63..ee04e88 100644
--- a/README.md
+++ b/README.md
@@ -259,6 +259,12 @@ A number box needs to have a min and a max value. To set it up just use:
 
 `ESPUI.number("Numbertest", &numberCall, ControlColor::Alizarin, 5, 0, 10);`
 
+Note that HTML number boxes will respect their min and max when the user
+clicks the up and down arrows, but it is possible on most clients to simply type 
+any number in. As with all user input, numbers should be validated in callback code
+because all client side checks can be skipped. If any value from the UI might
+cause a problem, validate it.
+
 #### Text Input
 
 ![text](https://github.com/s00500/ESPUI/blob/master/docs/ui_text.png)
@@ -276,7 +282,7 @@ to the control.
 ```
 
 However even with a set maximum length, user input should still be validated 
-because it is easy to bypass client-side checks.
+because it is easy to bypass client-side checks. Never trust user input.
 
 #### Graph
 

From 12a3fb6c80927ee706be9aee770af28a1b654e98 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Sat, 15 Jan 2022 14:29:38 +0000
Subject: [PATCH 09/11] Fix bug with sliders getting out of sync.

---
 data/js/controls.js     | 4 ++++
 data/js/controls.min.js | 2 +-
 src/dataControlsJS.h    | 4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 10dd4a4..0b6e4d4 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -591,6 +591,10 @@ function start() {
 function sliderchange(number) {
   var val = $("#sl" + number).val();
   websock.send("slvalue:" + val + ":" + number);
+
+  $(".range-slider__range").each(function(){ 
+    $(this).attr("value", $(this)[0].value);
+  });
 }
 
 function numberchange(number) {
diff --git a/data/js/controls.min.js b/data/js/controls.min.js
index 54f4c41..1a89fe9 100644
--- a/data/js/controls.min.js
+++ b/data/js/controls.min.js
@@ -43,7 +43,7 @@ break;case UPDATE_ACCEL:break;default:console.error("Unknown type or event");bre
 if(data.type>=UPDATE_OFFSET&&data.type=UPDATE_OFFSET&&data.type";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3853] PROGMEM = { 31,139,8,0,223,219,225,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,247,238,75,140,90,61,221,61,221,61,211,47,197,13,131,36,53,46,251,87,253,147,254,176,223,25,92,125,188,236,219,47,26,141,182,43,94,156,247,6,167,157,99,128,53,5,236,236,184,51,236,93,157,126,248,112,209,27,218,77,21,183,247,235,176,119,114,204,104,52,21,248,176,63,236,13,108,5,112,6,20,115,244,16,148,49,233,95,117,41,228,133,142,212,101,88,47,50,172,247,151,195,225,233,137,253,82,199,227,208,102,227,101,134,57,232,188,7,33,94,233,136,12,216,108,188,202,240,46,190,244,135,221,79,189,115,251,181,142,42,225,205,198,107,5,123,208,63,6,216,155,28,46,131,54,27,111,50,204,147,203,207,239,1,246,163,142,201,161,205,198,143,138,186,64,143,96,144,179,203,161,253,86,199,86,222,52,27,111,179,21,31,207,59,103,159,236,159,56,160,115,124,204,32,87,103,167,253,19,138,202,95,116,7,189,206,57,71,110,54,126,82,56,118,222,219,205,156,65,24,76,49,200,69,111,208,235,2,181,156,77,4,184,169,88,229,244,108,216,167,250,207,153,69,128,155,138,89,62,247,1,144,179,10,194,154,138,77,62,119,126,181,155,57,123,32,172,169,154,98,216,59,179,155,121,75,32,176,169,216,225,99,231,242,99,207,110,230,236,192,161,77,197,12,157,110,151,250,70,206,4,28,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,147,112,124,250,229,68,158,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,164,186,87,189,207,189,243,206,32,59,87,221,171,179,30,172,58,239,255,2,75,95,72,224,151,222,176,115,113,246,169,51,80,200,95,93,92,158,124,24,156,126,209,120,116,59,231,231,167,67,121,10,186,87,157,65,255,223,157,115,48,205,27,9,58,238,156,255,44,61,186,123,117,114,122,210,179,95,188,126,221,190,117,98,227,58,118,162,233,177,147,58,118,64,22,70,39,142,157,123,171,140,111,166,78,210,113,93,226,219,19,199,79,8,130,18,223,27,147,184,27,6,169,23,204,195,121,194,95,77,230,129,155,122,97,96,184,161,31,198,93,223,73,18,11,127,246,199,229,7,254,195,62,153,207,70,36,150,240,118,178,240,82,119,170,224,57,9,81,117,214,138,73,58,143,3,19,254,249,125,30,122,9,49,219,28,133,171,80,32,144,25,137,29,127,44,95,103,250,20,24,17,73,73,28,123,183,36,150,72,153,126,5,210,130,164,78,18,77,29,63,149,72,82,223,2,39,153,7,19,63,92,40,116,152,250,197,123,215,137,227,48,91,47,76,33,94,59,190,247,135,19,123,129,68,160,134,105,241,223,212,42,2,113,236,196,55,102,123,76,38,206,220,79,5,208,108,47,151,123,212,10,11,50,74,66,247,166,173,252,6,147,4,196,77,201,56,111,145,152,252,62,39,73,122,26,123,36,72,29,10,58,35,241,204,75,18,248,101,149,31,150,123,18,51,113,110,201,71,225,12,240,202,15,93,199,191,72,195,216,185,38,181,132,164,253,148,204,44,147,36,209,220,67,159,73,204,234,63,47,78,79,106,73,10,59,186,246,38,247,150,116,165,114,185,173,16,142,129,127,24,43,180,61,176,54,122,19,112,28,163,235,105,188,174,11,121,101,196,219,222,196,146,75,247,237,96,238,251,229,135,140,22,10,21,57,113,66,50,172,114,155,233,48,99,249,213,27,127,3,33,25,248,235,183,188,188,78,156,130,10,126,176,198,161,59,159,129,230,202,53,103,60,182,204,127,152,229,90,56,153,192,1,249,193,50,159,197,225,2,158,167,233,204,183,76,179,220,230,166,168,185,126,8,188,193,193,25,21,149,52,156,192,11,176,194,60,233,129,159,196,192,97,141,249,40,117,137,11,60,98,50,11,111,9,59,88,38,158,152,131,235,152,144,192,44,175,160,130,156,26,94,76,198,5,88,76,104,148,194,168,27,39,161,193,37,160,66,62,127,246,246,205,203,215,237,130,85,217,214,53,104,96,61,184,190,231,222,180,184,230,170,75,109,211,83,39,24,251,228,23,47,241,70,158,239,165,247,93,0,92,131,130,30,192,142,251,121,5,60,127,190,47,116,94,155,122,227,49,9,202,15,210,32,244,0,100,254,202,141,36,209,97,231,189,91,248,49,240,146,148,4,112,213,152,183,146,167,139,60,205,106,177,44,85,212,58,58,214,194,11,198,225,162,70,29,146,114,169,69,97,156,238,219,166,249,253,123,241,155,183,141,117,111,94,189,122,41,237,139,119,235,23,50,186,128,223,36,181,204,69,210,170,215,205,74,126,225,52,76,210,192,153,145,138,217,90,125,73,169,86,204,250,2,84,222,94,18,144,119,103,226,156,198,158,112,216,48,8,35,18,216,66,179,22,185,77,233,181,29,36,161,79,96,253,53,144,100,152,6,197,219,194,231,214,249,102,74,238,64,62,105,235,236,204,100,254,159,198,115,210,94,182,51,209,240,52,109,35,27,34,2,201,252,25,211,168,17,10,219,64,141,2,138,40,176,120,72,125,7,93,236,49,10,20,125,156,187,140,224,69,109,140,119,17,125,75,108,233,183,163,112,124,143,48,23,158,72,12,206,38,98,35,69,175,165,247,17,225,209,81,47,0,90,5,119,16,5,165,206,40,9,156,219,34,48,8,10,71,35,85,95,129,207,35,155,124,104,135,43,53,31,236,11,241,192,143,16,78,73,199,161,159,212,38,97,220,115,64,120,226,19,186,61,251,8,239,122,136,100,119,76,117,15,20,189,149,11,29,28,185,92,93,182,21,53,91,114,21,216,32,19,53,13,83,199,23,252,142,44,157,189,79,130,235,116,122,208,44,203,195,7,193,43,128,187,123,238,133,55,112,172,214,162,195,70,70,49,113,110,218,66,213,89,153,212,250,255,238,144,233,157,94,119,112,164,201,93,101,167,29,111,179,126,85,7,172,172,108,229,239,146,152,248,161,51,134,147,161,99,99,1,217,146,142,157,122,169,79,152,215,248,206,136,248,232,134,51,199,11,62,17,7,124,72,120,97,134,144,167,135,101,95,75,60,177,26,76,62,102,69,150,4,177,26,71,62,98,177,160,188,228,73,126,75,104,25,195,131,79,202,112,125,13,195,79,195,207,3,139,157,79,93,8,86,164,174,44,122,200,175,162,155,27,165,129,89,65,52,200,113,48,48,166,225,220,157,162,238,91,217,157,81,126,32,181,40,38,212,236,199,44,199,163,170,156,167,41,189,238,32,144,90,156,68,149,222,134,96,148,42,82,1,155,238,66,131,199,182,37,139,202,250,222,68,177,252,248,238,216,141,4,65,85,144,101,232,142,143,2,230,200,210,250,95,234,157,254,222,74,121,209,100,103,221,69,206,152,109,250,242,172,186,171,238,138,104,168,186,67,17,253,167,139,72,11,200,167,11,169,81,89,17,51,126,186,152,88,218,62,93,78,157,204,138,160,163,167,11,74,171,243,167,203,169,81,89,17,211,125,186,152,172,57,240,116,65,115,116,54,158,110,108,111,61,126,248,98,154,3,95,96,92,183,246,87,242,128,21,178,195,206,251,85,154,122,226,225,68,17,70,160,67,223,59,58,116,140,48,152,1,37,50,143,236,18,224,176,125,72,141,86,204,114,201,152,198,100,98,151,40,5,5,94,58,226,15,120,205,84,204,195,186,115,116,88,7,146,133,25,141,228,57,246,110,13,111,140,172,52,98,135,117,120,67,215,210,117,54,16,168,233,4,224,105,68,198,93,246,108,65,253,27,70,45,106,166,101,25,243,54,203,116,34,143,113,118,0,123,226,249,144,172,89,210,108,180,76,193,18,243,7,43,157,122,9,200,147,166,80,130,208,141,153,101,219,182,33,19,166,251,62,72,195,3,118,151,66,57,143,206,100,34,220,172,170,14,64,243,9,16,199,142,226,112,22,65,202,60,116,70,70,26,26,108,33,253,101,5,216,77,49,160,124,3,159,124,199,242,184,125,186,159,26,67,130,21,22,60,66,78,224,248,36,166,36,166,78,74,105,26,227,144,36,70,16,166,6,185,131,66,201,104,253,246,27,22,3,5,62,87,224,82,172,53,40,205,15,153,45,172,232,178,76,130,137,205,64,84,189,207,18,200,121,220,148,219,64,71,109,179,199,204,104,97,132,69,29,181,27,251,105,86,246,132,237,246,204,146,129,46,96,151,4,148,121,4,125,33,32,140,25,161,216,71,2,134,73,5,0,14,235,140,230,145,185,186,163,207,253,109,183,227,141,139,182,82,49,13,47,136,230,41,51,1,223,86,226,253,1,5,110,249,65,236,18,93,97,230,5,166,30,54,87,100,233,252,250,247,201,66,29,68,147,135,22,22,230,138,144,206,29,203,7,115,162,98,193,153,199,204,111,103,229,2,26,246,206,254,71,202,133,146,63,122,68,187,216,80,127,252,54,148,141,166,175,220,255,190,217,43,29,44,17,12,218,32,1,220,150,248,226,226,246,218,90,93,91,53,17,150,197,15,221,1,115,51,128,22,30,252,196,254,236,164,211,90,28,206,225,104,208,226,30,40,194,142,105,99,108,232,205,224,87,189,217,104,52,138,36,173,69,243,100,106,61,220,181,210,164,122,223,202,180,1,39,57,215,222,219,69,114,69,110,101,68,209,42,80,216,215,111,127,49,63,209,231,167,230,19,125,233,50,123,47,219,212,216,58,120,60,216,109,108,136,230,174,7,101,250,132,213,182,154,254,101,181,11,119,56,193,26,4,58,93,4,103,113,24,193,197,123,111,149,120,229,119,145,222,251,164,84,102,161,82,37,36,28,24,94,115,15,86,87,20,139,36,19,247,13,121,57,196,156,134,249,174,209,106,254,57,209,146,39,203,198,210,142,53,180,80,52,237,164,238,177,148,227,138,182,56,45,237,46,128,85,10,98,213,4,183,55,149,94,221,255,110,75,188,244,164,180,32,240,42,196,64,176,157,125,64,167,180,139,88,74,9,140,249,16,185,75,255,34,217,114,164,118,114,3,86,140,175,36,2,79,21,109,133,216,46,194,241,162,126,181,102,127,138,100,58,165,93,196,202,234,230,108,144,222,90,69,99,141,13,202,242,218,153,95,147,191,72,252,60,173,93,54,192,46,105,6,23,227,43,209,29,197,222,171,101,94,6,55,65,184,8,12,154,126,208,252,21,147,78,83,220,246,203,61,217,3,131,247,71,182,246,25,195,243,231,242,205,161,222,11,101,249,132,104,200,229,47,145,181,106,136,156,128,248,154,18,212,101,5,26,200,22,148,115,162,218,182,118,253,65,17,199,132,209,103,55,236,170,59,144,51,77,62,81,61,224,51,76,241,152,13,44,5,36,155,78,10,136,156,69,10,0,27,62,138,39,57,107,44,183,133,36,89,155,158,227,152,21,101,96,203,155,130,240,92,22,249,94,225,22,50,217,133,208,138,180,170,152,82,62,46,216,38,137,214,202,177,220,163,133,26,86,168,7,60,78,92,225,19,148,96,132,54,97,149,2,140,87,94,95,27,223,120,0,212,75,49,22,121,104,1,199,160,1,157,70,240,56,94,136,201,42,32,101,122,48,35,73,226,92,19,91,105,224,170,131,46,38,31,27,53,241,2,141,249,37,208,179,69,28,226,112,60,169,217,204,144,53,108,19,31,57,183,204,10,252,197,33,16,199,86,185,48,208,6,46,24,87,54,177,9,182,224,66,3,192,6,30,44,62,108,98,146,110,195,68,52,3,10,89,208,242,125,35,7,103,180,5,15,22,46,54,25,133,199,147,141,134,217,130,145,218,123,101,175,171,94,50,134,155,14,75,47,254,83,39,59,162,48,133,26,61,116,70,14,101,30,21,179,147,13,33,122,249,84,115,12,249,252,72,25,29,177,182,81,107,157,36,145,251,184,40,145,171,201,162,93,254,235,9,79,182,32,60,89,71,152,118,229,214,147,222,66,125,209,104,29,105,218,64,93,79,218,223,130,180,191,142,52,246,60,215,211,142,183,160,29,23,208,214,134,223,34,237,231,134,79,160,148,33,232,104,248,203,230,95,69,208,154,63,127,241,64,12,20,195,218,41,113,111,232,24,54,63,56,74,28,224,114,75,20,9,242,68,148,137,175,32,162,15,165,5,37,47,120,148,150,254,113,67,70,14,233,25,217,150,154,89,50,191,73,140,60,78,4,209,62,123,47,26,175,57,218,141,85,218,107,196,122,132,188,232,199,178,47,117,148,206,106,54,50,246,146,99,47,113,99,146,242,70,31,34,217,107,195,156,242,225,149,59,178,149,112,167,133,27,61,128,65,22,67,55,16,249,142,75,172,250,127,126,59,174,212,175,171,38,70,52,214,237,197,46,54,182,86,90,171,1,84,139,140,20,194,179,201,229,146,247,138,215,69,222,117,11,105,254,165,11,232,58,190,63,114,220,155,11,2,169,223,190,109,82,171,152,204,95,85,245,136,69,153,180,66,17,75,225,111,42,10,211,133,134,179,183,158,111,149,115,109,47,151,98,196,47,155,5,153,158,177,107,240,144,229,125,246,163,137,228,59,211,192,148,145,118,43,115,73,99,133,54,44,91,166,217,86,51,105,123,139,12,125,133,166,250,90,82,69,70,11,216,124,49,73,250,134,146,162,127,17,159,170,123,205,118,148,38,92,169,252,253,187,12,200,5,173,60,62,64,62,106,104,77,189,109,232,190,219,68,54,251,188,129,125,125,1,62,181,249,211,8,125,90,204,43,188,149,73,231,218,25,101,110,106,178,251,212,25,155,98,197,51,104,86,30,177,173,200,57,133,82,114,160,37,43,170,191,24,46,189,128,236,82,186,8,233,215,149,243,89,144,8,12,106,70,138,224,196,99,35,101,223,142,208,110,120,113,42,141,3,144,233,107,49,81,97,157,113,243,176,14,160,195,105,92,167,45,115,238,82,178,87,134,234,173,174,246,149,170,90,25,136,237,117,28,172,228,250,117,217,188,125,151,253,38,236,99,52,36,41,54,78,231,65,192,109,195,46,116,73,150,123,250,148,129,202,33,174,141,173,218,207,249,49,197,110,26,146,209,64,89,158,221,47,72,2,86,23,44,44,72,227,164,155,243,111,66,15,19,80,30,106,21,66,146,208,167,118,55,236,73,149,162,182,12,252,247,96,17,59,17,85,167,156,172,81,58,71,102,254,163,7,193,133,229,182,200,7,155,28,235,56,241,65,31,77,112,0,83,73,136,217,146,170,129,209,151,78,113,76,117,40,88,132,201,2,41,154,92,10,201,240,20,49,229,169,22,130,178,61,82,57,147,199,21,194,199,105,102,197,18,253,210,166,249,78,134,114,184,32,203,108,6,185,199,124,151,175,242,2,14,195,128,132,109,12,187,132,139,70,225,93,137,241,22,172,195,160,75,55,37,88,209,111,18,217,246,48,61,195,225,213,6,222,194,159,15,235,184,45,101,223,43,151,151,216,127,224,72,57,249,247,61,112,236,231,62,19,88,27,198,50,27,169,31,61,24,186,145,168,112,166,98,164,66,84,110,37,220,53,253,126,131,77,90,159,63,251,233,205,235,70,59,155,215,62,198,157,125,37,176,173,0,57,108,77,134,120,103,25,240,139,138,109,69,208,145,53,9,252,157,37,192,111,16,182,149,64,71,214,36,24,109,148,160,206,220,193,226,77,43,230,76,239,76,144,42,115,156,137,23,207,74,107,164,228,31,32,108,41,38,199,46,22,212,21,130,158,254,76,101,100,110,79,69,4,55,86,79,57,139,200,194,199,149,179,168,38,204,218,169,212,111,0,118,70,17,185,100,204,60,216,77,3,254,58,119,118,169,217,104,40,179,101,126,209,224,110,244,4,171,136,33,207,208,225,128,225,37,92,136,129,20,245,75,12,111,90,17,168,114,89,134,216,34,219,4,207,248,48,128,183,70,144,203,223,180,87,110,51,19,183,138,45,31,62,41,103,155,101,229,73,209,222,224,162,197,52,89,224,240,2,130,233,10,44,83,87,196,82,178,157,93,69,99,157,162,252,20,191,64,26,165,227,84,40,11,79,179,100,224,195,182,205,159,16,68,244,121,184,40,25,99,173,67,84,200,154,165,116,130,243,196,187,158,199,4,105,242,137,37,255,190,4,94,184,14,255,208,160,34,115,19,5,138,15,176,86,37,141,249,33,39,253,165,63,24,24,239,123,70,199,64,176,177,73,217,200,158,117,236,255,6,195,179,68,149,139,133,15,70,157,254,63,1,56,89,179,136,233,150,140,141,9,68,177,251,125,245,64,58,116,18,75,226,112,70,91,194,76,72,4,73,33,143,84,236,17,84,99,82,123,44,212,69,160,217,34,90,225,60,165,223,1,72,228,8,181,88,240,63,100,254,11,99,55,32,241,43,57,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3867] PROGMEM = { 31,139,8,0,194,216,226,97,2,255,197,27,107,115,218,72,242,187,127,133,172,108,5,113,96,30,121,109,22,44,167,8,38,9,183,196,246,217,120,179,117,217,156,75,136,193,168,44,36,173,36,140,189,14,255,253,122,122,30,154,17,2,179,120,247,238,75,140,122,122,122,122,186,123,166,95,19,55,12,146,212,184,236,95,245,79,250,195,126,103,112,245,241,178,111,191,104,52,218,174,24,56,239,13,78,59,199,0,107,10,216,217,113,103,216,187,58,253,240,225,162,55,180,155,42,110,239,215,97,239,228,152,209,104,42,240,97,127,216,27,216,10,224,12,40,230,232,33,40,91,164,127,213,165,144,23,58,82,151,97,189,200,176,222,95,14,135,167,39,246,75,29,143,67,155,141,151,25,230,160,243,30,152,120,165,35,50,96,179,241,42,195,187,248,210,31,118,63,245,206,237,215,58,170,132,55,27,175,21,236,65,255,24,96,111,114,184,12,218,108,188,201,48,79,46,63,191,7,216,143,58,38,135,54,27,63,42,226,2,57,130,66,206,46,135,246,91,29,91,25,105,54,222,102,51,62,158,119,206,62,217,63,113,64,231,248,152,65,174,206,78,251,39,20,149,15,116,7,189,206,57,71,110,54,126,82,86,236,188,183,155,57,133,48,152,162,144,139,222,160,215,5,106,57,157,8,112,83,209,202,233,217,176,79,229,159,83,139,0,55,21,181,124,238,3,32,167,21,132,53,21,157,124,238,252,106,55,115,250,64,88,83,85,197,176,119,102,55,243,154,64,96,83,209,195,199,206,229,199,158,221,204,233,129,67,155,138,26,58,221,46,181,141,156,10,56,180,249,86,21,204,89,231,188,51,60,5,53,254,148,151,141,28,81,134,228,73,56,62,253,114,34,207,193,160,247,97,40,237,253,188,255,241,211,80,90,117,183,119,50,4,35,17,2,233,94,13,47,207,255,117,121,218,191,232,73,82,221,171,222,231,222,121,103,144,157,171,238,213,89,15,102,157,247,127,129,169,47,36,240,75,111,216,185,56,251,212,25,40,228,175,46,46,79,62,12,78,191,104,107,116,59,231,231,167,67,121,10,186,87,157,65,255,223,157,115,80,205,27,9,58,238,156,255,44,45,186,123,117,114,122,210,179,95,188,126,221,190,117,98,227,58,118,162,233,177,147,58,118,64,22,70,39,142,157,123,171,140,35,83,39,233,184,46,241,237,137,227,39,4,65,137,239,141,73,220,13,131,212,11,230,225,60,225,67,147,121,224,166,94,24,24,110,232,135,113,215,119,146,196,194,159,253,113,249,129,255,176,79,230,179,17,137,37,188,157,44,188,212,157,42,120,78,66,84,153,181,98,146,206,227,192,132,127,126,159,135,94,66,204,54,71,225,34,20,8,100,70,98,199,31,203,225,76,158,2,35,34,41,137,99,239,150,196,18,41,147,175,64,90,144,212,73,162,169,227,167,18,73,202,91,224,36,243,96,226,135,11,133,14,19,191,24,119,157,56,14,179,249,66,21,98,216,241,189,63,156,216,11,36,2,85,76,139,255,166,90,17,136,99,39,190,49,219,99,50,113,230,126,42,128,102,123,185,220,163,90,88,144,81,18,186,55,109,229,55,168,36,32,110,74,198,121,141,196,228,247,57,73,210,211,216,35,65,234,80,208,25,137,103,94,146,192,47,171,252,176,220,147,152,137,115,75,62,10,99,128,33,63,116,29,255,34,13,99,231,154,212,18,146,246,83,50,179,76,146,68,115,15,109,38,49,171,255,188,56,61,169,37,41,236,232,218,155,220,91,210,148,202,229,182,66,56,134,245,195,88,161,237,129,182,209,154,96,197,49,154,158,182,214,117,225,90,25,241,182,55,177,228,212,125,59,152,251,126,249,33,163,133,76,69,78,156,144,12,171,220,102,50,204,150,252,234,141,191,1,147,12,252,245,91,158,95,39,78,65,4,63,88,227,208,157,207,64,114,229,154,51,30,91,230,63,204,114,45,156,76,224,128,252,96,153,207,226,112,1,223,211,116,230,91,166,89,110,115,85,212,92,63,132,181,193,192,25,21,149,52,156,192,11,208,194,60,233,129,157,196,176,194,26,245,81,234,18,23,214,136,201,44,188,37,236,96,153,120,98,14,174,99,66,2,179,188,130,10,124,106,120,49,25,23,96,49,166,145,11,163,110,156,132,6,231,128,50,249,252,217,219,55,47,95,183,11,102,101,91,215,160,129,245,224,250,158,123,211,226,146,171,46,181,77,79,157,96,236,147,95,188,196,27,121,190,151,222,119,1,112,13,2,122,0,61,238,231,5,240,252,249,190,144,121,109,234,141,199,36,40,63,72,133,208,3,144,217,43,87,146,68,135,157,247,110,225,199,192,75,82,18,192,85,99,222,202,53,93,92,211,172,22,243,82,69,169,163,97,45,188,96,28,46,106,212,32,233,42,181,40,140,211,125,219,52,191,127,47,30,121,219,88,55,242,234,213,75,169,95,188,91,191,144,209,5,252,38,169,101,46,146,86,189,110,86,242,19,167,97,146,6,206,140,84,204,214,234,32,165,90,49,235,11,16,121,123,73,128,223,157,137,115,26,123,194,96,195,32,140,72,96,11,201,90,228,54,165,215,118,144,132,62,129,249,215,64,146,97,26,20,111,11,155,91,103,155,41,185,3,254,164,174,179,51,147,217,127,26,207,73,123,217,206,88,195,211,180,13,111,136,8,36,243,103,76,163,70,40,108,3,53,10,40,162,192,252,33,181,29,52,177,199,40,80,244,113,238,50,130,129,218,24,239,34,58,74,108,105,183,163,112,124,143,48,23,190,72,12,198,38,124,35,69,175,165,247,17,225,222,81,79,0,90,5,119,16,5,165,206,40,9,156,219,34,48,48,10,71,35,85,135,192,230,113,153,188,107,135,43,53,239,236,11,241,192,142,16,78,73,199,161,159,212,38,97,220,115,128,121,226,19,186,61,251,8,239,122,240,100,119,76,116,15,20,189,149,115,29,28,185,92,93,182,21,49,91,114,22,232,32,99,53,13,83,199,23,235,29,89,250,242,62,9,174,211,233,65,179,44,15,31,56,175,0,238,238,185,23,222,192,177,90,139,14,27,25,197,196,185,105,11,81,103,105,82,235,255,187,67,38,119,122,221,193,145,38,119,149,157,118,188,205,252,85,25,176,180,178,149,191,75,98,226,135,206,24,78,134,142,141,9,100,75,26,118,234,165,62,97,86,227,59,35,226,163,25,206,28,47,248,68,28,176,33,97,133,25,66,158,30,166,125,45,241,197,114,48,249,153,37,89,18,196,114,28,249,137,201,130,50,200,131,252,150,144,50,186,7,159,148,225,250,26,134,159,134,159,7,22,59,159,58,19,44,73,93,153,244,144,159,69,55,55,74,3,179,130,104,16,227,160,99,76,195,185,59,69,217,183,178,59,163,252,64,106,81,76,168,218,143,89,140,71,69,57,79,83,122,221,129,35,181,56,137,42,189,13,65,41,85,164,2,58,221,133,6,247,109,75,230,149,245,189,137,100,249,241,221,177,27,9,156,170,32,203,208,29,31,25,204,145,165,249,191,148,59,253,189,149,240,162,201,206,178,139,156,49,219,244,229,89,117,87,217,21,209,80,101,135,44,250,79,103,145,38,144,79,103,82,163,178,194,102,252,116,54,49,181,125,58,159,58,153,21,70,71,79,103,148,102,231,79,231,83,163,178,194,166,251,116,54,89,113,224,233,140,230,232,108,60,221,88,222,122,252,240,197,52,6,190,64,191,110,237,175,196,1,43,100,135,157,247,171,52,245,192,195,137,34,244,64,135,190,119,116,232,24,97,48,3,74,100,30,217,37,192,97,251,144,18,173,152,229,146,49,141,201,196,46,81,10,10,188,116,196,63,240,154,169,152,135,117,231,232,176,14,36,11,35,26,185,230,216,187,53,188,49,46,165,17,59,172,195,8,157,75,231,217,64,160,166,19,128,175,17,25,119,217,183,5,249,111,24,181,168,154,150,101,140,219,44,211,137,60,182,178,3,216,19,207,135,96,205,146,106,163,105,10,166,152,63,88,233,212,75,128,159,52,133,20,132,110,204,44,219,182,13,145,48,221,247,65,26,30,176,187,20,210,121,52,38,19,225,102,85,53,0,26,79,0,59,118,20,135,179,8,66,230,161,51,50,210,208,96,19,233,47,43,192,106,138,1,233,27,216,228,59,22,199,237,211,253,212,24,18,204,176,224,19,98,2,199,39,49,37,49,117,82,74,211,24,135,36,49,130,48,53,200,29,36,74,70,235,183,223,48,25,40,176,185,2,147,98,165,65,169,126,136,108,97,70,151,69,18,140,109,6,162,226,125,150,64,204,227,166,92,7,58,106,155,125,102,74,11,35,76,234,168,222,216,79,179,178,39,116,183,103,150,12,52,1,187,36,160,204,34,232,128,128,176,197,8,197,62,18,48,12,42,0,112,88,103,52,143,204,213,29,125,238,111,187,29,111,92,180,149,138,105,120,65,52,79,153,10,248,182,18,239,15,72,112,203,15,98,151,104,10,51,47,48,117,183,185,194,75,231,215,191,143,23,106,32,26,63,52,177,48,87,152,116,238,88,60,152,99,21,19,206,60,102,126,59,43,23,208,176,119,246,63,18,46,164,252,209,35,210,197,130,250,227,183,161,44,52,125,229,246,247,205,94,169,96,9,103,208,6,14,224,182,196,129,139,219,107,107,117,110,213,68,88,230,63,116,3,204,245,0,90,120,240,19,251,179,147,78,107,113,56,135,163,65,147,123,160,8,59,166,133,177,161,55,131,95,245,102,163,209,40,226,180,22,205,147,169,245,112,215,74,147,234,125,43,147,6,156,228,92,121,111,23,206,21,190,149,22,69,171,64,96,95,191,253,197,235,137,58,63,85,159,168,75,151,217,184,44,83,99,233,224,113,103,183,177,32,154,187,30,148,238,19,102,219,106,248,151,229,46,220,224,196,210,192,208,233,34,56,139,195,8,46,222,123,171,196,51,191,139,244,222,39,165,50,115,149,42,33,97,192,48,204,45,88,157,81,204,146,12,220,55,196,229,224,115,26,230,187,70,171,249,231,88,75,158,204,27,11,59,214,208,66,214,180,147,186,199,66,142,43,90,226,180,180,187,0,102,41,136,85,19,204,222,84,106,117,255,187,45,241,212,147,210,2,199,171,16,3,198,118,182,1,157,210,46,108,41,41,48,198,67,228,46,253,139,120,203,145,218,201,12,88,50,190,18,8,60,149,181,21,98,187,48,199,147,250,213,156,253,41,156,233,148,118,97,43,203,155,179,70,122,107,21,141,21,54,232,146,215,206,252,154,252,69,236,231,105,237,178,1,118,73,51,184,104,95,137,234,40,214,94,45,243,50,184,9,194,69,96,208,240,131,198,175,24,116,154,226,182,95,238,201,26,24,140,31,217,218,51,134,231,207,229,200,161,94,11,101,241,132,40,200,229,47,145,181,98,136,156,128,248,154,16,212,105,5,18,200,38,148,115,172,218,182,118,253,65,18,199,152,209,123,55,236,170,59,144,61,77,222,81,61,224,61,76,241,153,53,44,5,36,235,78,10,136,236,69,10,0,107,62,138,47,217,107,44,183,5,39,89,153,158,227,152,21,165,97,203,139,130,240,93,22,241,94,225,22,50,222,5,211,10,183,42,155,146,63,206,216,38,142,214,242,177,220,163,137,26,102,168,7,220,79,92,225,23,164,96,132,22,97,149,4,140,103,94,95,27,223,184,3,212,83,49,230,121,104,2,199,160,1,237,70,112,63,94,136,201,50,32,165,123,48,35,73,226,92,19,91,41,224,170,141,46,198,31,107,53,241,4,141,217,37,208,179,133,31,226,112,60,169,89,207,144,21,108,19,31,87,110,153,21,248,139,77,32,142,221,254,211,66,208,189,109,94,50,60,183,147,156,179,101,54,112,142,190,106,19,235,193,58,206,149,85,168,83,217,176,6,243,57,155,22,73,183,89,68,20,24,10,151,160,37,129,141,43,56,163,45,214,96,46,104,147,162,185,143,218,168,236,45,22,82,235,185,108,184,234,37,99,184,61,49,157,227,63,117,178,35,10,83,168,209,131,108,228,80,230,81,241,114,178,200,68,47,180,106,110,65,222,147,82,218,81,172,20,213,90,199,73,228,62,206,74,228,106,188,104,14,101,61,225,201,22,132,39,235,8,211,74,223,122,210,91,136,47,26,173,35,77,139,178,235,73,251,91,144,246,215,145,198,58,234,122,218,241,22,180,227,2,218,90,67,93,164,18,92,241,9,164,71,4,13,13,127,217,252,165,5,173,35,228,47,51,240,171,162,1,60,37,238,13,109,237,230,155,81,137,3,171,220,18,253,78,211,136,40,93,100,65,68,111,116,11,74,94,240,40,45,253,193,68,70,14,233,25,217,150,154,89,130,176,137,141,60,78,4,17,68,54,46,138,185,57,218,141,85,218,107,216,122,132,188,168,241,178,215,63,74,181,54,107,67,123,201,177,151,184,49,73,121,241,16,145,236,181,94,67,121,204,229,142,108,197,123,104,46,76,119,37,16,25,209,13,68,190,227,18,171,254,159,223,142,43,245,235,170,137,94,146,85,144,177,50,142,229,154,86,129,63,82,189,45,133,112,71,180,92,242,250,243,90,71,182,102,34,141,233,116,6,93,199,247,71,142,123,115,65,32,156,220,183,77,170,21,147,217,171,42,30,49,41,227,86,8,98,41,236,77,69,97,178,208,112,246,214,175,91,229,171,182,151,75,241,108,64,22,32,50,57,99,37,226,33,139,37,237,71,131,211,119,166,129,97,40,173,128,230,2,209,10,45,130,182,76,179,173,70,231,246,22,81,255,10,77,117,88,82,197,133,22,176,249,98,146,116,132,146,162,127,17,159,138,123,205,118,148,194,94,169,252,253,187,116,200,5,229,65,222,148,62,106,104,133,194,109,232,190,219,68,54,123,50,193,94,116,128,77,109,126,110,161,119,160,121,214,184,210,61,93,219,247,204,117,98,118,239,100,99,161,173,184,175,205,82,46,182,21,217,251,80,210,24,212,100,69,181,23,195,165,23,144,93,74,23,33,125,177,57,159,5,137,192,160,106,164,8,78,60,54,82,246,30,133,86,216,139,195,115,108,170,76,95,139,46,13,171,182,155,135,117,0,29,78,227,58,45,195,115,147,146,245,55,20,111,117,181,86,85,213,82,75,44,217,99,179,38,87,3,204,122,248,187,236,55,97,15,220,144,164,216,56,237,49,193,106,27,118,161,115,178,220,211,59,23,148,15,113,109,108,85,210,206,183,62,118,147,144,244,6,202,244,236,126,65,18,48,187,96,98,65,24,39,205,156,191,51,61,76,64,120,40,85,112,73,66,158,218,221,176,39,69,138,210,50,240,223,131,69,236,68,84,156,178,91,71,233,28,153,249,135,20,98,21,22,219,226,58,88,56,89,183,18,111,30,210,0,7,48,149,128,152,77,169,26,232,125,105,103,200,84,27,141,69,152,204,145,162,202,37,147,12,79,97,83,158,106,193,40,219,35,229,51,121,92,32,188,69,103,86,44,81,131,109,154,239,164,43,135,11,178,204,250,154,123,204,118,249,44,47,224,48,116,72,88,26,177,75,56,105,20,222,149,216,218,98,233,48,232,210,77,137,165,232,59,71,182,61,12,207,176,33,182,97,109,97,207,135,117,220,150,178,239,149,203,75,236,63,112,36,159,252,205,16,28,251,185,207,24,214,26,188,76,71,234,67,10,67,87,18,101,206,84,148,84,136,202,181,132,187,166,111,66,88,247,246,249,179,159,222,188,110,180,179,30,240,99,171,179,151,7,219,50,144,195,214,120,136,119,230,1,95,105,108,203,130,142,172,113,224,239,204,1,190,107,216,150,3,29,89,227,96,180,145,131,58,51,7,139,23,194,152,49,189,51,129,171,204,112,38,94,60,43,173,225,146,63,106,216,146,77,142,93,204,168,43,24,61,253,153,242,200,204,158,178,8,102,172,158,114,230,145,133,141,43,103,81,13,152,181,83,169,223,0,236,140,34,114,201,152,121,176,155,6,252,117,238,236,82,179,209,80,250,213,252,162,193,221,232,1,86,209,130,60,66,135,3,134,151,112,33,6,82,212,47,49,188,105,133,163,202,69,25,98,139,108,19,60,226,67,7,222,26,65,44,127,211,94,185,205,76,220,42,150,124,120,247,157,109,150,165,39,69,123,131,139,22,195,100,129,195,19,8,38,43,208,76,93,97,75,137,118,118,101,141,85,138,242,47,3,10,184,81,42,78,133,188,240,48,75,58,62,44,219,252,9,70,68,157,135,179,146,45,172,85,136,10,151,102,33,157,88,121,226,93,207,99,130,52,121,23,148,191,89,129,1,215,225,143,23,42,50,54,81,160,248,1,115,85,210,24,31,114,210,95,250,131,129,241,190,103,116,12,4,27,155,132,141,203,179,46,192,223,160,120,22,168,114,182,240,195,168,211,255,123,0,39,107,22,49,217,146,177,49,1,47,118,191,175,30,72,135,118,119,73,28,206,104,153,153,49,137,32,201,228,145,138,61,130,108,76,74,143,185,186,8,36,91,68,43,156,167,244,109,129,68,142,80,138,5,255,235,230,191,115,73,170,191,127,57,0,0 };

From fed603e219e79461260490f76019e21a4d8e2e53 Mon Sep 17 00:00:00 2001
From: Ian Gray 
Date: Sat, 15 Jan 2022 15:13:28 +0000
Subject: [PATCH 10/11] Fix error in graph HTML output

---
 data/js/controls.js     | 4 ++--
 data/js/controls.min.js | 4 ++--
 src/dataControlsJS.h    | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/data/js/controls.js b/data/js/controls.js
index 0b6e4d4..7a35af9 100644
--- a/data/js/controls.js
+++ b/data/js/controls.js
@@ -730,11 +730,11 @@ var addToHTML = function(data) {
   } else {
     //We are adding to an existing panel so we only need the HTML for the element
     var parent = $("#id" + data.parentControl);
-    parent.append(elementHTML(data.type, data.id, data.value, elementStyle));
+    parent.append(elementHTML(data.type, data.id, data.value, data.label, elementStyle));
   }
 }
 
-var elementHTML = function(type, id, value, elementStyle) {
+var elementHTML = function(type, id, value, label, elementStyle) {
   switch(type) {
     case UI_LABEL:
       return "
"+data.label+"

"+ elementHTML(data.type,data.id,data.value,elementStyle)+ "";break;case UI_SEPARATOR:html="
"+ "
"+data.label+"

";break;} -parent.append(html);}else{var parent=$("#id"+data.parentControl);parent.append(elementHTML(data.type,data.id,data.value,elementStyle));}} -var elementHTML=function(type,id,value,elementStyle){switch(type){case UI_LABEL:return""+value+"";case UI_BUTTON:return"