cpu/esp: esp_now timer restart for peer-scan moved
Timer restart was moved from esp_now_scan_peers_done to esp_now_scan_peers_start to avoid that the scan for peers isn't triggered anymore if the esp_now_scan_peers_done callback isn't called because of errors.
This commit is contained in:
parent
26cec66be5
commit
3bb28c989b
@ -160,9 +160,6 @@ static void IRAM_ATTR esp_now_scan_peers_done(void)
|
||||
|
||||
_esp_now_scan_peers_done = true;
|
||||
|
||||
/* set the time for next scan */
|
||||
xtimer_set(&_esp_now_scan_peers_timer, esp_now_params.scan_period);
|
||||
|
||||
mutex_unlock(&_esp_now_dev.dev_lock);
|
||||
}
|
||||
|
||||
@ -170,7 +167,10 @@ static void esp_now_scan_peers_start(void)
|
||||
{
|
||||
DEBUG("%s\n", __func__);
|
||||
|
||||
/* start the scan */
|
||||
esp_wifi_scan_start(&scan_cfg, false);
|
||||
/* set the time for next scan */
|
||||
xtimer_set(&_esp_now_scan_peers_timer, esp_now_params.scan_period);
|
||||
}
|
||||
|
||||
static void IRAM_ATTR esp_now_scan_peers_timer_cb(void* arg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user