#include <Servo.h>
nxpcup::Servo::Servo |
( |
Config |
config | ) |
|
|
inline |
Constructor for Servo class.
- Parameters
-
nxpcup::Servo::Servo |
( |
PinName |
pin, |
|
|
uint16_t |
minUs = 1000 , |
|
|
uint16_t |
maxUs = 2000 |
|
) |
| |
|
inline |
Constructor for Servo class.
- Parameters
-
pinName | name of the servo pin |
minUs | minimal pulse wide (default pulse for 0 degree) |
minUs | maximal pulse wide (default pulse for 180 degree) |
uint8_t nxpcup::Servo::angle |
( |
| ) |
const |
|
inline |
Get last set angle - value could be clamped inangle()}
int8_t nxpcup::Servo::centerAngle |
( |
| ) |
const |
|
inline |
Get last center set angle - value could be clamped inangle()}
int nxpcup::Servo::getMaxAngle |
( |
| ) |
const |
|
inline |
Get maximal allowed angle.
Set in constructor or with functionsangleMinMax},angleMinMaxCenter}.
int nxpcup::Servo::getMinAngle |
( |
| ) |
const |
|
inline |
Get minimal allowed angle.
Set in constructor or with functionsangleMinMax},angleMinMaxCenter}.
void nxpcup::Servo::setAngle |
( |
uint8_t |
degree | ) |
|
|
inline |
Set position of the servo in degree.
- Parameters
-
degree | in range (0 <-> 180) |
void nxpcup::Servo::setAngleCenter |
( |
int8_t |
degree, |
|
|
bool |
reverse = false |
|
) |
| |
|
inline |
Set position of the servo in degree around center (middle position).
- Parameters
-
degree | in range (-90 <-> 90) - not checked by this function |
reverse | the range (0 = 0, 90 => -90, -90 => 90) |
void nxpcup::Servo::setAngleCorrection |
( |
int8_t |
angle | ) |
|
|
inline |
Set correction angle for functions working with angle.
- Parameters
-
angle | which will be add to the set angle |
void nxpcup::Servo::setAngleMinMax |
( |
uint8_t |
min, |
|
|
uint8_t |
max |
|
) |
| |
|
inline |
Set minimal and maximal allowed angle.
- Parameters
-
min | suggested range (0 <-> 180) - not checked by this function |
max | suggested range (0 <-> 180) - not checked by this function |
void nxpcup::Servo::setAngleMinMaxCenter |
( |
uint8_t |
diffAngle | ) |
|
|
inline |
Set maximal allowed angle from center (middle).
- Parameters
-
diffAngle | allowed +- range from center suggested range (0 <-> 90) - not checked by this function |
The documentation for this class was generated from the following file: