|
Files | |
file | FLAC-driver.h |
Firgelli Linear Actuator driver. | |
Defines | |
#define | STALL_TIME_SLOW 1200 |
#define | STALL_TIME_FAST 800 |
Functions | |
task | _FLACcontrolTaskA () |
task | _FLACcontrolTaskB () |
task | _FLACcontrolTaskC () |
void | _FLACcontrolTasks (tMotor _motor, int _highPower, long _encTarget) |
bool | isDone (tMotor _motor) |
void | FLACextendLA (tMotor _motor, int _highPower) |
void | FLACextendLA (tMotor _motor, int _highPower, int distance) |
void | FLACtretractLA (tMotor _motor, int _highPower) |
void | FLACtretractLA (tMotor _motor, int _highPower, int distance) |
void | FLACmoveLA (tMotor _motor, int highpower, int pos) |
bool | isStalled (tMotor _motor) |
Variables | |
long | _encoderTarget [3] = {0, 0, 0} |
long | _motorHighPower [3] = {0, 0, 0} |
bool | _stalled [3] = {false, false, false} |
Firgelli Linear Actuator driver
#define STALL_TIME_FAST 800 |
Counter to check if motor is stalled when motor speeds are >= 50
Definition at line 39 of file FLAC-driver.h.
#define STALL_TIME_SLOW 1200 |
Counter to check if motor is stalled when motor speeds are < 50
Definition at line 38 of file FLAC-driver.h.
task _FLACcontrolTaskA | ( | ) |
Definition at line 63 of file FLAC-driver.h.
task _FLACcontrolTaskB | ( | ) |
Definition at line 119 of file FLAC-driver.h.
task _FLACcontrolTaskC | ( | ) |
Definition at line 175 of file FLAC-driver.h.
void _FLACcontrolTasks | ( | tMotor | _motor, |
int | _highPower, | ||
long | _encTarget | ||
) |
Stop and start the motor control tasks and set their parameters.
Note: this is an internal function and should not be called directly.
_motor | the motor to be controlled |
_highPower | the highest speed the motor should turn at |
_encTarget | the target the motor should move to |
Definition at line 238 of file FLAC-driver.h.
void FLACextendLA | ( | tMotor | _motor, |
int | _highPower | ||
) |
Extend the Linear Actuator fully until stalled.
_motor | the motor to be controlled |
_highPower | the highest speed the motor should turn at |
Definition at line 315 of file FLAC-driver.h.
void FLACextendLA | ( | tMotor | _motor, |
int | _highPower, | ||
int | distance | ||
) |
Extend the Linear Actuator.
_motor | the motor to be controlled |
_highPower | the highest speed the motor should turn at |
distance | the number of encoder ticks (0.5mm) the actuator should move |
Definition at line 327 of file FLAC-driver.h.
void FLACmoveLA | ( | tMotor | _motor, |
int | highpower, | ||
int | pos | ||
) |
Move the Linear Actuator to an absolute position
_motor | the motor to be controlled |
highpower | the highest speed the motor should turn at |
pos | the exact encoder count to move to |
Definition at line 363 of file FLAC-driver.h.
void FLACtretractLA | ( | tMotor | _motor, |
int | _highPower, | ||
int | distance | ||
) |
Retract the Linear Actuator.
_motor | the motor to be controlled |
_highPower | the highest speed the motor should turn at |
distance | the number of encoder ticks (0.5mm) the actuator should move |
Definition at line 351 of file FLAC-driver.h.
void FLACtretractLA | ( | tMotor | _motor, |
int | _highPower | ||
) |
Retract the Linear Actuator fully until stalled. It is wise to reset the encoder count for that motor afterwards.
_motor | the motor to be controlled |
_highPower | the highest speed the motor should turn at |
Definition at line 339 of file FLAC-driver.h.
bool isDone | ( | tMotor | _motor ) |
Check if the motor is done with the current operation
_motor | the motor to be checked |
Definition at line 290 of file FLAC-driver.h.
bool isStalled | ( | tMotor | _motor ) |
Check if the motor stalled on the last operation
_motor | the motor to be checked |
Definition at line 305 of file FLAC-driver.h.
long _encoderTarget[3] = {0, 0, 0} |
Motor encoder targets - INTERNAL
Definition at line 41 of file FLAC-driver.h.
long _motorHighPower[3] = {0, 0, 0} |
High Power - top speed of the motor - INTERNAL
Definition at line 42 of file FLAC-driver.h.
bool _stalled[3] = {false, false, false} |
Are we stalling? - INTERNAL
Definition at line 43 of file FLAC-driver.h.