|
@ -77,6 +77,10 @@ void buttonSetup() { |
|
|
_buttons.push_back(new DebounceEvent(BUTTON4_PIN)); |
|
|
_buttons.push_back(new DebounceEvent(BUTTON4_PIN)); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ITEAD_1CH_INCHING
|
|
|
|
|
|
pinMode(LED_INCHING, OUTPUT); |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
DEBUG_MSG("[BUTTON] Number of buttons: %d\n", _buttons.size()); |
|
|
DEBUG_MSG("[BUTTON] Number of buttons: %d\n", _buttons.size()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -91,6 +95,15 @@ void buttonLoop() { |
|
|
if (event == EVENT_DOUBLE_CLICK) createAP(); |
|
|
if (event == EVENT_DOUBLE_CLICK) createAP(); |
|
|
if (event == EVENT_LONG_CLICK) ESP.reset(); |
|
|
if (event == EVENT_LONG_CLICK) ESP.reset(); |
|
|
} |
|
|
} |
|
|
|
|
|
#ifdef ITEAD_1CH_INCHING
|
|
|
|
|
|
if (i == 1) { |
|
|
|
|
|
byte relayInch = getSetting("relayInch", String(RELAY_INCHING)).toInt(); |
|
|
|
|
|
relayInch = (relayInch == RELAY_INCHING_NONE) ? RELAY_INCHING_OFF : RELAY_INCHING_NONE; |
|
|
|
|
|
setSetting("relayInch", String(relayInch)); |
|
|
|
|
|
digitalWrite(LED_INCHING, relayInch != RELAY_INCHING_NONE); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
#endif
|
|
|
if (event == EVENT_SINGLE_CLICK) relayToggle(i); |
|
|
if (event == EVENT_SINGLE_CLICK) relayToggle(i); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|