jonny_jr9 1e544613ee send, receive, apply motorCommands works (proof of concept); add timeout
- board_control successfully sends motor commands to board_motorctl
- board_motorctl receives and applies motor commands
note: control pcb currently switches to HTTP mode after startup for testing
with data from ui

- partially commented in code that has to be reworked
- control: send commands via uart instead of to motor objects
- board motorctl handled motor: add timeout when no target data
  received (e.g. control pcb offline / uart bugged)
- board motorctl uart: receive motorCommands_t struct and apply data to
  target state of handled motors
- types: fix issue with global motorstateStr variable
2023-08-30 09:01:44 +02:00

36 lines
892 B
C++

#pragma once
#include "joystick.hpp"
#include "gpio_evaluateSwitch.hpp"
#include "buzzer.hpp"
#include "control.hpp"
#include "http.hpp"
#include "auto.hpp"
//in IDLE mode: set loglevel for evaluatedJoystick to DEBUG
//and repeatedly read joystick e.g. for manually calibrating / testing joystick
//#define JOYSTICK_LOG_IN_IDLE
//TODO outsource global variables to e.g. global.cpp and only config options here?
//create global joystic instance
extern evaluatedJoystick joystick;
//create global evaluated switch instance for button next to joystick
extern gpio_evaluatedSwitch buttonJoystick;
//create global buzzer object
extern buzzer_t buzzer;
//create global control object
extern controlledArmchair control;
//create global automatedArmchair object (for auto-mode)
extern automatedArmchair armchair;
//create global httpJoystick object
extern httpJoystick httpJoystickMain;