#include <servo.h>
Inheritance diagram for Servo:

Public Member Functions | |
| Servo (int sscServoNumber, float startAngle, float minAngle, float sscValue_4_minAngle, float maxAngle, float sscValue_4_maxAngle) | |
| Short Description. | |
| float | setAngle (float degree) |
| Short Description. | |
| float | getAngle (void) |
Protected Attributes | |
| float | angle |
| float | max_angle |
| float | min_angle |
| float | A |
| float | B |
Does a fine translation from an angle input to a SSC output value. It also makes aure any angle setting stays within a certain renge.
Usage: The class needs to know the minimum/maximum allowable angle inputs, and the servo values that coorespond to them.
Example: Say we have a servo that we want to be able to move between the angles of 90 and 180 degrees. First we figure out what SSC value will move the servo to 90 degrees. Assume for the example it is 200. Then minAngle = 90 and sscValue_4_minAngle = 200 Next we figure out what SSC value for the max angle, assume it is 100. Then maxAngle = 180 and sscValue_4_maxAngle = 100
Note: Even though the example uses degrees, radians could be used. The only real requirement is that the minAngle must be less than the maxAngle because the code will make sure that any angle setting that is made will not be smaller than the minAngle or larger than the maxAngle.Long Description if necessary.
| <parameter_name> | <parameter_descreption> |
Definition at line 74 of file servo.h.
|
||||||||||||||||||||||||||||
|
Short Description. Long Description if necessary.
Definition at line 15 of file servo.cpp. References A, B, max_angle, min_angle, and setAngle(). |
|
|
Definition at line 84 of file servo.h. References angle. Referenced by fhwInterface::getAngle(), and hwInterface::getAngle(). |
|
|
Short Description. Long Description if necessary.
Definition at line 42 of file servo.cpp. References A, angle, B, max_angle, min_angle, and SSC::setValue(). Referenced by main(), Servo(), fhwInterface::setAngle(), and hwInterface::setAngle(). |
|
|
Definition at line 77 of file servo.h. Referenced by Servo(), and setAngle(). |
|
|
Definition at line 76 of file servo.h. Referenced by getAngle(), and setAngle(). |
|
|
Definition at line 77 of file servo.h. Referenced by Servo(), and setAngle(). |
|
|
Definition at line 76 of file servo.h. Referenced by Servo(), and setAngle(). |
|
|
Definition at line 76 of file servo.h. Referenced by Servo(), and setAngle(). |
1.4.4