diff --git a/src/ButtonThread.h b/src/ButtonThread.h index 2ca5d4c28..a60b7730a 100644 --- a/src/ButtonThread.h +++ b/src/ButtonThread.h @@ -48,6 +48,7 @@ class ButtonThread : public concurrency::OSThread // callback returns the period for the next callback invocation (or 0 if we should no longer be called) ButtonThread() : OSThread("Button") { +#if defined(ARCH_RASPBERRY_PI) || defined(BUTTON_PIN) #if defined(ARCH_RASPBERRY_PI) if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) userButton = OneButton(settingsMap[user], true, true); @@ -72,6 +73,7 @@ class ButtonThread : public concurrency::OSThread #else wakeOnIrq(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, FALLING); #endif +#endif #ifdef BUTTON_PIN_ALT userButtonAlt = OneButton(BUTTON_PIN_ALT, true, true); #ifdef INPUT_PULLUP_SENSE @@ -223,4 +225,4 @@ class ButtonThread : public concurrency::OSThread } }; -} // namespace concurrency \ No newline at end of file +} // namespace concurrency