]> git.earman.xyz Git - sensor-watch.git/commitdiff
location.bit.latitude needs to be recast as an int16_t
authorDavid Volovskiy <devolov@gmail.com>
Sat, 6 Jun 2026 21:39:16 +0000 (17:39 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Sat, 6 Jun 2026 21:39:16 +0000 (17:39 -0400)
watch-faces/complication/moon_phase_face.c

index faeb0d5f10b6c3349e6d71152b1045391690a1d1..b6147070019528c77bd82db441a67a147efc5f38 100644 (file)
 
 static const float phase_changes[] = {0, 1, 6.38264692644, 8.38264692644, 13.76529385288, 15.76529385288, 21.14794077932, 23.14794077932, 28.53058770576, 29.53058770576};
 
-static bool is_southern_hemisphere(moon_phase_state_t *state) {
+static void is_southern_hemisphere(moon_phase_state_t *state) {
     movement_location_t location = {0};
     if (filesystem_read_file("location.u32", (char *) &location.reg, sizeof(movement_location_t))) {
-        state->southern_hemisphere = location.bit.latitude < 0;
+        state->southern_hemisphere = (int16_t)location.bit.latitude < 0;
     }
 }