-
Notifications
You must be signed in to change notification settings - Fork 13.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
Backported getLocalTime from ESP32 Arduino #8407
Conversation
It seems that you have to rename |
the only part that appears different is - I assume we can modify
getLocalTime(&tmstruct, 500); then delete getLocalTime from that sketch @earlephilhower what do you think? |
@d-a-v does this look ok now? |
cores/esp8266/time.cpp
Outdated
return true; | ||
} | ||
|
||
while (count--) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this loop, maximum timeout is 10 times the value of ms
, which is why Earle divided it by 10.
Original and probably later updated / fixed esp32 code is there with a more accurate loop.
Do you think you can improve your proposal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay then, do you have an idea how LittleFS_Timestamp.ino sketch should be modified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is OK to use the esp32 implementation globally and remove littlefs test's one.
About the CI error, |
It looks like this PR causing lots of troubles. Shall I close it? |
No :) if you want to do it. (please tell if you only need the feature without adding it yourself) |
I dont mind if you add it yourself, otherwise I am happy with this commit, I wasnt sure how to change that sketch file, that why i though asking you |
I used updated esp32 code in #8413, moved the function into another file so it can be used for the esp8266, emulation on host, and host tests, and removed the old local copy from the littleFS test. You can get inspiration from it to fix the CI builds if you like. |
@d-a-v nice. tthank you. |
* import getLocalTime() from esp32/Arduino follows #8407
* import getLocalTime() from esp32/Arduino follows esp8266#8407
New PR. Removed previosly added modifications.
This time just importing new getLocalTime from ESP32 Arduino core