- Create class automatedArmchair in new files auto.hpp and auto.cpp This class currently makes it possible to queue up and run commands (motorstate, duty for certaion duration), - add new file to cmakelists - create automatedArmchair instance 'armchair' in config.cpp - add loglevel configuration to main.cpp - add AUTO mode to control.cpp (no way to change to mode yet)
41 lines
931 B
C++
41 lines
931 B
C++
#pragma once
|
|
|
|
#include "motordrivers.hpp"
|
|
#include "motorctl.hpp"
|
|
#include "joystick.hpp"
|
|
|
|
#include "gpio_evaluateSwitch.hpp"
|
|
#include "buzzer.hpp"
|
|
#include "control.hpp"
|
|
#include "fan.hpp"
|
|
#include "http.hpp"
|
|
#include "auto.hpp"
|
|
|
|
|
|
//create global controlledMotor instances for both motors
|
|
extern controlledMotor motorLeft;
|
|
extern controlledMotor motorRight;
|
|
|
|
//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;
|
|
|
|
//configuration for fans
|
|
extern fan_config_t configFanLeft;
|
|
extern fan_config_t configFanRight;
|
|
|