-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Callback when the time is set on SNTP (IDFGH-354) #2349
Comments
Thanks @cperezvinsite for your suggestion. I guess this is not an feature in original LWIP release, right? In IDF v3.2, we have updated the LWIP to v2.0.3 and the goal is to minimize Espressif specific change unless it's a bug or very important feature. So currently I'm not sure we will add it in the future. |
There's an active PR for this and Espressif has said they will merge it: #1668 |
What about a callback in settimeofday (since SNTP will call it anyway, but any other function that's changing time). IMHO, it's better to hook here because:
In the #1668, I've provided example code, it's 4 lines. |
Hi @cperezvinsite. We added this feature in 7e5be1b. There has been added the |
@cperezvinsite Thanks for reporting the issue, and feel free to reopen the issue if you still have the question. Thanks. |
Executing python2 get.py behind proxy give error "IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)"
Environment
ESP32-Wrover-Kit
Problem Description
There is some actions that depends on time change, for instance the initialize cron jobs. Then I would recommend an event system based on callbacks in sntp component in order to be capable of find out the time is set.
Expected Behavior
sntp has a funcition to register a callback, then, when the time is set in
SNTP_SET_SYSTEM_TIME_US
orSNTP_SET_SYSTEM_TIME
the callback is called in order to be able to know when the time is setActual Behavior
There is no callback
My code
I create this function to be able to matriculate an event
sntp.c
Then I call the callback on lines
225
or235
but just if the callback is setI already have this code, and if you want I could make a pull request in order to add this feature into ESP-IDF
The text was updated successfully, but these errors were encountered: