reset .last at the start of main_loop

NOTE this maybe unnceccesary as this get initd to 0 in _add_ap if .last is -1 at that point
This commit is contained in:
Morgan Allen 2018-09-21 21:34:52 -07:00
parent 8ff9dcc43d
commit b7b28eadec
1 changed files with 2 additions and 2 deletions

View File

@ -112,6 +112,8 @@ void wifi_manager_connect() {
};
void wifi_manager_main_loop() {
ap_store.last = 0;
while(true) {
EventBits_t ev_bits = xEventGroupGetBits(wm_event_group);
@ -120,8 +122,6 @@ void wifi_manager_main_loop() {
xEventGroupSetBits(wm_event_group, WIFI_CONNECTING);
ap_store.last = 0;
wifi_manager_connect();
}