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

Fix for NTP blocking loop if connection is blocked #626

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

croggero
Copy link
Contributor

Fixes #615
NTP was blocking the loop causing 10seconds delays when executing when no NTP server could be reached. This fix will check every 10seconds and fall back to the device clock, updating it from the last NTP sync.

@matjack1
Copy link
Collaborator

matjack1 commented Apr 9, 2024

Thank you very much! This is very important mistake that I did. Thank you for fixing it :)

@matjack1 matjack1 merged commit 17e198b into esprfid:dev Apr 9, 2024
@MaximeSharp
Copy link

Just compiled the debug firmware, it's now kind of working.

Here a few issues I've encountered :

  • scanning a admin card does trigger the wifi enable loop and the relay output will stay triggered until the wifi failed (~15 seconds)

  • when starting the ESP-RFID board without any wifi available, it won't sync with the NTP server (obviously) but even if the wifi get available after, it doesn't sync with the NTP server ([DEBUG] NTP sync failed) and time will be stuck at the 1st January 1970

@matjack1
Copy link
Collaborator

matjack1 commented Apr 9, 2024

Thanks! I'll check these

@matjack1
Copy link
Collaborator

matjack1 commented Apr 9, 2024

hey @MaximeSharp I've just committed on dev a little fix for the NTP after wifi reconnect, can you please confirm that it's working?

Instead for the other one, can you please open a separate issue as I'm not sure it's related to this PR.

Thanks!

@MaximeSharp
Copy link

hey @MaximeSharp I've just committed on dev a little fix for the NTP after wifi reconnect, can you please confirm that it's working?

Instead for the other one, can you please open a separate issue as I'm not sure it's related to this PR.

Thanks!

Compiled and tested, NTP sync after wifi reconnect is now working !

No problem, I will open a separate issue for the other one and add more info/logs.

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.

3 participants