]> git.earman.xyz Git - sensor-watch.git/commit
Fix simulator and hardware divergence in callback handling (#252)
authorVictor Graf <nategraf1@gmail.com>
Sun, 19 Nov 2023 04:10:45 +0000 (20:10 -0800)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2023 04:10:45 +0000 (23:10 -0500)
commit5b212a442317a7c6b3c09c1e64aff46922f3d365
treeac2da65989886c8bceda1dbfc73c18c7b49d2c85
parentae6ccfd6377f027a9f8c9acdbaa525a6f54f734f
Fix simulator and hardware divergence in callback handling (#252)

When using the simulator, I encountered cases where the light would become stuck on, and the watch
would be unresponsive. In particular, this would occur when pressing the light button on the
sunrise sunset watch face.

I appears that this is caused by a divergence in out the callback mask is interpreted by the
hardware interface, and in the simulator in the following function.

void watch_rtc_disable_matching_periodic_callbacks(uint8_t mask)

In particular, a mask of 0xFE is intended to disable all except the 128hz callback at index 0,
but instead disables all except the 1hz callback at index 7 in the simulator.
watch-library/simulator/watch/watch_rtc.c