work needed for deep sleep Lora radio power measurements

This commit is contained in:
geeksville 2020-02-12 08:44:31 -08:00
parent d3ce56f1b5
commit c18306076a
3 changed files with 15 additions and 2 deletions

View File

@ -1,10 +1,12 @@
# High priority
* finish power measurements and est battery life
* have node info screen show real info (including time since last contact, distance and heading)
* make debug info screen show real data (including battery level & charging)
* make real implementation of getNumOnlineNodes
* very occasionally send our position and user packet based on the schedule in the radio info (if for nothing else so that other nodes update last_seen)
* make screen advance only when a new node update arrives, a new text arrives or the user presses a button
* show real text info on the text screen
* retest BLE software update for both board types
# Medium priority
@ -59,6 +61,7 @@ until the phone pulls those packets. Ever so often power on bluetooth just so w
# Low priority
* the AXP debug output says it is trying to charge at 700mA, but the max I've seen is 180mA, so AXP registers probably need to be set to tell them the circuit can only provide 300mAish max. So that the low charge rate kicks in faster and we don't wear out batteries.
* increase the max charging rate a bit for 18650s, currently it limits to 180mA (at 4V). Work backwards from the 500mA USB limit (at 5V) and let the AXP charge at that rate.
* add receive timestamps to messages, inserted by esp32 when message is received but then shown on the phone
* if radio params change fundamentally, discard the nodedb
@ -118,3 +121,4 @@ until the phone pulls those packets. Ever so often power on bluetooth just so w
* make jtag debugger id stable: https://askubuntu.com/questions/49910/how-to-distinguish-between-identical-usb-to-serial-adapters
* reported altitude is crap
* good tips on which bands might be more free https://github.com/TheThingsNetwork/ttn/issues/119
* finish power measurements (GPS on during sleep vs LCD on during sleep vs LORA on during sleep) and est battery life

View File

@ -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);

View File

@ -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