MeshCore/src/helpers/CustomLLCC68Wrapper.h

20 lines
668 B
C
Raw Normal View History

2025-01-31 12:46:33 +11:00
#pragma once
#include "CustomLLCC68.h"
#include "RadioLibWrappers.h"
class CustomLLCC68Wrapper : public RadioLibWrapper {
public:
CustomLLCC68Wrapper(CustomLLCC68& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
bool isReceivingPacket() override {
return ((CustomLLCC68 *)_radio)->isReceiving();
2025-01-31 12:46:33 +11:00
}
float getLastRSSI() const override { return ((CustomLLCC68 *)_radio)->getRSSI(); }
float getLastSNR() const override { return ((CustomLLCC68 *)_radio)->getSNR(); }
2025-02-04 12:35:53 +11:00
float packetScore(float snr, int packet_len) override {
int sf = ((CustomLLCC68 *)_radio)->spreadingFactor;
2025-02-04 15:00:28 +11:00
return packetScoreInt(snr, sf, packet_len);
2025-02-04 12:35:53 +11:00
}
2025-01-31 12:46:33 +11:00
};