Commit Graph
13 Commits
Author SHA1 Message Date
Daniel BergmanandGitHub 73e62bbc18 New watchface: ish face (#21) 2025-07-06 12:00:56 -04:00
Daniel BergmanandGitHub bdc6f98daa Port Breathing face to second movement, also add LED notification. General fixes. (#34) 2025-07-06 11:58:16 -04:00
Daniel Bergman fff73a8806 Update beats face to use UTC+1. Simplify clock2beats function. 2025-06-30 21:39:21 +02:00
Daniel Bergman bca2fd396a Move emscripten targets to gossamer's rules.mk 2025-06-29 11:00:47 +02:00
Daniel BergmanandGitHub 1d9917c40d Remove stray spaces from sunrise_sunset_face.c 2025-06-28 18:50:58 +02:00
Daniel Bergman 741e25db0d Handle hour overflow 2025-06-28 18:28:57 +02:00
Daniel Bergman e711fd3e60 Cut the corruption checks. When the user updates the location we should be writing correct values to file. 2025-06-28 18:17:34 +02:00
Daniel Bergman 0234f7a391 Better hundreds handling 2025-06-28 17:50:08 +02:00
Daniel Bergman 0b7f53f99d INCLUDES project root in a Windows friendly way 2025-06-28 14:29:05 +02:00
Daniel Bergman 182db67aeb Stray lf 2025-06-28 12:08:42 +02:00
Daniel Bergman 39ca51eeaa Fix handling of longitude data > 100, including longitude data recovery in sunrise/sunset face
- Added functions to detect and recover from corrupted longitude data.
- Updated the activation process to handle potential corruption by recovering and saving corrected longitude values.
- Ensured that longitude values are reset to zero when exceeding valid limits.
2025-06-28 12:07:04 +02:00
Daniel Bergman 1c89baa8d1 Update Makefile to conditionally require BOARD and DISPLAY only for non-clean targets 2025-06-26 20:48:03 +02:00
Daniel BergmanandGitHub 7f9a00ef35 fix(lis2dw): Re-initialize accelerometer after waking from sleep (#16)
* fix(lis2dw): Re-initialize accelerometer after waking from sleep

The LIS2DW accelerometer was not being re-initialized correctly after the device woke from sleep mode. When entering sleep, `watch_enter_sleep_mode` disables peripherals and pins, including those for I²C, to conserve power.

Upon waking, the `app_setup` function was designed to re-initialize the hardware. However, the logic only performed the I²C device check once on the initial boot. On subsequent wakes, the `movement_state.has_lis2dw` flag would prevent the I²C bus and the LIS2DW driver from being set up again. This caused any watch face functionality that relied on the accelerometer, such as the countdown face's tap detection, to fail after a sleep/wake cycle.

This commit refactors the initialization logic within `app_setup`. It now uses a static boolean `lis2dw_initialized` to ensure the sensor is detected only once at boot time. On subsequent wakes, if the sensor was originally found to be present, the I²C bus is explicitly re-enabled and the driver is re-initialized with `lis2dw_begin()` before its configuration is reapplied. This ensures the accelerometer is reliably available after every wake-up.

* fix(lis2dw): only check for accelerometer presence once per boot

Previously, devices without the LIS2DW sensor would re-enable I2C and attempt to detect the sensor on every wake from sleep, wasting power and CPU cycles. This change introduces a static `lis2dw_checked` flag that is set after the first detection attempt, regardless of whether the sensor is found. Now, the presence check and I2C enable/disable only occur once per boot, ensuring that devices without the sensor do not repeatedly attempt detection, improving efficiency and battery life.
2025-06-25 09:18:33 -04:00