disable lora while updating, show "Updating" on oled screen

This commit is contained in:
Kevin Hester
2021-02-12 13:48:12 +08:00
parent bbc8fc0269
commit 8c225a3c65
8 changed files with 79 additions and 22 deletions

View File

@@ -54,6 +54,8 @@ class RadioInterface
uint32_t shortPacketMsec;
protected:
bool disabled = false;
float bw = 125;
uint8_t sf = 9;
uint8_t cr = 7;
@@ -98,6 +100,9 @@ class RadioInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() { return true; }
/// Disable this interface (while disabled, no packets can be sent or received)
void disable() { disabled = true; 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.