Add control.hpp and control.cpp - task that repeatedly generates motor commands depending on the current mode - function to change to a specified control mode Add button.hpp and button.cpp - class which runs commands depending on the count a button was pressed Update main.cpp - create button task - create control task - comment out previous testing code - remove unnecessary includes (already included in config.hpp) Add control.cpp and button.cpp to CMakeLists Notes: Tested this state on the armchair: All currently implemented features work. You can switch between IDLE and JOYSTICK by pressing the button 2 or 3 times. Also driving works well (limited to 60% duty, with no fans yet).
3 lines
179 B
CMake
3 lines
179 B
CMake
idf_component_register(SRCS "main.cpp" "motordrivers.cpp" "motorctl.cpp" "config.cpp" "joystick.cpp" "buzzer.cpp" "control.cpp" "button.cpp"
|
|
INCLUDE_DIRS ".")
|