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:
parent
763b9855bb
commit
b75a2c4138
1 changed files with 2 additions and 0 deletions
|
@ -613,6 +613,7 @@ void shortKeyPress() {
|
||||||
void mediumKeyPress() {
|
void mediumKeyPress() {
|
||||||
DBG_OUTPUT_PORT.printf("Medium button press\n");
|
DBG_OUTPUT_PORT.printf("Medium button press\n");
|
||||||
setModeByStateString(BTN_MODE_MEDIUM);
|
setModeByStateString(BTN_MODE_MEDIUM);
|
||||||
|
buttonState = true;
|
||||||
#ifdef ENABLE_MQTT
|
#ifdef ENABLE_MQTT
|
||||||
mqtt_client.publish(mqtt_outtopic, String("OK =fire flicker").c_str());
|
mqtt_client.publish(mqtt_outtopic, String("OK =fire flicker").c_str());
|
||||||
#endif
|
#endif
|
||||||
|
@ -622,6 +623,7 @@ void mediumKeyPress() {
|
||||||
void longKeyPress() {
|
void longKeyPress() {
|
||||||
DBG_OUTPUT_PORT.printf("Long button press\n");
|
DBG_OUTPUT_PORT.printf("Long button press\n");
|
||||||
setModeByStateString(BTN_MODE_LONG);
|
setModeByStateString(BTN_MODE_LONG);
|
||||||
|
buttonState = true;
|
||||||
#ifdef ENABLE_MQTT
|
#ifdef ENABLE_MQTT
|
||||||
mqtt_client.publish(mqtt_outtopic, String("OK =fireworks random").c_str());
|
mqtt_client.publish(mqtt_outtopic, String("OK =fireworks random").c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue