#pragma once #include "CustomSTM32WLx.h" #include "RadioLibWrappers.h" #include class CustomSTM32WLxWrapper : public RadioLibWrapper { public: CustomSTM32WLxWrapper(CustomSTM32WLx& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { } bool isReceivingPacket() override { return ((CustomSTM32WLx *)_radio)->isReceiving(); } float getCurrentRSSI() override { return ((CustomSTM32WLx *)_radio)->getRSSI(false); } float getLastRSSI() const override { return ((CustomSTM32WLx *)_radio)->getRSSI(); } float getLastSNR() const override { return ((CustomSTM32WLx *)_radio)->getSNR(); } float packetScore(float snr, int packet_len) override { int sf = ((CustomSTM32WLx *)_radio)->spreadingFactor; return packetScoreInt(snr, sf, packet_len); } };