|
Files | |
file | firgelli-linearact.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 | FLACstopLA (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) |
void | FLACsetInverse (tMotor _motor) |
bool | isStalled (tMotor _motor) |
void | FLACretractLA (tMotor _motor, int _highPower) |
void | FLACsetInverse (tMotor _motor, bool invert) |
Variables | |
long | _encoderTarget [3] = {0, 0, 0} |
long | _motorHighPower [3] = {0, 0, 0} |
bool | _stalled [3] = {false, false, false} |
bool | _inverted [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 40 of file firgelli-linearact.h.
#define STALL_TIME_SLOW 1200 |
Counter to check if motor is stalled when motor speeds are < 50
Definition at line 39 of file firgelli-linearact.h.
task _FLACcontrolTaskA | ( | ) |
Definition at line 67 of file firgelli-linearact.h.
task _FLACcontrolTaskB | ( | ) |
Definition at line 123 of file firgelli-linearact.h.
task _FLACcontrolTaskC | ( | ) |
Definition at line 179 of file firgelli-linearact.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 242 of file firgelli-linearact.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 346 of file firgelli-linearact.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 333 of file firgelli-linearact.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 385 of file firgelli-linearact.h.
void FLACretractLA | ( | 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 359 of file firgelli-linearact.h.
void FLACsetInverse | ( | tMotor | _motor, |
bool | invert | ||
) |
Invert the LA's movement
_motor | the motor to be inverted |
invert | whether or not to invert the motor |
Definition at line 395 of file firgelli-linearact.h.
void FLACsetInverse | ( | tMotor | _motor ) |
void FLACstopLA | ( | tMotor | _motor ) |
Stop the current operation
_motor | the motor to be stopped |
Definition at line 293 of file firgelli-linearact.h.
void FLACtretractLA | ( | tMotor | _motor, |
int | _highPower | ||
) |
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 372 of file firgelli-linearact.h.
bool isDone | ( | tMotor | _motor ) |
Check if the motor is done with the current operation
_motor | the motor to be checked |
Definition at line 308 of file firgelli-linearact.h.
bool isStalled | ( | tMotor | _motor ) |
Check if the motor stalled on the last operation
_motor | the motor to be checked |
Definition at line 323 of file firgelli-linearact.h.
long _encoderTarget[3] = {0, 0, 0} |
Motor encoder targets - INTERNAL
Definition at line 42 of file firgelli-linearact.h.
bool _inverted[3] = {false, false, false} |
Are we reversing the motors? - INTERNAL
Definition at line 45 of file firgelli-linearact.h.
long _motorHighPower[3] = {0, 0, 0} |
High Power - top speed of the motor - INTERNAL
Definition at line 43 of file firgelli-linearact.h.
bool _stalled[3] = {false, false, false} |
Are we stalling? - INTERNAL
Definition at line 44 of file firgelli-linearact.h.