Struct SYN_MotorOutput¶
Abstract motor output interface (vtable). More...
#include <syn_motor_output.h>
Public Attributes¶
| Type | Name |
|---|---|
| void(* | brake Active brake — short motor windings or active stop. |
| void(* | coast Coast — free-spin, both outputs off. |
| void * | ctx User context passed to all callbacks. |
| void(* | set_output Drive the motor at the given signed output level. |
Detailed Description¶
The motor controller calls these functions to drive the motor without knowing the underlying hardware. This allows any motor driver to be used with syn_motor_ctrl, syn_autotune, etc.
Public Attributes Documentation¶
variable brake¶
Active brake — short motor windings or active stop.
Motor decelerates as quickly as possible. Called during emergency stop (e-stop).
Parameters:
ctxUser context.
variable coast¶
Coast — free-spin, both outputs off.
Motor decelerates due to friction only. Called when the controller enters idle or stops normally.
Parameters:
ctxUser context.
variable ctx¶
User context passed to all callbacks.
variable set_output¶
Drive the motor at the given signed output level.
The output range matches the controller's [output_min, output_max]. Positive = forward, negative = reverse, 0 = stop. The implementation must map this to the appropriate hardware command (PWM duty, step rate, etc.).
Parameters:
ctxUser context (motor instance pointer).outputSigned output level.
The documentation for this class was generated from the following file src/syntropic/motor/syn_motor_output.h