Fix for compilation issues regarding not defined SX1262

This commit is contained in:
KonradIT
2025-02-02 23:10:17 +01:00
parent cbccc60906
commit aa79db56f8
2 changed files with 4 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#include <LoRaBoards.h>
#include <bus.h>
#ifdef USING_SX1262
SX1262Module::SX1262Module(RadioModuleSPIConfig radio2) : RadioModule()
{
_radio = new SX1262(new Module(
@@ -47,3 +48,4 @@ int16_t SX1262Module::setFrequency(float freq)
int16_t SX1262Module::setRxBandwidth(float bw) { return _radio->setRxBandwidth(bw); }
float SX1262Module::getRSSI() { return _radio->getRSSI(false); }
#endif

View File

@@ -946,6 +946,7 @@ void init_radio()
delay(100);
#ifdef USING_SX1262
if (config.radio2.enabled && config.radio2.module.equalsIgnoreCase("SX1262"))
{
radio2 = new SX1262Module(config.radio2);
@@ -964,6 +965,7 @@ void init_radio()
}
}
}
#endif
}
struct frequency_scan_result