Portduino settings: attempt two

We don't really need to #include radio code here just to check if the pin is RADIOLIB_NC. We're only interested if scanAndSelect pin matches user button pin, but they won't match if user button is RADIOLIB_NC.
This commit is contained in:
Todd Herbert 2025-01-13 23:53:58 +13:00
parent 8449ba7341
commit 7d0d623392

View File

@ -45,7 +45,7 @@ bool ScanAndSelectInput::init()
// Short circuit: if selected pin conficts with the user button
#if defined(ARCH_PORTDUINO)
int pinUserButton = 0;
if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) {
if (settingsMap.count(user) != 0) {
pinUserButton = settingsMap[user];
}
#elif defined(USERPREFS_BUTTON_PIN)