I'm using your library (thank you for making it!) as a component with esp-idf 4.4.2 on a TTGO T-Display (dual-core ESP32 V3).
InterruptButton button_bottom(BUTTON_1, LOW);
InterruptButton button_top(BUTTON_2, LOW);
void buttonSetup()
{
InterruptButton::setMenuCount(0);
InterruptButton::setMenuLevel(0); // Use the functions bound to the first menu associated with the button
//InterruptButton::m_RTOSservicerStackDepth = 4096; // Use larger values for more memory intensive functions if using Asynchronous mode.
InterruptButton::setMode(Mode_Asynchronous); // Defaults to Asynchronous (immediate like an ISR and not actioned in main loop)
buttonPressActions();
}
void buttonPressActions() {
button_top.bind(Event_LongKeyPress, 0, []() { // LONG PRESS ON BUTTON 2
displayLCD(LCD_Something);
});
button_top.bind(Event_KeyPress, 0, []() { // PRESS ON BUTTON 2
displayLCD(LCD_Something);
});
button_top.bind(Event_DoubleClick, 0, []() { // DOUBLE-CLICK ON BUTTON 2
displayLCD(LCD_Something);
});
button_bottom.bind(Event_KeyPress, 0, []() { // PRESS ON BUTTON 1
displayLCD(LCD_Something);
});
button_bottom.bind(Event_DoubleClick, 0, []() { // DOUBLE-CLICK ON BUTTON 1
displayLCD(LCD_Something);
});
}
Behavior- after some unknown amount of time, the button events stop being triggered. No errors. No stack overflows. It appears the rest of program execution keeps chugging along.