InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.63k stars 902 forks source link

lowersleep: Improve algorithm by checking wrist angle #2014

Closed FintasticMan closed 3 months ago

FintasticMan commented 4 months ago

Inspired by @darkdragon-001 https://github.com/InfiniTimeOrg/InfiniTime/pull/827#issuecomment-1881580414.

Checks if the user's wrist is pointing towards the floor, rather than only the amount of roll. It will turn off the display if the watch is angled at 60 degrees or more, and rotated at least 30 degrees within the last ~600ms.

github-actions[bot] commented 4 months ago
Build size and comparison to main: Section Size Difference
text 373412B 240B
data 940B 0B
bss 63540B 24B
tituscmd commented 4 months ago

Just for my understanding, is it actually optimal to check if the watch is facing the floor? I would imagine the angle most people rest their watch at would be facing to their left, assuming they're wearing the watch on their left wrist.

FintasticMan commented 4 months ago

Sorry for the confusion, this doesn't check if the screen is facing the floor, it checks if your wrist is pointing at the floor (or the ceiling, so that it also works for people who wear their watch on their right wrist).

tituscmd commented 4 months ago

I see, that sounds good. Will definitely try it out soon!