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
MovementManager Class Reference

Manages physical actuators for turret positioning. More...

#include <movement_manager.h>

Inheritance diagram for MovementManager:
BaseMovementManager

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.
 

Detailed Description

Manages physical actuators for turret positioning.

Constructor & Destructor Documentation

◆ MovementManager()

MovementManager::MovementManager ( Stepper & stepper,
Servo & servo )
inline

Construct a new Movement Manager object.

Parameters
stepperReference to the initialized Stepper motor object.
servoReference to the initialized Servo motor object.

Member Function Documentation

◆ move_relative()

void MovementManager::move_relative ( const std::tuple< MoveX, MoveY > move_directions)
virtual

Implements relative movement using Stepper and Servo hardware.

Translates MoveX and MoveY into actuator actions.

Parameters
xDirectional command for the stepper motor.
yDirectional command for the servo motor.

Implements BaseMovementManager.

◆ move_servo()

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.

Parameters
pitch_directionThe direction to tilt (Up, Down, or None).

◆ move_stepper()

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.

Parameters
yaw_directionThe direction to rotate (Left, Right, or None).

The documentation for this class was generated from the following files: