Skip to content

Commit

Permalink
any smart ledd button action will enable led
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Apr 11, 2023
1 parent f2c89f6 commit d441a9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/new_pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ void Button_OnDoubleClick(int index)
}
if (g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs || g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs_n) {
LED_NextColor();
// make it easier for users, enable LED by default
LED_SetEnableAll(true);
}
if (g_doubleClickCallback != 0) {
g_doubleClickCallback(index);
Expand All @@ -410,6 +412,8 @@ void Button_OnTripleClick(int index)
EventHandlers_FireEvent(CMD_EVENT_PIN_ON3CLICK, index);
if (g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs || g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs_n) {
LED_NextTemperature();
// make it easier for users, enable LED by default
LED_SetEnableAll(true);
}
}
void Button_OnQuadrupleClick(int index)
Expand Down Expand Up @@ -437,6 +441,8 @@ void Button_OnLongPressHold(int index) {
}
if (g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs || g_cfg.pins.roles[index] == IOR_SmartButtonForLEDs_n) {
LED_NextDimmerHold();
// make it easier for users, enable LED by default
LED_SetEnableAll(true);
}
}
void Button_OnLongPressHoldStart(int index) {
Expand Down

0 comments on commit d441a9d

Please sign in to comment.