Suspend the RAK3401 amplifier during emergency sleep

This commit is contained in:
mikecarper committed 2026-10-28 02:12:04 -07:00
1 parent 0c7dec9f19
commit f4f9453248
7 files changed
+125 -1

No files matched your search

+7
View File
@@ -20,6 +20,10 @@
namespace mesh {
#if MESH_ENABLE_EMERGENCY_POWER
namespace power { class EmergencyPowerRuntime; }
#endif
enum class RadioParamApplyResult : uint8_t {
APPLIED,
BUSY,
@@ -421,6 +425,9 @@ typedef uint32_t DispatcherAction;
* and scheduling of outbound Packets.
*/
class Dispatcher {
#if MESH_ENABLE_EMERGENCY_POWER
friend class power::EmergencyPowerRuntime;
#endif
friend class FleetChannel; // bounded deferred receiver and exact reply retirement
enum class OutboundCancellation : uint8_t { None, Cancelled, Delivered };
Packet* outbound; // current outbound packet
+3
View File
@@ -211,6 +211,9 @@ public:
(void)millisecs;
return false;
}
// Quiesce only board-specific RF controls after owned warm radio sleep;
// restore their prior state before the caller wakes the radio.
virtual void setEmergencyRadioSleeping(bool sleeping) { (void)sleeping; }
#endif
// Called by example setup() functions to signal that boot is complete.
// Boards may override to stop a boot-indicator LED sequence or similar.
+2
View File
@@ -22,6 +22,7 @@ public:
if (budget == 0 || active_operation) {
if (radio_asleep_) {
if (radio_was_available_) {
board.setEmergencyRadioSleeping(false);
if (!radio.setTrackerSleep(false)) radio.recoverRadio(true);
mesh.setRadioAvailable(true);
}
@@ -40,6 +41,7 @@ public:
if (radio_was_available_) {
if (!radio.setTrackerSleep(true)) return false;
mesh.setRadioAvailable(false);
board.setEmergencyRadioSleeping(true);
}
radio_asleep_ = true;
cli.setEmergencyRadioSleeping(true);