Void Sentry
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
control_status.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "aim_map.h"
11#include <cstdint>
12
19 uint8_t cal_points = 0;
20 aiming::CalState cal_state = aiming::CalState::Idle;
21 bool calibrated = false;
23 const char* cal_failure = nullptr;
24 uint32_t aims = 0;
25 uint32_t cal_saves = 0;
26 uint32_t cal_miss = 0;
27 bool stick = false;
28 int16_t aim_x = 0;
29 int16_t aim_y = 0;
30 uint8_t lim = 0;
31 int16_t rx0 = 0;
32 int16_t ry0 = 0;
33 int16_t rx1 = 0;
34 int16_t ry1 = 0;
35 uint32_t home_ms = 0;
36 bool returning = false;
37 uint8_t speed = 1;
38};
39
46{
47public:
48 virtual ~BaseStatusProvider() = default;
49
51 virtual ControlStatus control_status() const = 0;
52};
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