sharandac / My-TTGO-Watch

A GUI named hedge for smartwatch like devices based on ESP32. Currently support for T-Watch2020 (V1,V2,V3), T-Watch2021, M5Paper, M5Core2 and native Linux support for testing.
GNU General Public License v2.0
523 stars 247 forks source link

Go standby blocked #389

Closed hermannw closed 1 year ago

hermannw commented 1 year ago

First of all, thank you for this great piece of software! I have a similar problem with the power consumption as mentioned on other topics here. With everything off, screen dimmed almost to minimum and time out to 15 seconds, the 400mAh battery only lasts about 5-6 hours. Looking at the serial terminal I see this when the watch goes to sleep:

E (3772392) gpio: GPIO wakeup only supports level mode, but edge mode set. gpio_num:39 [I][powermgm.cpp:220] powermgm_loop(): T-Watch2020V3 uptime: 3733 [W][powermgm.cpp:273] powermgm_loop(): go standby blocked

...and then it stays there until woken up again. Is it possible that something is still keeping the watch from going to sleep? If yes, what could that be?

Any help would be appreciated. Hermann

hermannw commented 1 year ago

Must have done something wrong... It seems to work now.

GDV0 commented 1 year ago

Hello, I had exactly the same issue with the same TTGO T-Watch 2020 v3 400mAh and I finally found what was wrong. standby was always false returned by this line in powermgm.cpp: image I 've discovered that sdcard_powermgm_event_cb returned false. 2 variables (sdcard_mount_failed and sdcard_mounted) initialised to false, exist but unfortunately:

I have fixed my issue with the highlighted modification in sdcard_powermgm_event_cb() function in sdcard.cpp file image

and now i have every time this message image and the battery decreases from 100% to 75% in 24h when in sleep mode.