Zeus: Mimimi (Timeout-Logik beim Disco-Modus umgestellt)

This commit is contained in:
starcalc 2018-04-08 20:14:38 +02:00
parent 351dafbe44
commit 4206725e6d
2 changed files with 19 additions and 3 deletions

16
data/homie/config.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "esp-deckenlicht",
"device_id": "esp-deckenlicht",
"wifi": {
"ssid": "CTDO-IoT",
"password": "12345678"
},
"mqtt": {
"host": "raum.ctdo.de",
"port": 1883,
"auth": false
},
"ota": {
"enabled": false
}
}

View File

@ -11,10 +11,10 @@
#define LOWER 50 #define LOWER 50
#define MINIMUM 1 #define MINIMUM 1
#define OFF 0 #define OFF 0
int timeout = 50; int timeout = (1000-50);
#define FW_NAME "esp-deckenlicht" #define FW_NAME "esp-deckenlicht"
#define FW_VERSION "1.0.0" #define FW_VERSION "1.0.1"
int w0; int w0;
int w1; int w1;
int w2; int w2;
@ -198,7 +198,7 @@ void loopHandler()
{ {
if (disco) if (disco)
{ {
if (millis() - lastEvent >= timeout || lastEvent == 0) { if (millis() - lastEvent >= (1000-timeout) || lastEvent == 0) {
lastEvent = millis(); lastEvent = millis();
if (step >= 4) { if (step >= 4) {
step = 0; step = 0;