Skip to content

wrong type in declaration of ESP.deepSleep() #3719

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

Closed
5chufti opened this issue Oct 15, 2017 · 8 comments
Closed

wrong type in declaration of ESP.deepSleep() #3719

5chufti opened this issue Oct 15, 2017 · 8 comments

Comments

@5chufti
Copy link
Contributor

5chufti commented Oct 15, 2017

Basic Infos

repeated issue as mentioned in "sdk update 2.1.0" branch

Hardware

Hardware: not relevant
Core Version: 2.1.0-rc2

Description

deepsleep argument for µs is uint64 in sdk but only uint32 in esp8266 core
compare definitions in

esp8266/cores/esp8266/Esp.h
vs.
esp8266/tools/sdk/include/user_interface.h

Settings in IDE

not relevant

Sketch

not relevant

Debug Messages

not relevant

messages here

see attached diff
Esp_core.diff.txt

@igrr
Copy link
Member

igrr commented Oct 15, 2017 via email

@5chufti
Copy link
Contributor Author

5chufti commented Oct 15, 2017

according to documentation this value is needed to calculate max. deep_sleep time.
see #3302
but somehow this value even changes during operation, so it is more "orientation" than exact value.

@igrr
Copy link
Member

igrr commented Oct 15, 2017 via email

@5chufti
Copy link
Contributor Author

5chufti commented Oct 15, 2017

whatever you like, just wanted to keep it simple.

@5chufti
Copy link
Contributor Author

5chufti commented Jan 5, 2018

@igrr
again not in current release ....

@5chufti
Copy link
Contributor Author

5chufti commented Jan 12, 2018

@igrr @devyte
could you please at least tag a milestone and/or asign it to you so that this topic isn't lost again in next release?

@igrr igrr added this to the 2.5.0 milestone Jan 12, 2018
@igrr
Copy link
Member

igrr commented Jan 12, 2018

@5chufti Done, tagged as a bug

@igrr igrr modified the milestones: 2.5.0, 2.4.1 Jan 16, 2018
@devyte
Copy link
Collaborator

devyte commented Jan 18, 2018

@igrr I understand from the sdk api doc that the cali_proc is the RTC period in us. It has an odd format: the 12 lower bits are decimal (i.e.: fraction), the higher bits are integer.
The max deep sleep possible is calculated as a function of the returned cali value. AFAICT, you read the cali, then you calculate the max deepsleep possible, then you check the requested deepsleep against that max, and if it's ok you deepsleep.

-edited for correctness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants