mirror of
https://github.com/polpo/picogus.git
synced 2026-10-25 21:40:16 +00:00
Periodically try reconnecting
This commit is contained in:
1 parent
0984cad9f4
commit
0836bc627c
1 file changed
+10
@@ -64,6 +64,7 @@ void play_ne2000() {
|
||||
PG_EnableWifi();
|
||||
PG_Wifi_Connect(settings.WiFi.ssid, settings.WiFi.password);
|
||||
|
||||
static bool flag = false;
|
||||
while(1) {
|
||||
PIC_AddEvent(&Wifi_Reconnect_Event, 1000, 0);
|
||||
if (multicore_fifo_rvalid()) {
|
||||
@@ -79,5 +80,14 @@ void play_ne2000() {
|
||||
}
|
||||
}
|
||||
//cyw43_arch_poll();
|
||||
if (((time_us_32() >> 21) & 0x1) == 0x1) {
|
||||
if (flag == false) {
|
||||
putchar('=');
|
||||
PG_Wifi_Reconnect();
|
||||
flag = true;
|
||||
}
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user