MeshCore/src/helpers/CustomLR1110Wrapper.h

22 lines
769 B
C
Raw Normal View History

2025-02-14 09:54:06 +01:00
#pragma once
#include "CustomLR1110.h"
#include "RadioLibWrappers.h"
class CustomLR1110Wrapper : public RadioLibWrapper {
public:
CustomLR1110Wrapper(CustomLR1110& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
bool isReceivingPacket() override {
return ((CustomLR1110 *)_radio)->isReceiving();
2025-02-14 09:54:06 +01:00
}
void onSendFinished() override {
RadioLibWrapper::onSendFinished();
_radio->setPreambleLength(8); // overcomes weird issues with small and big pkts
}
float getLastRSSI() const override { return ((CustomLR1110 *)_radio)->getRSSI(); }
float getLastSNR() const override { return ((CustomLR1110 *)_radio)->getSNR(); }
int16_t setRxBoostedGainMode(bool en) { return ((CustomLR1110 *)_radio)->setRxBoostedGainMode(en); };
2025-02-14 09:54:06 +01:00
};