|
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.
|
Manages physical actuators for turret positioning. More...
#include <movement_manager.h>
Public Member Functions | |
| MovementManager (Stepper &stepper, Servo &servo) | |
| Construct a new Movement Manager object. | |
| virtual void | move_relative (const std::tuple< MoveX, MoveY > move_directions) |
| Implements relative movement using Stepper and Servo hardware. | |
| void | move_stepper (const MoveX yaw_direction) |
| Executes horizontal rotation (Yaw) using the stepper motor. | |
| void | move_servo (const MoveY pitch_direction) |
| Executes vertical tilting (Pitch) using the servo motor. | |
Public Member Functions inherited from BaseMovementManager | |
| virtual | ~BaseMovementManager ()=default |
| Virtual destructor for safe polymorphic cleanup. | |
Manages physical actuators for turret positioning.
|
inline |
Construct a new Movement Manager object.
| stepper | Reference to the initialized Stepper motor object. |
| servo | Reference to the initialized Servo motor object. |
Implements relative movement using Stepper and Servo hardware.
Translates MoveX and MoveY into actuator actions.
| x | Directional command for the stepper motor. |
| y | Directional command for the servo motor. |
Implements BaseMovementManager.
| void MovementManager::move_servo | ( | const MoveY | pitch_direction | ) |
Executes vertical tilting (Pitch) using the servo motor.
Reads current servo position and adjusts it by _SERVO_INCREMENT. The final position is constrained between SERVO_MIN_ANGLE and SERVO_MAX_ANGLE to prevent mechanical stall or gear damage.
| pitch_direction | The direction to tilt (Up, Down, or None). |
| void MovementManager::move_stepper | ( | const MoveX | yaw_direction | ) |
Executes horizontal rotation (Yaw) using the stepper motor.
Checks the MoveX enum; if Left or Right, the stepper moves by the predefined _STEP_INCREMENT. Negative steps rotate in one direction, positive in the other.
| yaw_direction | The direction to rotate (Left, Right, or None). |