File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55class ESPNOWRadio : public mesh ::Radio {
66protected:
7- uint32_t n_recv, n_sent;
7+ uint32_t n_recv, n_sent, n_recv_errors ;
88
99public:
10- ESPNOWRadio () { n_recv = n_sent = 0 ; }
10+ ESPNOWRadio () { n_recv = n_sent = n_recv_errors = 0 ; }
1111
1212 void init ();
1313 int recvRaw (uint8_t * bytes, int sz) override ;
@@ -19,12 +19,21 @@ class ESPNOWRadio : public mesh::Radio {
1919
2020 uint32_t getPacketsRecv () const { return n_recv; }
2121 uint32_t getPacketsSent () const { return n_sent; }
22- void resetStats () { n_recv = n_sent = 0 ; }
22+ uint32_t getPacketsRecvErrors () const { return n_recv_errors; }
23+ void resetStats () { n_recv = n_sent = n_recv_errors = 0 ; }
2324
2425 virtual float getLastRSSI () const override ;
2526 virtual float getLastSNR () const override ;
2627
2728 float packetScore (float snr, int packet_len) override { return 0 ; }
29+
30+ /* *
31+ * These two functions do nothing for ESP-NOW, but are needed for the
32+ * Radio interface.
33+ */
34+ virtual void setRxBoostedGainMode (bool ) { }
35+ virtual bool getRxBoostedGainMode () const { return false ; }
36+
2837 uint32_t intID ();
2938 void setTxPower (uint8_t dbm);
3039};
You can’t perform that action at this time.
0 commit comments