armchair_fw/main/CMakeLists.txt
jonny_ji7 3cb5bc410b Create http server, Add HTTP mode
- Create http.cpp and http.hpp
  - functions for initializing a http server
  - function for URL api/joystick
    - receive joystick data from http post request
    - parse json, define joystick position (function from joystick.hpp)
    - send data to control task via queue

- control.hpp/cpp:
  - add HTTP mode to handle loop
    - receive joystick commands from queue, generate commands, send to
      motorctl
  - upgrade changeMode function with ability to run functions at switch
    FROM and TO certain modes
    - add code to start/stop wifi and webserver when switching to/from
      HTTP mode
  - change toggleModes and toggleIdle to use the changeMode function

- main.cpp:
  - add several sections with code for testing new functions (commented
    out)
  - add http loglevel

- buzzer.cpp:
  - add command (press 4 times) to toggle between HTTP and JOYSTICK mode

FIXME: moved initialization of wifi to main.cpp at startup because of an
error -> resolve this and place wifi start and stop functions into
mode-change as intended

currently works best in accesspoint mode with laptop connected using the
react-webapp
2022-06-17 18:24:11 +02:00

3 lines
209 B
CMake

idf_component_register(SRCS "main.cpp" "motordrivers.cpp" "motorctl.cpp" "config.cpp" "joystick.cpp" "buzzer.cpp" "control.cpp" "button.cpp" "fan.cpp" "wifi.c" "http.cpp"
INCLUDE_DIRS ".")