* refactor of RadioLibWrapper::isReceiving()

This commit is contained in:
Scott Powell committed 2025-05-24 20:42:00 +10:00
1 parent d4eb9df491
commit ef6492a035
8 files changed
+32 -73

No files matched your search

+2 -12
View File
@@ -6,18 +6,8 @@
class CustomLR1110Wrapper : public RadioLibWrapper {
public:
CustomLR1110Wrapper(CustomLR1110& radio, mesh::MainBoard& board) : RadioLibWrapper(radio, board) { }
bool isReceiving() override {
if (((CustomLR1110 *)_radio)->isReceiving()) return true;
idle(); // put sx126x into standby
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
bool activity = (((CustomLR1110 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED);
if (activity) {
startRecv();
} else {
idle();
}
return activity;
bool isReceivingPacket() override {
return ((CustomLR1110 *)_radio)->isReceiving();
}
void onSendFinished() override {