implement dynamic userbutton overwrite. fix #2434

This commit is contained in:
Thomas Göttgens
2023-04-18 14:22:37 +02:00
parent 1621fbb5ab
commit e0bb95ca94
5 changed files with 20 additions and 14 deletions

View File

@@ -99,7 +99,7 @@ static void lsIdle()
LOG_INFO("wakeCause2 %d\n", wakeCause2);
#ifdef BUTTON_PIN
bool pressed = !digitalRead(BUTTON_PIN);
bool pressed = !digitalRead(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);
#else
bool pressed = false;
#endif