Make GPS update interval configurable via settings instead of using hardcoded 1 second value. The interval is persisted from preferences and can be adjusted at runtime through the sensor manager settings interface
Add GPS configuration to NodePrefs structure and persist the GPS
enabled state when toggled via UI. This ensures GPS settings are
retained across device restarts.
According to the documentation and experiments on other boards using
NRF52 + SX1262 this reduces the power consumption significantly.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
The current logic only works for active high LEDs. Some boards need
an active low level control and therefore they set LED_STATE_ON to 0.
Take this into account and use the correct LED pattern for both cases.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
Add the necessary code to properly power-off the Xiao + Wio
companions. This way we can achieve around 15 microamps of power
consumption in the off state.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
The Xiao nRF52840 combined with the Wio-SX1262 is often used for
cheap and compact DIY companion nodes. The Wio actually has an onboard
pushbutton that can be used as user button. Enable support for the
button.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
Use the blue LED as status LED. This prevents the blue LED from
being always-on and draining the battery. Instead use it as status
LED with blink patterns as other companion devices do.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
According to the documentation and experiments on other boards using
NRF52 + SX1262 this reduces the power consumption significantly. This
assumes that the hardware actually has the inductor for the internal
DC/DC regulator populated which is very likely. Even if not, it won't
hurt.
Signed-off-by: Frieder Schrempf <frieder@fris.de>
This should significantly reduce power consumption in hibernation.
Fixes: #1014
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Signed-off-by: Frieder Schrempf <frieder@fris.de> # generalize for all radios and UIs