Public Member Functions

CQEServo Class Reference

CQEServo allows control of motor ports 1 through 12. More...

#include <qeservo.h>

List of all members.

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.

Detailed Description

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():

 CQEServo::Release();

Member Function Documentation

void CQEServo::Disable ( unsigned int  index  ) 

Turn off servo/motor.

Parameters:
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.

Parameters:
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.

Parameters:
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.


The documentation for this class was generated from the following files: