Armchair functions as before (all tasks enabled).
Note: probably wrong encoder pin set in encoder.hpp
Old button menu works as usual (opimized code).
You can switch to new MENU state with 1x long press
and exit the menu with 1x long press
button.cpp: - use encoder queue instead of evaluated switch
- simplify code, rework actions
control.cpp: Add MENU state/mode
-> control task: turns motors off and idles
-> button task idles (button menu disabled)
-> display task switches state to handle menu
control.cpp: Optimize structure:
Add methods to freeze stick and toggle stick mapping
display.cpp: show status screen or handle menu depending on mode, simpilfy task
main.cpp: re-enable button task, disable buzzer logging
menu.cpp: Change events, Add menu exit condition
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
Currently testing with breakoutboard and larger
1.3'' display (OFFSETX needed)
- display.cpp:
- change structure (outsource in page functions)
- add git and compile info to startup screen
- add armchair mode and motor current to status screen
- control.hpp: Add methods to get current armchair control mode (string)
- motorctl.hpp: Add method to get motor current
- move speedsensor files from motorctl pcb to common
- single pcb create and configure global speedsensor objects
- display: create fast slow veryslow loop
- clear display every 30s
- show speed in rpm and km/h
NOTE: speedsensor needs fix, direction unreliable
slightly rework hacked display test
- new code structure
- split code in several functions
- add task for display instead of running it in main()
- functions to convert voltage to battery percent charged
- show percentage and voltage on display