diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-31 17:17:34 -0800 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-01-31 17:17:34 -0800 |
commit | 7085f89bfa32f650ce99b0dc6b00c1e89f76697f (patch) | |
tree | a5d957866791227040b4788d3fef6f3a7302d243 | |
parent | 5fb8dabdd2b557450886fa447c081209b2a3b74d (diff) | |
download | Sensor-Watch-7085f89bfa32f650ce99b0dc6b00c1e89f76697f.tar.gz Sensor-Watch-7085f89bfa32f650ce99b0dc6b00c1e89f76697f.tar.bz2 Sensor-Watch-7085f89bfa32f650ce99b0dc6b00c1e89f76697f.zip |
sunrise/sunset: always set the sign bit
-rw-r--r-- | movement/watch_faces/complication/sunrise_sunset_face.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index 5c47d5d0..c8f33f29 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -115,7 +115,7 @@ static int16_t _sunrise_sunset_face_latlon_from_struct(sunrise_sunset_lat_lon_se static sunrise_sunset_lat_lon_settings_t _sunrise_sunset_face_struct_from_latlon(int16_t val) { sunrise_sunset_lat_lon_settings_t retval; - if (val < 0) retval.sign = 1; + retval.sign = val < 0; val = abs(val); retval.hundredths = val % 10; val /= 10; |