sx1262 better to check for header because preamble might never result in irq

This commit is contained in:
Kevin Hester
2020-10-08 06:23:05 +08:00
parent bdcd5c3981
commit 1a3cc40c7e
3 changed files with 16 additions and 8 deletions

View File

@@ -151,6 +151,8 @@ void userButtonPressedLong()
screen.adjustBrightness();
}
RadioInterface *rIf = NULL;
void setup()
{
#ifdef USE_SEGGER
@@ -298,8 +300,7 @@ void setup()
digitalWrite(SX1262_ANT_SW, 1);
#endif
// MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)
RadioInterface *rIf = NULL;
// radio init MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)
#if defined(RF95_IRQ)
if (!rIf) {
@@ -405,6 +406,9 @@ void loop()
loopWifi();
// For debugging
// if (rIf) ((RadioLibInterface *)rIf)->isActivelyReceiving();
// Show boot screen for first 3 seconds, then switch to normal operation.
static bool showingBootScreen = true;
if (showingBootScreen && (millis() > 3000)) {