While testing the new commits on actual hardware noticed
the motors always beeing on at full power.
-> This was due to uninitialized value. It had to fade down from
duty 81236182734612738 which takes forever.
-> This also fixes the old issue where left motor jumped for a
second after startup
Also tested JOYSTICK, HTTP, ADJUST_CHAIR modes and encoder+menu
- 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
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
- 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
since board_single uses mostly the same code as board_control and
board_motorctl several files are outsorced to common folder to prevent
dupliate code and different versions