-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
DRAFT: Use automatic light sleep for ESP32 alarm sleep #9559
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the initial PR!
Any idea of what functionality will need to disable this light sleep and can you add the "disable" calls for that? Adding it here will make it easier when we find other things impacted by this change.
@@ -175,7 +180,9 @@ bool serial_connected(void) { | |||
#endif | |||
|
|||
#if CIRCUITPY_CONSOLE_UART | |||
return true; | |||
if (_console_uart_rx_timestamp && (_console_uart_rx_timestamp + (60 * 1024 * 5) > port_get_raw_ticks(NULL))) { |
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.
Please breakout the 60 * 1024 * 5 into a macro that is documented with what it means.
I'm not exactly sure what would need to disable it, but I think it should
be handled already by the ESP-IDF's wake locks API, the ESP won't sleep if
one of those is held
…On Tue, Aug 27, 2024, 2:56 PM Scott Shawcroft ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thanks for the initial PR!
Any idea of what functionality will need to disable this light sleep and
can you add the "disable" calls for that? Adding it here will make it
easier when we find other things impacted by this change.
------------------------------
In supervisor/shared/serial.c
<#9559 (comment)>
:
> @@ -175,7 +180,9 @@ bool serial_connected(void) {
#endif
#if CIRCUITPY_CONSOLE_UART
- return true;
+ if (_console_uart_rx_timestamp && (_console_uart_rx_timestamp + (60 * 1024 * 5) > port_get_raw_ticks(NULL))) {
Please breakout the 60 * 1024 * 5 into a macro that is documented with
what it means.
—
Reply to this email directly, view it on GitHub
<#9559 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZCH55QQ73PD2FN6GWX3LZTTRXNAVCNFSM6AAAAABNA32CRSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRUGQZTMNJUGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ah ok. So we rely on the IDF to prevent sleep if we have things going on? Sounds good to me. |
Follows up on the conversation in #9463 and in Discord.
Draft PR, should be working but not tested in every possible way, posting for discussion purposes.
What this patch does: