joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.03k stars 210 forks source link

fix nanosec_face correction_profile bounds from going negative #258

Closed analogist closed 11 months ago

analogist commented 1 year ago

The new nanosec_face has a nanosec_state.correction_profile of type int8_t, and can turn negative when ALARM is pressed from profile P0. From there the setting screen will display a cryptic P-, until the modulo arithmetic brings the profile back around to P0 again.

This makes two minor bugfixes to enforce bounds on correction_profile:

joeycastillo commented 11 months ago

This makes sense, thank you for the PR!