set buttonState for medium and long keypress

buttonState (on/off) was only set for short button press - now is set to on also for medium and long press
This commit is contained in:
ghwc2015 2018-02-23 07:55:19 +01:00 committed by GitHub
parent 763b9855bb
commit b75a2c4138
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -613,6 +613,7 @@ void shortKeyPress() {
void mediumKeyPress() {
DBG_OUTPUT_PORT.printf("Medium button press\n");
setModeByStateString(BTN_MODE_MEDIUM);
buttonState = true;
#ifdef ENABLE_MQTT
mqtt_client.publish(mqtt_outtopic, String("OK =fire flicker").c_str());
#endif
@ -622,6 +623,7 @@ void mediumKeyPress() {
void longKeyPress() {
DBG_OUTPUT_PORT.printf("Long button press\n");
setModeByStateString(BTN_MODE_LONG);
buttonState = true;
#ifdef ENABLE_MQTT
mqtt_client.publish(mqtt_outtopic, String("OK =fireworks random").c_str());
#endif