Skip to content

Commit

Permalink
sx1280: give more time to wake up
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Aug 16, 2023
1 parent 436c39a commit cc6a190
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rx/express_lrs_radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ volatile uint8_t packet_status[2] = {0, 0};

static bool elrs_radio_detect() {
for (size_t i = 0; i < 10; i++) {
sx128x_reset();
time_delay_us(50);

uint8_t buf[2];
sx128x_read_register_burst(SX128x_LR_FIRMWARE_VERSION_MSB, buf, 2);
sx128x_wait();
Expand All @@ -63,6 +66,8 @@ static bool elrs_radio_detect() {
if ((version != 0) && (version != 65535)) {
return true;
}

time_delay_ms(50);
}
return false;
}
Expand All @@ -72,7 +77,6 @@ bool elrs_radio_init() {
if (!sx128x_init()) {
return false;
}
sx128x_reset();

if (!elrs_radio_detect()) {
return false;
Expand Down

0 comments on commit cc6a190

Please sign in to comment.