@ -118,28 +118,30 @@ void buttonSetup() {
# else
# else
unsigned long btnDelay = getSetting ( " btnDelay " , BUTTON_DBLCLICK_DELAY ) . toInt ( ) ;
# ifdef BUTTON1_PIN
# ifdef BUTTON1_PIN
{
{
unsigned int actions = buttonStore ( BUTTON1_PRESS , BUTTON1_CLICK , BUTTON1_DBLCLICK , BUTTON1_LNGCLICK , BUTTON1_LNGLNGCLICK ) ;
unsigned int actions = buttonStore ( BUTTON1_PRESS , BUTTON1_CLICK , BUTTON1_DBLCLICK , BUTTON1_LNGCLICK , BUTTON1_LNGLNGCLICK ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON1_PIN , BUTTON1_MODE , BUTTON_DEBOUNCE_DELAY , BUTTON_DBLCLICK_DELAY ) , actions , BUTTON1_RELAY } ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON1_PIN , BUTTON1_MODE , BUTTON_DEBOUNCE_DELAY , btnDelay ) , actions , BUTTON1_RELAY } ) ;
}
}
# endif
# endif
# ifdef BUTTON2_PIN
# ifdef BUTTON2_PIN
{
{
unsigned int actions = buttonStore ( BUTTON2_PRESS , BUTTON2_CLICK , BUTTON2_DBLCLICK , BUTTON2_LNGCLICK , BUTTON2_LNGLNGCLICK ) ;
unsigned int actions = buttonStore ( BUTTON2_PRESS , BUTTON2_CLICK , BUTTON2_DBLCLICK , BUTTON2_LNGCLICK , BUTTON2_LNGLNGCLICK ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON2_PIN , BUTTON2_MODE , BUTTON_DEBOUNCE_DELAY , BUTTON_DBLCLICK_DELAY ) , actions , BUTTON2_RELAY } ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON2_PIN , BUTTON2_MODE , BUTTON_DEBOUNCE_DELAY , btnDelay ) , actions , BUTTON2_RELAY } ) ;
}
}
# endif
# endif
# ifdef BUTTON3_PIN
# ifdef BUTTON3_PIN
{
{
unsigned int actions = buttonStore ( BUTTON3_PRESS , BUTTON3_CLICK , BUTTON3_DBLCLICK , BUTTON3_LNGCLICK , BUTTON3_LNGLNGCLICK ) ;
unsigned int actions = buttonStore ( BUTTON3_PRESS , BUTTON3_CLICK , BUTTON3_DBLCLICK , BUTTON3_LNGCLICK , BUTTON3_LNGLNGCLICK ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON3_PIN , BUTTON3_MODE , BUTTON_DEBOUNCE_DELAY , BUTTON_DBLCLICK_DELAY ) , actions , BUTTON3_RELAY } ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON3_PIN , BUTTON3_MODE , BUTTON_DEBOUNCE_DELAY , btnDelay ) , actions , BUTTON3_RELAY } ) ;
}
}
# endif
# endif
# ifdef BUTTON4_PIN
# ifdef BUTTON4_PIN
{
{
unsigned int actions = buttonStore ( BUTTON4_PRESS , BUTTON4_CLICK , BUTTON4_DBLCLICK , BUTTON4_LNGCLICK , BUTTON4_LNGLNGCLICK ) ;
unsigned int actions = buttonStore ( BUTTON4_PRESS , BUTTON4_CLICK , BUTTON4_DBLCLICK , BUTTON4_LNGCLICK , BUTTON4_LNGLNGCLICK ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON4_PIN , BUTTON4_MODE , BUTTON_DEBOUNCE_DELAY , BUTTON_DBLCLICK_DELAY ) , actions , BUTTON4_RELAY } ) ;
_buttons . push_back ( { new DebounceEvent ( BUTTON4_PIN , BUTTON4_MODE , BUTTON_DEBOUNCE_DELAY , btnDelay ) , actions , BUTTON4_RELAY } ) ;
}
}
# endif
# endif