Struct SYN_MotorCtrl¶
Motor controller instance (opaque — use API to access).
#include <syn_motor_ctrl.h>
Public Attributes¶
| Type | Name |
|---|---|
| SYN_MotorCtrl_Config | cfg |
| SYN_DataLog * | datalog |
| bool | enabled True when the controller is enabled and driving output. |
| int32_t | ff_output |
| int32_t | last_position |
| uint32_t | last_update_tick Tick of last update() call. |
| int32_t | measured_position |
| int32_t | measured_velocity |
| SYN_MotorCtrl_Metrics | metrics Move metrics — accumulated during each move, zero buffer cost. |
| SYN_MotorCtrl_Mode | mode |
| SYN_MotorCtrl_StallCallback | on_stall Registered stall callback (NULL = none). |
| void * | on_stall_ctx User context passed to stall callback. |
| SYN_MotorCtrl_TargetCallback | on_target Registered on-target callback (NULL = none). |
| void * | on_target_ctx User context passed to on-target callback. |
| SYN_PID | pid |
| int32_t | pid_output |
| SYN_Ramp | profile Built-in ramp for move_to() (not used when set_trajectory is active). |
| bool | profile_active True when the built-in ramp profile is actively driving. |
| bool | scurve_active True when the built-in S-curve profile is actively driving. |
| SYN_SCurve | scurve_profile Built-in S-curve for move_to_scurve(). |
| bool | stall_active True while output is nonzero but position isn't changing. |
| uint32_t | stall_start_tick Tick when stall condition was first detected. |
| SYN_MotorCtrl_State | state |
| int32_t | target_position |
| int32_t | target_velocity |
| int32_t | total_output |
| SYN_MotorCtrl_Trajectory | trajectory |
| bool | trajectory_active |
Public Attributes Documentation¶
variable cfg¶
Configuration snapshot
variable datalog¶
Attached datalog for telemetry
variable enabled¶
True when the controller is enabled and driving output.
variable ff_output¶
Last feedforward output
variable last_position¶
Position at last update
variable last_update_tick¶
Tick of last update() call.
variable measured_position¶
Current position
variable measured_velocity¶
Current velocity
variable metrics¶
Move metrics — accumulated during each move, zero buffer cost.
variable mode¶
Current operating mode
variable on_stall¶
Registered stall callback (NULL = none).
variable on_stall_ctx¶
User context passed to stall callback.
variable on_target¶
Registered on-target callback (NULL = none).
variable on_target_ctx¶
User context passed to on-target callback.
variable pid¶
Embedded PID controller
variable pid_output¶
Last PID output
variable profile¶
Built-in ramp for move_to() (not used when set_trajectory is active).
variable profile_active¶
True when the built-in ramp profile is actively driving.
variable scurve_active¶
True when the built-in S-curve profile is actively driving.
variable scurve_profile¶
Built-in S-curve for move_to_scurve().
variable stall_active¶
True while output is nonzero but position isn't changing.
variable stall_start_tick¶
Tick when stall condition was first detected.
variable state¶
Current runtime state
variable target_position¶
Target position value
variable target_velocity¶
Units per second
variable total_output¶
Last combined output
variable trajectory¶
Current trajectory point
variable trajectory_active¶
True when using set_trajectory
The documentation for this class was generated from the following file src/syntropic/motor/syn_motor_ctrl.h