mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-02 16:10:43 +00:00
work needed for deep sleep Lora radio power measurements
This commit is contained in:
@@ -104,6 +104,15 @@ void MeshRadio::reloadConfig()
|
||||
DEBUG_MSG("Set radio: config=%u, ch=%d, txpower=%d\n", channelSettings.modem_config, channelSettings.channel_num, channelSettings.tx_power);
|
||||
}
|
||||
|
||||
|
||||
void MeshRadio::sleep() {
|
||||
// we no longer care about interrupts from this device
|
||||
rf95.prepareDeepSleep();
|
||||
|
||||
// FIXME - leave the device state in rx mode instead
|
||||
rf95.sleep();
|
||||
}
|
||||
|
||||
ErrorCode MeshRadio::send(MeshPacket *p)
|
||||
{
|
||||
DEBUG_MSG("enquing packet for send from=0x%x, to=0x%x\n", p->from, p->to);
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
bool init();
|
||||
|
||||
/// Prepare the radio to enter sleep mode, where it should draw only 0.2 uA
|
||||
void sleep() { rf95.sleep(); }
|
||||
void sleep();
|
||||
|
||||
/// Send a packet (possibly by enquing in a private fifo). This routine will
|
||||
/// later free() the packet to pool. This routine is not allowed to stall because it is called from
|
||||
|
||||
Reference in New Issue
Block a user