* new packet score function

This commit is contained in:
Scott Powell
2025-02-04 15:00:28 +11:00
parent 7da0a5f7ec
commit a93412216a
6 changed files with 28 additions and 21 deletions

View File

@@ -10,6 +10,7 @@ protected:
uint32_t n_recv, n_sent;
void idle();
float packetScoreInt(float snr, int sf, int packet_len);
public:
RadioLibWrapper(PhysicalLayer& radio, mesh::MainBoard& board) : _radio(&radio), _board(&board) { n_recv = n_sent = 0; }
@@ -26,7 +27,7 @@ public:
virtual float getLastRSSI() const override;
virtual float getLastSNR() const override;
float packetScore(float snr, int packet_len) override { return 0.85f; } // stub impl
float packetScore(float snr, int packet_len) override { return packetScoreInt(snr, 10, packet_len); } // assume sf=10
};
/**