* dynamic noise floor sampling

This commit is contained in:
Scott Powell 2025-05-25 21:44:15 +10:00
parent f2243b78ae
commit 0e35ae5ec6
4 changed files with 33 additions and 5 deletions

View file

@ -61,6 +61,10 @@ public:
*/
virtual void loop() { }
virtual int getNoiseFloor() const { return 0; }
virtual void triggerNoiseFloorCalibrate() { }
virtual bool isInRecvMode() const = 0;
/**
@ -112,6 +116,7 @@ class Dispatcher {
unsigned long next_tx_time;
unsigned long cad_busy_start;
unsigned long radio_nonrx_start;
unsigned long next_floor_calib_time;
bool prev_isrecv_mode;
uint32_t n_sent_flood, n_sent_direct;
uint32_t n_recv_flood, n_recv_direct;
@ -129,6 +134,7 @@ protected:
{
outbound = NULL; total_air_time = 0; next_tx_time = 0;
cad_busy_start = 0;
next_floor_calib_time = 0;
_err_flags = 0;
radio_nonrx_start = 0;
prev_isrecv_mode = true;