|
Typedefs |
| typedef struct _CPhidgetServo * | CPhidgetServoHandle |
Functions |
| int | CPhidgetServo_create (CPhidgetServoHandle *phid) |
| int | CPhidgetServo_getMotorCount (CPhidgetServoHandle phid, int *count) |
| int | CPhidgetServo_getPosition (CPhidgetServoHandle phid, int index, double *position) |
| int | CPhidgetServo_setPosition (CPhidgetServoHandle phid, int index, double position) |
| int | CPhidgetServo_getPositionMax (CPhidgetServoHandle phid, int index, double *max) |
| int | CPhidgetServo_getPositionMin (CPhidgetServoHandle phid, int index, double *min) |
| int | CPhidgetServo_set_OnPositionChange_Handler (CPhidgetServoHandle phid, int(*fptr)(CPhidgetServoHandle phid, void *userPtr, int index, double position), void *userPtr) |
| int | CPhidgetServo_getEngaged (CPhidgetServoHandle phid, int index, int *engagedState) |
| int | CPhidgetServo_setEngaged (CPhidgetServoHandle phid, int index, int engagedState) |
| int | CPhidgetServo_getServoType (CPhidgetServoHandle phid, int index, CPhidget_ServoType *servoType) |
| int | CPhidgetServo_setServoType (CPhidgetServoHandle phid, int index, CPhidget_ServoType servoType) |
| int | CPhidgetServo_setServoParameters (CPhidgetServoHandle phid, int index, double min_us, double max_us, double degrees) |
Detailed Description
Calls specific to the Phidget Servo. See the product manual for more specific API details, supported functionality, units, etc.
Typedef Documentation
Function Documentation
Creates a Phidget Servo handle.
- Parameters:
-
| phid | A pointer to an unallocated Phidget Servo handle. |
Gets the number of motors supported by this controller.
- Parameters:
-
| phid | An attached phidget servo handle. |
| count | The motor count. |
Gets the current position of a motor.
- Parameters:
-
| phid | An attached phidget servo handle. |
| index | The motor index. |
| position | The motor position. |
Sets the current position of a motor.
- Parameters:
-
| phid | An attached phidget servo handle. |
| index | The motor index. |
| position | The motor position. |
Gets the maximum position that a motor can be set to.
- Parameters:
-
| phid | An attached phidget servo handle. |
| index | The motor index. |
| max | The maximum position. |
Gets the minimum position that a motor can be set to.
- Parameters:
-
| phid | An attached phidget servo handle. |
| index | The motor index. |
| min | The minimum position. |
Sets a position change event handler. This is called when the position changes.
- Parameters:
-
| phid | An attached phidget servo handle |
| fptr | Callback function pointer. |
| userPtr | A pointer for use by the user - this value is passed back into the callback function. |
Gets the engaged state of a motor. This is whether the motor is powered or not.
- Parameters:
-
| phid | An attached phidget servo handle |
| index | The motor index. |
| engagedState | The engaged state. Possible values are PTRUE and PFALSE. |
Sets the engaged state of a motor. This is whether the motor is powered or not.
- Parameters:
-
| phid | An attached phidget servo handle |
| index | The motor index. |
| engagedState | The engaged state. Possible values are PTRUE and PFALSE. |
Gets the servo type of a motor.
- Parameters:
-
| phid | An attached phidget advanced servo handle |
| index | The motor index. |
| servoType | The servo type. |
Sets the servo type of a motor.
- Parameters:
-
| phid | An attached phidget advanced servo handle |
| index | The motor index. |
| servoType | The servo type. |
| int CPhidgetServo_setServoParameters |
( |
CPhidgetServoHandle |
phid, |
|
|
int |
index, |
|
|
double |
min_us, |
|
|
double |
max_us, |
|
|
double |
degrees | |
|
) |
| | |
Sets the servo parameters of a motor.
- Parameters:
-
| phid | An attached phidget advanced servo handle |
| index | The motor index. |
| min_us | The minimum supported PCM in microseconds. |
| max_us | The maximum supported PCM in microseconds. |
| degrees | The degrees of rotation defined by the given PCM range. |