mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-15 22:37:35 +00:00
fix: need to check USE_SX1262 and USE_SX1268 as they are using the same pinouts
This commit is contained in:
@@ -519,7 +519,7 @@ void setup()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SX126X_CS)
|
||||
#if defined(USE_SX1262)
|
||||
if (!rIf) {
|
||||
rIf = new SX1262Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
|
||||
if (!rIf->init()) {
|
||||
@@ -532,9 +532,9 @@ void setup()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SX1268_CS)
|
||||
#if defined(USE_SX1268)
|
||||
if (!rIf) {
|
||||
rIf = new SX1268Interface(SX1268_CS, SX1268_DIO1, SX1268_RESET, SX1268_BUSY, SPI);
|
||||
rIf = new SX1268Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
|
||||
if (!rIf->init()) {
|
||||
DEBUG_MSG("Warning: Failed to find SX1268 radio\n");
|
||||
delete rIf;
|
||||
|
||||
Reference in New Issue
Block a user