15#ifndef ENGINECONTROLLER_HPP
16#define ENGINECONTROLLER_HPP
Definition of the IPeripheralController interface.
Definition of the enums used in the application.
CarDirection
Enum class for the car direction.
const int SERVO_RIGHT_PWM
EngineController()
Default constructor for the EngineController class.
void stop()
Stops the engine.
void setDirection(CarDirection newDirection)
Sets the direction of the car and emits the directionUpdated signal if the direction has changed.
IPeripheralController * pcontrol
std::atomic< int > m_current_speed
std::atomic< bool > m_running
std::atomic< int > m_current_angle
void steeringUpdated(int newAngle)
CarDirection m_currentDirection
const int STEERING_CHANNEL
const int SERVO_CENTER_PWM
void set_speed(int speed)
Sets the speed of the car.
void start()
Starts the engine.
~EngineController()
Destructor for the EngineController class.
void set_steering(int angle)
Sets the steering angle of the car.
void directionUpdated(CarDirection newDirection)
Interface for the peripheral controller.