ReflowMaster icon indicating copy to clipboard operation
ReflowMaster copied to clipboard

Dynamic Settings Menu

Open dmadison opened this issue 4 years ago • 0 comments

This PR rebuilds the settings menu from the ground up using objects and a linked list. This enables you to define new menu items using only a few lines of code, and lets the menu scroll to accommodate more items than can fit on the screen.

The menu supports two scroll modes: 'smooth' and 'paged'. By default this uses 'paged' because it requires fewer refreshes of the screen. Both modes insert a positional indicator between the up and down arrows (3rd + 4th buttons) if the number of options exceeds a single page. The up/down selections now also wrap around from the edges of the screen (e.g. at the top pressing 'up' will select the last item).

There are three new menu options:

  • Key tone (on / off)
  • Disable buzzer (on / off, all modes)
  • Startup Tune (on / off)

(the buzzer was annoying me)

There are a few miscellaneous quality of life changes in here as well. When the thermocouple is not connected the 'Reflow' menu item will flash red when selected to indicate an error in addition to beeping the buzzer. The settings struct resets to defaults by copy instead of with a second function (to avoid two sets of default options). I also rebuilt the button drawing system to use a single function that takes the button index, text, and color as an argument. This saves a lot of repeated code for each different page.

I'm guessing that these changes are too sweeping due to your secret development branch, but I thought I would submit the PR nonetheless. Perhaps you can cherry-pick any commits that work with your version.

dmadison avatar Oct 31 '21 19:10 dmadison