]>
git.earman.xyz Git - sensor-watch.git/log
Joey Castillo [Wed, 25 Jun 2025 21:24:56 +0000 (17:24 -0400)]
remove light meter face (did not work, could add back later)
Joey Castillo [Wed, 25 Jun 2025 21:23:31 +0000 (17:23 -0400)]
accelerometer status face: flash decimal when setting threshold
Joey Castillo [Wed, 25 Jun 2025 21:22:17 +0000 (17:22 -0400)]
accelerometer: keep threshold across sleeps by tracking it in movement
Joey Castillo [Wed, 25 Jun 2025 21:18:37 +0000 (17:18 -0400)]
ir upload: time out by default
Joey Castillo [Wed, 25 Jun 2025 21:08:38 +0000 (17:08 -0400)]
ir upload: display free space instead of 'no data'
Daniel Bergman [Wed, 25 Jun 2025 13:18:33 +0000 (15:18 +0200)]
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.
Joey Castillo [Thu, 12 Jun 2025 03:27:17 +0000 (23:27 -0400)]
accelerometer status: documentation update
Joey Castillo [Thu, 12 Jun 2025 03:25:08 +0000 (23:25 -0400)]
accelerometer: don't initialize on wake if already set up
Joey Castillo [Thu, 12 Jun 2025 03:06:40 +0000 (23:06 -0400)]
accelerometer status face: bug fixes
Joey Castillo [Sun, 8 Jun 2025 13:48:25 +0000 (07:48 -0600)]
mars time: long press to change time zone
Joey Castillo [Sun, 8 Jun 2025 13:47:31 +0000 (07:47 -0600)]
temperature display: long press to toggle units
Joey Castillo [Sun, 8 Jun 2025 03:25:57 +0000 (21:25 -0600)]
bugfix: remove time_offset to get alarm handler working in simulator
Joey Castillo [Thu, 5 Jun 2025 00:48:00 +0000 (20:48 -0400)]
fast stopwatch: fix overconsumption
Joey Castillo [Wed, 4 Jun 2025 04:19:51 +0000 (00:19 -0400)]
countdown timer: snap back to clock on timeout, unless running
Joey Castillo [Tue, 3 Jun 2025 00:27:14 +0000 (20:27 -0400)]
mars time: actually update in low energy mode
Joey Castillo [Thu, 29 May 2025 12:21:18 +0000 (08:21 -0400)]
add watch face to peek at a memory location
Joey Castillo [Thu, 29 May 2025 11:16:50 +0000 (07:16 -0400)]
for testing: add NOSLEEP build option to remove sleep mode entirely
Joey Castillo [Thu, 29 May 2025 03:43:13 +0000 (23:43 -0400)]
world clock: blink colon in low energy mode
Joey Castillo [Thu, 29 May 2025 03:42:38 +0000 (23:42 -0400)]
mars time: don't time out, enable low energy animation
Joey Castillo [Wed, 28 May 2025 00:39:56 +0000 (20:39 -0400)]
set LED's drive strength to high
Joey Castillo [Tue, 27 May 2025 23:30:54 +0000 (19:30 -0400)]
bring mars time into Second Movement
Joey Castillo [Mon, 26 May 2025 14:51:11 +0000 (10:51 -0400)]
power down accelerometer unless a watch face requests it
Joey Castillo [Mon, 26 May 2025 14:50:07 +0000 (10:50 -0400)]
swap temperature and battery in default firmware
Joey Castillo [Wed, 21 May 2025 19:44:45 +0000 (15:44 -0400)]
movement_config: put alarm into standard rotation
Joey Castillo [Wed, 21 May 2025 19:44:16 +0000 (15:44 -0400)]
alarm_face: hook alarm up to main clock's alarm indicator
Joey Castillo [Wed, 21 May 2025 19:08:00 +0000 (15:08 -0400)]
movement: fire top of minute at top of minute, not bottom of last minute
Joey Castillo [Wed, 21 May 2025 19:07:29 +0000 (15:07 -0400)]
bring wake_face into Second Movement (renamed alarm_face)
Joey Castillo [Wed, 21 May 2025 13:17:38 +0000 (09:17 -0400)]
nanosec: add braces since we declare things
Joey Castillo [Wed, 21 May 2025 12:51:39 +0000 (08:51 -0400)]
watch_adc: enable ADC when checking battery; let's get rid of this footgun once and for all
Joey Castillo [Wed, 21 May 2025 05:19:29 +0000 (01:19 -0400)]
preferences face: removed in favor of new settings face
Joey Castillo [Wed, 21 May 2025 05:15:03 +0000 (01:15 -0400)]
temperature logger: skip if no temperature sensor is available
Joey Castillo [Wed, 21 May 2025 05:12:20 +0000 (01:12 -0400)]
temperature logger: rename stuff to remove thermistor references
Joey Castillo [Wed, 21 May 2025 05:10:09 +0000 (01:10 -0400)]
temperature faces: no need to import thermistor driver
Joey Castillo [Wed, 21 May 2025 05:09:15 +0000 (01:09 -0400)]
nanosec: use new Movement API for getting temperature
Joey Castillo [Wed, 21 May 2025 04:53:13 +0000 (00:53 -0400)]
watch utility: make Friday all caps like the others
Joey Castillo [Wed, 21 May 2025 04:50:15 +0000 (00:50 -0400)]
port nanosec and finetune to Second Movement
Joey Castillo [Wed, 21 May 2025 04:15:19 +0000 (00:15 -0400)]
default firmware: put stopwatch before countdown
Joey Castillo [Wed, 21 May 2025 03:50:09 +0000 (23:50 -0400)]
slcd: we can fit these segment mappings into one byte
Joey Castillo [Wed, 21 May 2025 03:42:22 +0000 (23:42 -0400)]
bugfix: need definition of colon as indicator for blinking on custom LCD
Joey Castillo [Wed, 21 May 2025 03:36:20 +0000 (23:36 -0400)]
voltage and temperature: clear sleep animation on activate
Joey Castillo [Wed, 21 May 2025 03:34:47 +0000 (23:34 -0400)]
countdown: implement sleep mode animation
Joey Castillo [Wed, 21 May 2025 03:30:27 +0000 (23:30 -0400)]
moon phase: clear sleep animation on wake
Joey Castillo [Wed, 21 May 2025 02:35:16 +0000 (22:35 -0400)]
clock face: move state typedef to header for consistency
Joey Castillo [Wed, 21 May 2025 02:34:15 +0000 (22:34 -0400)]
clock face: rename 'clock' to 'state' for consistency
Joey Castillo [Tue, 20 May 2025 21:34:45 +0000 (17:34 -0400)]
activity logging: try to ignore spurious active minutes
Joey Castillo [Tue, 20 May 2025 21:27:32 +0000 (17:27 -0400)]
movement: add loudness setting for button press
Joey Castillo [Mon, 19 May 2025 01:19:12 +0000 (21:19 -0400)]
display detection: return straight away if LCD type was forced
Joey Castillo [Mon, 19 May 2025 01:04:49 +0000 (21:04 -0400)]
watch library: remove LCD autodetect, make selection manual
Joey Castillo [Mon, 19 May 2025 00:45:37 +0000 (20:45 -0400)]
light meter: was written today lol
Joey Castillo [Mon, 19 May 2025 00:32:36 +0000 (20:32 -0400)]
light meter: rough half-working prototype
Joey Castillo [Sun, 18 May 2025 16:07:35 +0000 (12:07 -0400)]
activity log: snap back to today on timeout
Joey Castillo [Sun, 18 May 2025 16:06:39 +0000 (12:06 -0400)]
activity log: update today's count at top of minute
Joey Castillo [Sun, 18 May 2025 15:26:47 +0000 (11:26 -0400)]
activity log: clear animation when waking from sleep mode
Joey Castillo [Sun, 18 May 2025 15:12:47 +0000 (11:12 -0400)]
light meter: initial UI work
Joey Castillo [Sun, 18 May 2025 13:04:25 +0000 (09:04 -0400)]
no need for state in light sensor demo
Joey Castillo [Sun, 18 May 2025 11:40:47 +0000 (07:40 -0400)]
light sensor: back to demo with you
Joey Castillo [Sun, 18 May 2025 03:35:14 +0000 (23:35 -0400)]
claify sleep animatiion documentation
Joey Castillo [Sun, 18 May 2025 03:27:51 +0000 (23:27 -0400)]
watch_display_text_with_fallback: update documentation
Joey Castillo [Sun, 18 May 2025 03:24:18 +0000 (23:24 -0400)]
watch_display_string: update deprecation notes
Joey Castillo [Sun, 18 May 2025 03:21:31 +0000 (23:21 -0400)]
light sensor: add warning to documentation
Joey Castillo [Sun, 18 May 2025 03:18:10 +0000 (23:18 -0400)]
light sensor: improvements for custom LCD
Joey Castillo [Sun, 18 May 2025 02:19:45 +0000 (22:19 -0400)]
move accelerometer and light to sensor, not demo folder
Joey Castillo [Sun, 18 May 2025 02:18:10 +0000 (22:18 -0400)]
remove unnecessary demo watch faces
Joey Castillo [Sun, 18 May 2025 02:06:11 +0000 (22:06 -0400)]
clean up after detecting thermistor
Joey Castillo [Sun, 18 May 2025 02:02:34 +0000 (22:02 -0400)]
activity log: update documentation
Joey Castillo [Sat, 17 May 2025 22:46:13 +0000 (18:46 -0400)]
irda upload: increase receive buffer to 256 bytes
Joey Castillo [Sat, 17 May 2025 22:18:29 +0000 (18:18 -0400)]
IrDA: restore red/green status, improve display
Joey Castillo [Sat, 17 May 2025 22:07:59 +0000 (18:07 -0400)]
add ability to delete via IrDA
Joey Castillo [Sat, 17 May 2025 21:55:02 +0000 (17:55 -0400)]
irda_demo -> irda_upload
Joey Castillo [Sat, 17 May 2025 21:52:25 +0000 (17:52 -0400)]
improved file upload via IrDA
Joey Castillo [Sat, 17 May 2025 20:38:01 +0000 (16:38 -0400)]
activity faces: improve experience in low energy mode
Joey Castillo [Sat, 17 May 2025 18:32:01 +0000 (14:32 -0400)]
oops. activity tracking: high means stationary, low means active
Joey Castillo [Sat, 17 May 2025 18:16:26 +0000 (14:16 -0400)]
for now, build for red board and classic display
Joey Castillo [Sat, 17 May 2025 17:54:37 +0000 (13:54 -0400)]
simplify activity tracking, just active minutes for now
Joey Castillo [Sat, 17 May 2025 16:40:29 +0000 (12:40 -0400)]
force a choice of display type at build time
Joey Castillo [Sat, 17 May 2025 16:16:27 +0000 (12:16 -0400)]
let temperature screen skip itself, restore it to the default firmware
Joey Castillo [Sat, 17 May 2025 15:55:03 +0000 (11:55 -0400)]
fix long press bug (seems related to disabling an interrupt)
Joey Castillo [Sat, 17 May 2025 15:03:51 +0000 (11:03 -0400)]
add movement_get_temperature, works across different sensor boards
Joey Castillo [Sat, 17 May 2025 14:23:38 +0000 (10:23 -0400)]
automatically detect temperature sensor
Joey Castillo [Fri, 16 May 2025 13:09:14 +0000 (09:09 -0400)]
time set: disable quick ticks when resetting seconds
Joey Castillo [Fri, 16 May 2025 13:08:33 +0000 (09:08 -0400)]
remove errant braces
Joey Castillo [Fri, 16 May 2025 12:55:54 +0000 (08:55 -0400)]
bump gossamer commit
Joey Castillo [Fri, 16 May 2025 05:12:38 +0000 (01:12 -0400)]
accelerometer: fail gracefully in absence of I2C bus
Joey Castillo [Fri, 16 May 2025 04:43:43 +0000 (00:43 -0400)]
for now, build for Lite to test the build
Joey Castillo [Fri, 16 May 2025 04:12:16 +0000 (00:12 -0400)]
default to low energy mode after one hour
Joey Castillo [Fri, 16 May 2025 04:07:15 +0000 (00:07 -0400)]
auto-detect accelerometer sensor (and don't fail build for lack of a temperature sensor)
Joey Castillo [Fri, 16 May 2025 02:49:07 +0000 (22:49 -0400)]
set date first, then time zone, then time
Joey Castillo [Fri, 16 May 2025 02:12:12 +0000 (22:12 -0400)]
watch_rtc clarification: 128 Hz is 0x80, not 0xF0
Joey Castillo [Fri, 16 May 2025 01:33:26 +0000 (21:33 -0400)]
FREQCORR is now handled in _watch_rtc_init
Joey Castillo [Thu, 15 May 2025 13:12:12 +0000 (09:12 -0400)]
settings: silence warnings on boards without a blue or green LED
Joey Castillo [Thu, 15 May 2025 13:08:06 +0000 (09:08 -0400)]
working makefile for folks to test with
Joey Castillo [Thu, 15 May 2025 13:07:33 +0000 (09:07 -0400)]
no temperature face in defaults
Joey Castillo [Thu, 15 May 2025 12:43:30 +0000 (08:43 -0400)]
rearrange default watch faces
Joey Castillo [Tue, 13 May 2025 22:46:48 +0000 (18:46 -0400)]
resume disabling EIC in deep sleep
Joey Castillo [Tue, 13 May 2025 22:23:03 +0000 (18:23 -0400)]
new watch face order for pro
Joey Castillo [Tue, 13 May 2025 22:21:58 +0000 (18:21 -0400)]
remove orientation change counter
Joey Castillo [Tue, 13 May 2025 02:36:30 +0000 (22:36 -0400)]
clock-face: adjust low battery threshold
Joey Castillo [Tue, 13 May 2025 02:34:27 +0000 (22:34 -0400)]
custom LCD now has an 'arrows' indicator instead of a battery
Joey Castillo [Tue, 13 May 2025 02:25:27 +0000 (22:25 -0400)]
enable filtering on button inputs
Joey Castillo [Mon, 12 May 2025 00:16:40 +0000 (20:16 -0400)]
improved contrast on custom LCD