5 Commits

Author SHA1 Message Date
jonny
c58c6b9b35 Add Mode-Select-Menu (1x long), (settings is 5x now)
General:
    - Rename control mode MENU to MENU_SETTINGS
    - Add new control mode MENU_MODE_SELECT

Button menu:
    - change 'long press' to: 'switch to menu mode-select'
    - move 'open settings menu' to 5x press

Display:
    - display_task: outsource statusScreen to local function
    - display_task: also handle MENU_MODE_SELECT control mode
    - show display startup message for 2600ms instead of 2000ms

Menu:
    - Add functions to handle modeSelect menu to select from a list of allowed modes
    (similar to settings main menu)
2024-05-28 21:20:20 +02:00
jonny_jr9
c9c371a742 Add default-value to Menu, Optimize value-screen, Add Beeping
menu:
    - optimize set-value page: send static content only once
      so only update value -> significant performance boost
    - formatting
    - reset control timeout to prevent unintended exit and bugged display
    - menu item: add option to show a default value (function ptr)
    - add default value to adjust fading
    - add beeping

motorctl:
    - dont write to nvs when value is unchanged
2024-02-20 17:33:54 +01:00
jonny_jr9
2fcf17feda Major Rework all files - Pass pointers to tasks, Remove gloabl variables
- All files:
  Modify almost all files to adjust functions and classes to
  work with pointers to objects passed at task creation
  instead of global variables from config.hpp

- Remove/clear config.hpp to get rid of all global variables

- main.cpp
    - Create pointer to all shared (used in multiple tasks) objects in main

- remove evaluatedSwitch button object,
  since joystick library is used to get switch events

- changes HTTP-mode
    - always init http-server (do not enable/disable at mode change)
    - pass url-handle function to init-htpp function
    - add lambda function to pass method of instance for thatMajor Rework all files - Remove global variables, pass pointers to tasks

- All files:
  Modify almost all files to adjust functions and classes to
  work with pointers to objects passed at task creation
  instead of global variables from config.hpp

- Remove/clear config.hpp to get rid of all global variables

- main.cpp
    - Create pointer to all shared (used in multiple tasks) objects in main

- remove evaluatedSwitch button object,
  since joystick library is used to get switch events

- changes HTTP-mode
    - always init http-server (do not enable/disable at mode change)
    - pass url-handle function to init-htpp function
    - add lambda function to pass method of instance for that

NOTES:  - tested on breakoutboard only
        - known issue that slow encoder events are not recognized
        (especially in menu) - slowing down motorctl helps
2024-02-18 10:00:34 +01:00
jonny_jr9
a35fb7b6aa Add menu 'Debug Joystick'
- Add menu that continously shows/updates all Joystick
  data on display
- Add display pointer to action function
2024-02-15 16:37:54 +01:00
jonny_jr9
fc5aad0c14 Add menu (display + encoder) functional - wip
Added functional menu using display and encoder:
    - a menu item is defined in one struct
    - scroll in a list of defined items
    - select option
    - modify value
    - save value, return to list
Currently only menu is run (button and status display disabled)

- Add menu.cpp/hpp
- Add encoder.cpp/hpp mostly from previous test in board-control
- display.cpp: only run new handleMenu() function
- main.cpp: initialize encoder at startup, disable button task for testing
2024-02-13 19:36:06 +01:00