travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147
503 stars 55 forks source link

Fix Side Button reboot #110

Closed BitBangingBytes closed 5 years ago

BitBangingBytes commented 5 years ago

Using SideButtonSet to reboot does not work due to the while (debounce?) loop in clock.c (174). Changing main.c to use a 10 second hold of SideButton for a reboot along with the current 4 second hold to return to clock from any app seems more intuitive. It mirrors the power/reset functionality of most devices. Short hold for one function, long hold for another.

BitBangingBytes commented 5 years ago

Also added code to rpn.c to fix SetAM flag not clearing when using SideButton to push a value onto the stack.

Sorry, still learning git.

travisgoodspeed commented 5 years ago

Thanks for the pull request! I'll merge this after I confirm that it doesn't break Shabbat mode.

travisgoodspeed commented 5 years ago

Manually merged in 104ec26 (RPN fix) and 7cac5c8 (sidebutton reboot). You were right that a longer press of the mode button is preferable to the set button, and this caused no trouble to shabbat mode.

Thanks again!