Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add wifi monitoring loop #153

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

kharnt0x
Copy link
Contributor

@kharnt0x kharnt0x commented Feb 2, 2024

This PR adds a WiFi monitoring loop using a state machine to be non-blocking.

This ensures that if wifi goes down or is flakey, the Battery Emulator will try to reconnect without blocking the main features.

Currently will run every 30 seconds

Also improves the wifi initial connection in the same way meaning we can boot faster and start talking to the battery/inverter straight away

@dalathegreat
Copy link
Owner

Checked out and verified working. Turned off WifiRouter for a few minutes, and then powered it back on. The board managed to reconnect 🙌

Also, getting rid of the delay(500); block was just icing on the cake! Nice work, approved! ✅

@dalathegreat dalathegreat merged commit 26cbc47 into dalathegreat:main Feb 2, 2024
17 checks passed
kharnt0x pushed a commit to kharnt0x/Battery-Emulator that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants