From 9b12bb2be44c68ee44211d79268158f23fb6571b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 6 Nov 2021 08:27:28 -0500 Subject: [PATCH] Add always_powered user preference At the request of some users (mostly on the discord group) having issues with device sleeping in some instances where the battery ADC is not reliable enough to be trusted, I'm proposing this user preference to circumvent the logic in powerFSM.cpp (which I will create another PR for). I have personally used this in the form of a #define ALWAYS_POWERED, but I've seen enough interest in it that I feel it deserves a spot in the user preferences. --- radioconfig.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radioconfig.proto b/radioconfig.proto index fe184ea..675878b 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -548,6 +548,12 @@ message RadioConfig { * (bitwise OR of PositionFlags) */ uint32 position_flags = 150; + + /* + * Circumvents the logic block for determining whether the device is powered or not. + * Useful for devices with finicky ADC issues on the battery sense pins. + */ + bool always_powered = 151; } UserPreferences preferences = 1;