Allow button press if CannedMessage updown1 or rotary1 are not enabled (#3067)

`BUTTON_PIN` may be 0, which is equal to `inputbroker_pin_press` by default
This commit is contained in:
GUVWAF 2024-01-10 02:45:54 +01:00 committed by GitHub
parent 613a2bfb70
commit 77ff1704db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,6 +138,7 @@ class ButtonThread : public concurrency::OSThread
#ifdef BUTTON_PIN
if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) !=
moduleConfig.canned_message.inputbroker_pin_press) ||
!(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) ||
!moduleConfig.canned_message.enabled) {
powerFSM.trigger(EVENT_PRESS);
}
@ -232,4 +233,4 @@ class ButtonThread : public concurrency::OSThread
}
};
} // namespace concurrency
} // namespace concurrency