InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

lowersleep: Improve algorithm by checking wrist angle

Open FintasticMan opened this issue 1 year ago • 1 comments

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.

FintasticMan avatar Feb 12 '24 11:02 FintasticMan

Build size and comparison to main:

Section Size Difference
text 373412B 240B
data 940B 0B
bss 63540B 24B

github-actions[bot] avatar Feb 12 '24 11:02 github-actions[bot]

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.

tituscmd avatar Feb 24 '24 15:02 tituscmd

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).

FintasticMan avatar Feb 24 '24 16:02 FintasticMan

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

tituscmd avatar Feb 24 '24 21:02 tituscmd