CQEServo allows control of motor ports 1 through 12. More...
#include <qeservo.h>
Public Member Functions | |
| SINGLETON (CQEServo) | |
| This internal macro handles instantiation of this class. | |
| void | Disable (unsigned int index) |
| Turn off servo/motor. | |
| void | SetCommand (unsigned int index, unsigned short val) |
| Set the command of the given servo/motor. | |
| unsigned short | GetCommand (unsigned int index) |
| Get the command of the given servo/motor. | |
| void | SetTiming (unsigned short min, unsigned short max) |
| Set the timing of the servo/motor controller, namely the minimum and maximum of command. | |
CQEServo allows control of motor ports 1 through 12.
These motor ports have 3 wires instead of just 2. To instantiate this class:
// by pointer CQEServo *pservo = CQEServo::GetPtr(); // or by reference CQEServo &servo = CQEServo::GetRef();
And when done with this class, call Release(), for each call to GetPtr() or GetRef():
| void CQEServo::Disable | ( | unsigned int | index | ) |
Turn off servo/motor.
| index | the motor in question, 0 through 11 corresponding to motor ports 1 through 12. |
| unsigned short CQEServo::GetCommand | ( | unsigned int | index | ) |
Get the command of the given servo/motor.
The command is the position of a servo or the speed of a motor, depending on what is attached to the port, either a servo module or a motor module.
| index | the motor in question, 0 through 11 corresponding to motor ports 1 through 12. |
| void CQEServo::SetCommand | ( | unsigned int | index, | |
| unsigned short | val | |||
| ) |
Set the command of the given servo/motor.
The command is the position of a servo or the speed of a motor, depending on what is attached to the port, either a servo module or a motor module.
| index | the motor in question, 0 through 11 corresponding to motor ports 1 through 12. | |
| val | The value of the command can be between 0 and 250. |
| void CQEServo::SetTiming | ( | unsigned short | min, | |
| unsigned short | max | |||
| ) |
Set the timing of the servo/motor controller, namely the minimum and maximum of command.
This method shouldn't need to be called except in special applications.
| CQEServo::SINGLETON | ( | CQEServo | ) |
This internal macro handles instantiation of this class.
1.7.1