mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #2190 from brianwiddas/espnow-missing-methods
Add missing methods in ESPNOWRadio()
This commit is contained in:
commit
f8fcc1717a
1 changed files with 12 additions and 3 deletions
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
class ESPNOWRadio : public mesh::Radio {
|
class ESPNOWRadio : public mesh::Radio {
|
||||||
protected:
|
protected:
|
||||||
uint32_t n_recv, n_sent;
|
uint32_t n_recv, n_sent, n_recv_errors;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ESPNOWRadio() { n_recv = n_sent = 0; }
|
ESPNOWRadio() { n_recv = n_sent = n_recv_errors = 0; }
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
int recvRaw(uint8_t* bytes, int sz) override;
|
int recvRaw(uint8_t* bytes, int sz) override;
|
||||||
|
|
@ -19,12 +19,21 @@ public:
|
||||||
|
|
||||||
uint32_t getPacketsRecv() const { return n_recv; }
|
uint32_t getPacketsRecv() const { return n_recv; }
|
||||||
uint32_t getPacketsSent() const { return n_sent; }
|
uint32_t getPacketsSent() const { return n_sent; }
|
||||||
void resetStats() { n_recv = n_sent = 0; }
|
uint32_t getPacketsRecvErrors() const { return n_recv_errors; }
|
||||||
|
void resetStats() { n_recv = n_sent = n_recv_errors = 0; }
|
||||||
|
|
||||||
virtual float getLastRSSI() const override;
|
virtual float getLastRSSI() const override;
|
||||||
virtual float getLastSNR() const override;
|
virtual float getLastSNR() const override;
|
||||||
|
|
||||||
float packetScore(float snr, int packet_len) override { return 0; }
|
float packetScore(float snr, int packet_len) override { return 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These two functions do nothing for ESP-NOW, but are needed for the
|
||||||
|
* Radio interface.
|
||||||
|
*/
|
||||||
|
virtual void setRxBoostedGainMode(bool) { }
|
||||||
|
virtual bool getRxBoostedGainMode() const { return false; }
|
||||||
|
|
||||||
uint32_t intID();
|
uint32_t intID();
|
||||||
void setTxPower(uint8_t dbm);
|
void setTxPower(uint8_t dbm);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue