20 aiming::CalState
cal_state = aiming::CalState::Idle;
Maps a target's image position to turret angles (pure C++20, natively tested).
Two-point joystick calibration as a state machine (pure C++20, natively tested).
Interface for anything that can report a ControlStatus (the Controller). Lets the network layer read ...
Definition control_status.h:46
virtual ControlStatus control_status() const =0
Returns the latest published status. Safe to call from any task.
Snapshot of the controller, published once per control pass.
Definition control_status.h:17
bool stick
The physical joystick is deflected and overriding the HUD jog.
Definition control_status.h:27
uint32_t cal_saves
Successful calibrations since boot (a counter, so a polling HUD never misses one).
Definition control_status.h:25
uint32_t home_ms
Milliseconds until the AI return-home fires; 0 when none is pending or not in Ai mode.
Definition control_status.h:35
aiming::CalState cal_state
Calibration state machine state.
Definition control_status.h:20
uint8_t speed
HUD jog speed setting: 0 slow, 1 normal, 2 fast.
Definition control_status.h:37
bool calibrated
true once a saved or fresh calibration is active.
Definition control_status.h:21
uint8_t lim
Soft-limit bits from aiming::limit_bits(): 1 pan min, 2 pan max, 4 tilt min, 8 tilt max.
Definition control_status.h:30
uint8_t cal_points
Calibration points recorded so far (0-2).
Definition control_status.h:19
aiming::Angles angles
Current turret pose in degrees.
Definition control_status.h:22
bool returning
The turret is travelling home after a Home command (more than 1 degree from home).
Definition control_status.h:36
const char * cal_failure
Static failure text, or null.
Definition control_status.h:23
ControlMode mode
Current operating mode.
Definition control_status.h:18
uint32_t aims
Aim commands sent to the turret since boot.
Definition control_status.h:24
int16_t rx0
Reachable box in pixels (aiming::reach_box()): the region whose aim is inside the limits.
Definition control_status.h:31
uint32_t cal_miss
Calibration records ignored because no target was visible (button or HUD).
Definition control_status.h:26
int16_t aim_x
Aim pixel: AimMap inverse of the current pose, rounded, not clamped (may be off-frame).
Definition control_status.h:28
Turret pose: pan degrees from home (positive = right), tilt servo degrees (larger = up).
Definition aim_map.h:30
Operating modes of the turret system.
ControlMode
Who drives the turret right now.
Definition system_control_types.h:14