TSynth-Teensy4.1 icon indicating copy to clipboard operation
TSynth-Teensy4.1 copied to clipboard

Feature Request: ability to select screen "type" without uploading different versions of firmware

Open worsco opened this issue 1 year ago • 3 comments

I was thinking about a method of configuring the display during initial boot instead of having to upload different versions of the firmware.

There are three buttons below the display: "Settings", "Save", and "Back" and to the right of the display is the rotary encoder which has the ability to be pressed to "confirm" a selection.

Binary math provides us with eight (8) different "settings" on power-up:

   3 2 1*
0: 0 0 0 no buttons pressed power-up == no state change
1: 0 0 1 default
2: 0 1 0
3: 0 1 1
4: 1 0 0
5: 0 1 0
6: 1 1 0
7: 1 1 1

*Buttons:
1 == Settings
2 == Save
3 == Back

On initial boot-up, what if the three buttons were used to select one of seven possible screen settings (not that there are 7 current display setting possibilities, but there is the ability to select that many different config options on initial power-up).

Here is my pseudo code:

1. If any of the three buttons are pressed on power-up: 
   a. based on the button pressed, choose the configuration setting and configure display
   b. initialize screen with setting chosen
   c. on the display, ask confirmation question "Is display correct/viewable?"
      1. 10 second loop count down
      2. during loop, press down on rotary to confirm
      3. If rotary pressed down, 
         a. if SD card exists, then
            1. create file screen setting (or write-over existing file)
            2. write screen configuration setting (assumes one file used the screen setting)
            3. close file
         b. else exit loop & continue
      4. after 10 second loop (rotary never pressed), continue  w/o saving
         (perhaps the logic could it loop into a sequence where you can try another key combo,
          or would it be better to revert to the "default" screen config and continue booting?)

3. if no buttons pressed on initial power-up
   a. look for config file on SD card for screen configuration file
   b. if file found
       1. parse contents
       2. validate setting:
          a. if valid, set screen config to setting chosen
          b. if invalid, use "default" screen setting (from a previously set constant variable)
          
4. On boot, the initial 'splash-screen' would display the screen-configuration selected.

worsco avatar Apr 23 '23 12:04 worsco