1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-12 09:20:39 +00:00

sync up examples

This commit is contained in:
2019-12-28 21:30:57 +01:00
parent f00f7601f4
commit daede8799a
3 changed files with 36 additions and 25 deletions

View File

@ -16,9 +16,6 @@ const char *password = "espui";
const char *hostname = "espui";
long oldTime = 0;
bool testSwitchState = false;
int statusLabelId;
int graphId;
int millisLabelId;
@ -217,6 +214,9 @@ void setup(void) {
* If you want to serve the files from SPIFFS use ESPUI.beginSPIFFS
* (.prepareFileSystem has to be run in an empty sketch before)
*/
// Enable this option if you want sliders to be continuous (update during move) and not discrete (update on stop)
// ESPUI.sliderContinuous = true;
/*
* Optionally you can use HTTP BasicAuth. Keep in mind that this is NOT a
@ -226,8 +226,6 @@ void setup(void) {
* password, for example begin("ESPUI Control", "username", "password")
*/
// Enable this option if you want sliders to be continuous (update during move) and not discrete (update on stop)
// ESPUI.sliderContinuous = true;
ESPUI.begin("ESPUI Control");
}
@ -235,6 +233,9 @@ void setup(void) {
void loop(void) {
dnsServer.processNextRequest();
static long oldTime = 0;
static bool testSwitchState = false;
if (millis() - oldTime > 5000) {
ESPUI.print(millisLabelId, String(millis()));
@ -242,7 +243,7 @@ void loop(void) {
testSwitchState = !testSwitchState;
ESPUI.updateSwitcher(testSwitchId, testSwitchState);
oldTime = millis();
}
}