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

settimeofday_cb: distinguish from user or sntp #7637

Merged
merged 5 commits into from
Oct 23, 2020

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Oct 6, 2020

This PR overrides settimeofday_cb() with a new callback signature:

  • currently void myCB () is and remains accepted
  • void myBetterCB (bool from_sntp) is added: from_sntp is true when time is set by SNTP, otherwise it is false.

Consequently:

  • lwip2 is updated with a trivial change
  • NTP_TZ_DST example is also updated to show this new callback

Fixes #7616 @JakubRakus

@JakubRakus
Copy link

Tested, works like a charm.

Copy link
Collaborator

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@d-a-v d-a-v merged commit 95fb104 into esp8266:master Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting a callback for SNTP time sync event [feature request]
3 participants