- outsource configuration of display and encoder from source/header file
to config.cpp and pass it to init function or task from main()
- optimize logging in several init functions
- speedsensor:
- fix startup error: initialize ISR only once
- create instances at initialization instead of first method call
- ssd1306 display library:
- modify library to pass offsetX to init function instead of using macro
- outsource task_fans and task_buzzer from main.cpp to their source files
- use task parameters to pass necessary configs and objects
- adjust task priorities (display was too low)
- 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
- complete rework of chairAdjust.cpp/.hpp
created a class cControlledRest which is more readable
and saves a lot of duplicate code
- joystick.cpp: move chair control via joystick to
chairAdjust.cpp (prevents dependency loop)
- button.cpp: fix bug instant idle when changing to ADJUST_CHAIR
Note: briefly tested this state on a breakout board:
Mode change and call of new class methods works.
- 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
Successfull test drive with new driver
- set max duty from 90 to 100
- config adjust fading, calibrate joystick, disable deadtime
- disable 1x button cmd
- 8x sport mode: toggle accel not decel
- make motorctl compatible with different drivers
- pass set function instead of specific motor object
- add lambda function in config.cpp
- update config to use one new sabertooth driver instead of two single100a
- main test controlled motor
New controller will be run with single controller at first...
get single board version from V2.0 and create new folder
(two boards version is kept)
-> copied firmware from e6e586e5855d81ee726bb9a0fbe8ab12def5eeef