#include <ObstacleDetectorWithServo.h>
Enumerator |
---|
no |
|
onRightSide |
|
onLeftSide |
|
nxpcup::ObstacleDetectorWithServo::ObstacleDetectorWithServo |
( |
Config |
config | ) |
|
|
inline |
Get actual state of obstacle avoiding.
- Returns
- AvoidingObstacle}
int nxpcup::ObstacleDetectorWithServo::avoidingObstacleInteger |
( |
| ) |
const |
|
inline |
Get actual state of obstacle in integer value.
- Returns
- transformedAvoidingObstacle}: -1 = left, 1 = right, 0 = nothing
Config nxpcup::ObstacleDetectorWithServo::config |
( |
| ) |
const |
|
inline |
Get the actual configuration of theObstacleDetectorWithServo}.
int nxpcup::ObstacleDetectorWithServo::distanceThatTriggered |
( |
| ) |
const |
|
inline |
Get the distance that trigger the detector.
- Returns
- value without unit
int nxpcup::ObstacleDetectorWithServo::error |
( |
float |
encoderDistance, |
|
|
int |
borderDetectorError, |
|
|
int |
leftBorder, |
|
|
int |
rightBorder |
|
) |
| |
|
inline |
Check the error on sensors and modify the trajectory if find obstacle.
- Parameters
-
encoderDistance | distance from one encoder |
borderDetectorError | error from border detector |
leftBorder | positon of left border from border detector |
rightBorder | positon of right border from border detector |
void nxpcup::ObstacleDetectorWithServo::reset |
( |
| ) |
|
|
inline |
Reset this detector to initial state.
int nxpcup::ObstacleDetectorWithServo::sensorValue |
( |
| ) |
const |
|
inline |
Get current value from sensor (withnout unit).
int nxpcup::ObstacleDetectorWithServo::servoAngle |
( |
int |
index | ) |
|
|
inline |
Get the angle of servo for given index.
- Parameters
-
index | of the position (the range is define byConfig::IMAGE_SIZE}) |
- Returns
- angle for the index
int nxpcup::ObstacleDetectorWithServo::servoPositionDegree |
( |
| ) |
const |
|
inline |
Get current servo position in degree.
void nxpcup::ObstacleDetectorWithServo::setConfig |
( |
Config & |
config | ) |
|
|
inline |
Set new configuration forObstacleDetectorWithServo}.
- Parameters
-
The documentation for this class was generated from the following file: