Remove old debug code and add waitOnBusy timeout to SX1262

This commit is contained in:
jacob.eva 2024-02-10 11:56:58 +00:00
parent b96559d799
commit a1793043b2
No known key found for this signature in database
GPG key ID: 0B92E083BBCCAA1E
2 changed files with 5 additions and 7 deletions

View file

@ -190,9 +190,13 @@ void sx126x::loraMode() {
}
void sx126x::waitOnBusy() {
unsigned long time = millis();
if (_busy != -1) {
while (digitalRead(_busy) == HIGH)
{
if (millis() >= (time + 100)) {
break;
}
// do nothing
}
}