Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
movement_manager.h
Go to the documentation of this file.
1
5#pragma once
6
8#include <ESP32Servo.h>
9#include <Stepper.h>
10
11const int SERVO_MIN_ANGLE = 0;
12const int SERVO_MAX_ANGLE = 180;
13
19{
20private:
22 Stepper& _stepper;
23
25 Servo& _servo;
26
27 static constexpr int _SERVO_INCREMENT = 5;
28 static constexpr int _STEP_INCREMENT = 5;
29 static constexpr int _STEPPER_SPEED = 10;
30
31public:
37 MovementManager(Stepper& stepper, Servo& servo) : _stepper(stepper), _servo(servo)
38 {
39 this->_stepper.setSpeed(this->_STEPPER_SPEED);
40 }
41
49 virtual void move_relative(const std::tuple<MoveX, MoveY> move_directions);
50
58 void move_stepper(const MoveX yaw_direction);
59
67 void move_servo(const MoveY pitch_direction);
68};
Header file for the BaseMovementManager interface.
Abstract base class for turret movement hardware abstraction.
Definition base_movement_manager.h:18
Encapsulates horizontal movement states and utility methods.
Definition move_types.h:73
Encapsulates vertical movement states and utility methods.
Definition move_types.h:111
Manages physical actuators for turret positioning.
Definition movement_manager.h:19
MovementManager(Stepper &stepper, Servo &servo)
Construct a new Movement Manager object.
Definition movement_manager.h:37
void move_stepper(const MoveX yaw_direction)
Executes horizontal rotation (Yaw) using the stepper motor.
Definition movement_manager.cpp:14
virtual void move_relative(const std::tuple< MoveX, MoveY > move_directions)
Implements relative movement using Stepper and Servo hardware.
Definition movement_manager.cpp:3
void move_servo(const MoveY pitch_direction)
Executes vertical tilting (Pitch) using the servo motor.
Definition movement_manager.cpp:28