andrewfernie / FreeTouchDeckWT32

19 stars 4 forks source link

Firmware Add-on #2

Closed kraa965 closed 1 year ago

kraa965 commented 1 year ago

Modify it so that it is not possible to edit the settings menu, otherwise you can accidentally knock down the buttons and have to rewire

andrewfernie commented 1 year ago

Do you mean that the settings menu should not be in a menu.json file? Or that it should not be possible to change the settings menu from the configurator?

kraa965 commented 1 year ago

so that it cannot be changed from the configurator and so that there are no extra buttons in the settings menu itself

andrewfernie commented 1 year ago

I don't want to freeze the configuration of the settings page within the code as one of the primary goals for my changes was to make all pages and buttons equal. However, I think that I can add a flag in the json file for each page that says whether it can be accessed by the configurator. That should at least keep it safe from casual users that only use the configurator to make changes.

kraa965 commented 1 year ago

I don't want to freeze the configuration of the settings page within the code as one of the primary goals for my changes was to make all pages and buttons equal. However, I think that I can add a flag in the json file for each page that says whether it can be accessed by the configurator. That should at least keep it safe from casual users that only use the configurator to make changes.

I would be very grateful if you do this, otherwise I accidentally edited it once and had to flash it again

kraa965 commented 1 year ago

Also, you can limit the number of buttons in the settings, tell me how to do it?

andrewfernie commented 1 year ago

What do you mean by limiting the number of buttons? You can define the number of buttons per row and column by changing these lines in FreeTouchDeckWT32.h, but this applies to all pages.

// Button layout and number of pages with buttons
#define BUTTON_ROWS 3
#define BUTTON_COLS 4

You can also make a button blank by setting the logo to "blank.bmp" with all the actions and values 0. It will look something like this in the menuX.json file:

  "button12": {
    "logo": "blank.bmp",
    "latch": false,
    "latchlogo": "",
    "actionarray": [
      "0",
      "0",
      "0"
    ],
    "valuearray": [
      "0",
      "0",
      "0"
    ]
  },
kraa965 commented 1 year ago

@andrewfernie I mean, to specifically have 6 buttons in the settings, because there is no need for more

andrewfernie commented 1 year ago

No, sorry. The code is set up such that all pages have the same number of buttons. You can always make the unused one blank as I showed above.

kraa965 commented 1 year ago

@andrewfernie is it possible to make a separate icon setting for a specific window?

andrewfernie commented 1 year ago

Sorry. All pages are the same, and it would be quite a bit of work to allow them to be different.