In the original movement, the 'usb enabled' check was overridden
to true for the simulator such that shell_task() would always
be executed. In the new 'dummy' device in gossamer used by the
simulator, this usb check returns false.
Seemed like a slightly cleaner thing to do was to call
shell_task() regardless rather than to incorrectly
pretend that USB was connected.
* Time can get set from makefile
* Added setting make time into simulator
* Added Hash in settings
* Added default location
* Cuts the Githash to 6 characters in the settings in case the makefile didn't do that already
* bump gossamer commit
* remove automatic timezone setting
* automatic time set: rename MAKEFILE_ to BUILD_ to match gossamer
* Revert "Added default location"
This reverts commit c24f69450fd40472c4f6cebb790a56c3f0d69cb6.
* silence warning
* watch_get_init_date_time: explicitly initialize all fields to 0
---------
Co-authored-by: Joey Castillo <joeycastillo@utexas.edu>
* 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.