Robotsystem from Robot Group Leipzig: UniversalServo Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# UniversalServo Class Reference

`#include <universalservo.h>`

Collaboration diagram for UniversalServo:

[legend]
List of all members.

## Detailed Description

PID Servo motor for universal joints.

Definition at line 42 of file universalservo.h.

## Public Member Functions
| UniversalServo (UniversalJoint *joint, double min1, double max1, double power1, double min2, double max2, double power2)
| min and max values are understood as travel bounds.
void | set (double position1, double position2)
| sets the set point of the servo.
double | get1 ()
| returns the position of the hinge in ranges [-1, 1] (scaled by min, max)
double | get2 ()
| returns the position of the hinge in ranges [-1, 1] (scaled by min, max)
void | get (double &p1, double &p2)
| returns the position of the hinge in ranges [-1, 1] (scaled by min, max)
void | setPower (double power1, double power2)

## Constructor & Destructor Documentation

UniversalServo | ( | UniversalJoint * | joint,
|  | double | min1,
|  | double | max1,
|  | double | power1,
|  | double | min2,
|  | double | max2,
|  | double | power2
| ) |

| min and max values are understood as travel bounds. power is the power of the servo Definition at line 43 of file universalservo.cpp.

## Member Function Documentation

void get | ( | double & | p1,
|  | double & | p2
| ) |

| returns the position of the hinge in ranges [-1, 1] (scaled by min, max) Definition at line 94 of file universalservo.cpp.

double get1 | ( |  | ) |

| returns the position of the hinge in ranges [-1, 1] (scaled by min, max) Definition at line 74 of file universalservo.cpp.

double get2 | ( |  | ) |

| returns the position of the hinge in ranges [-1, 1] (scaled by min, max) Definition at line 84 of file universalservo.cpp.

void set | ( | double | position1,
|  | double | position2
| ) |

| sets the set point of the servo. Position must be between -1 and 1. It is scaled to fit into min, max Definition at line 55 of file universalservo.cpp.

void setPower | ( | double | power1,
|  | double | power2
| ) |

| Definition at line 100 of file universalservo.cpp.