From 709fbdb13a6a5a2010d0f2887c8cde6f6cadc1a2 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 26 Oct 2024 17:07:37 +0100 Subject: [PATCH] [LR11x0] Prevent WiFi scanning attempts on LR1121 (#1290) --- src/modules/LR11x0/LR1121.h | 3 --- src/modules/LR11x0/LR11x0.cpp | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/LR11x0/LR1121.h b/src/modules/LR11x0/LR1121.h index 2dc0242bd..b1766c4bf 100644 --- a/src/modules/LR11x0/LR1121.h +++ b/src/modules/LR11x0/LR1121.h @@ -21,9 +21,6 @@ class LR1121: public LR1120 { */ LR1121(Module* mod); // cppcheck-suppress noExplicitConstructor - // TODO this is where overrides to disable GNSS+WiFi scanning methods on LR1121 - // will be put once those are implemented - #if !RADIOLIB_GODMODE private: #endif diff --git a/src/modules/LR11x0/LR11x0.cpp b/src/modules/LR11x0/LR11x0.cpp index 2f97cc8f0..aaf00bfed 100644 --- a/src/modules/LR11x0/LR11x0.cpp +++ b/src/modules/LR11x0/LR11x0.cpp @@ -1512,6 +1512,11 @@ int16_t LR11x0::setLrFhssConfig(uint8_t bw, uint8_t cr, uint8_t hdrCount, uint16 } int16_t LR11x0::startWifiScan(char wifiType, uint8_t mode, uint16_t chanMask, uint8_t numScans, uint16_t timeout) { + // LR1121 cannot do WiFi scanning + if(this->chipType == RADIOLIB_LR11X0_DEVICE_LR1121) { + return(RADIOLIB_ERR_UNSUPPORTED); + } + uint8_t type; switch(wifiType) { case('b'):