]> git.earman.xyz Git - sensor-watch.git/commitdiff
fix broken simulator build
authorjoeycastillo <joeycastillo@utexas.edu>
Mon, 14 Oct 2024 16:51:17 +0000 (12:51 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Mon, 14 Oct 2024 16:51:17 +0000 (12:51 -0400)
gossamer
movement.c
watch-library/simulator/watch/watch_tcc.c

index 5487c83df80be238a9e869e281201f4f122a0883..0bac9645bc2ba42e8e298234884768e726151025 160000 (submodule)
--- a/gossamer
+++ b/gossamer
@@ -1 +1 @@
-Subproject commit 5487c83df80be238a9e869e281201f4f122a0883
+Subproject commit 0bac9645bc2ba42e8e298234884768e726151025
index 68faf7c4469fade46cdbc47acf939443c1d39778..1535af8738df89cc87d23f1e78512003b693c2d1 100644 (file)
@@ -617,6 +617,13 @@ void app_setup(void) {
         watch_register_interrupt_callback(HAL_GPIO_BTN_ALARM_pin(), cb_alarm_btn_interrupt, INTERRUPT_TRIGGER_BOTH);
 
 #ifdef HAS_ACCELEROMETER
+// gossamer doesn't include all the chip-specific constants, so we have to fake them here.
+#ifndef EVSYS_ID_GEN_EIC_EXTINT_3
+#define EVSYS_ID_GEN_EIC_EXTINT_3 18
+#endif
+#ifndef EVSYS_ID_USER_TC2_EVU
+#define EVSYS_ID_USER_TC2_EVU 17
+#endif
         watch_enable_i2c();
         if (lis2dw_begin()) {
             lis2dw_set_mode(LIS2DW_MODE_LOW_POWER);         // select low power (not high performance)
index 6cf7235c9e3c27392fed1339f08e276c430ed9ef..f0046849c536edd3948e01c9de03383c6826fcda 100644 (file)
@@ -171,10 +171,14 @@ void watch_set_buzzer_off(void) {
 }
 
 void watch_buzzer_play_note(watch_buzzer_note_t note, uint16_t duration_ms) {
+    watch_buzzer_play_note_with_volume(note, duration_ms, WATCH_BUZZER_VOLUME_LOUD);
+}
+
+void watch_buzzer_play_note_with_volume(watch_buzzer_note_t note, uint16_t duration_ms, watch_buzzer_volume_t volume) {
     if (note == BUZZER_NOTE_REST) {
         watch_set_buzzer_off();
     } else {
-        watch_set_buzzer_period_and_duty_cycle(NotePeriods[note], 25);
+        watch_set_buzzer_period_and_duty_cycle(NotePeriods[note], volume == WATCH_BUZZER_VOLUME_SOFT ? 5 : 25);
         watch_set_buzzer_on();
     }