#include <Motion.h>
|
void | begin (void) |
| Initialize the movement component.
|
|
|
static void | move (uint32_t moveForMs=0, uint baseValue=DEFAULT_BASE_VALUE) |
| Move forward for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop(). The function applys a basic algorithm to improve the straigthness of the movement. Lifting the robot from the desk may corrupt the results and is not recommended.
|
|
static void | rotateClockwise (uint32_t rotateForMs=0, uint baseValue=DEFAULT_BASE_VALUE) |
| Rotate clockwise for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop().
|
|
static void | rotateAntiClockwise (uint32_t rotateForMs=0, uint baseValue=DEFAULT_BASE_VALUE) |
| Rotate anticlockwise for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop().
|
|
static void | stop (void) |
| stops any current movement, no matter if timebased or endless
|
|
static void | moveWithoutCorrection (uint32_t moveForMs=0, uint baseValue=DEFAULT_BASE_VALUE) |
| Does the same as the move function, but this function does not apply any kind of algorithm to improve the result.
|
|
Definition at line 59 of file Motion.h.
◆ begin()
void Motion::begin |
( |
void | | ) |
|
Initialize the movement component.
Definition at line 18 of file Motion.cpp.
◆ leftMotorTask()
void Motion::leftMotorTask |
( |
void * | args | ) |
|
|
staticprotected |
◆ move()
Move forward for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop(). The function applys a basic algorithm to improve the straigthness of the movement. Lifting the robot from the desk may corrupt the results and is not recommended.
- Parameters
-
moveForMs | Representing the duration of forward moving in milliseconds. |
baseValue | The value that is used to start with the calibrated movement. Defaults to 3900. If the Dezibot is not moving forward at all increasing the value may help. If the robot is just jumping up and down but not forward, try a lower value. |
Definition at line 87 of file Motion.cpp.
◆ moveTask()
void Motion::moveTask |
( |
void * | args | ) |
|
|
staticprotected |
◆ moveWithoutCorrection()
static void Motion::moveWithoutCorrection |
( |
uint32_t | moveForMs = 0, |
|
|
uint | baseValue = DEFAULT_BASE_VALUE ) |
|
static |
Does the same as the move function, but this function does not apply any kind of algorithm to improve the result.
- Parameters
-
moveForMs | how many ms should the robot move, or 0 to let the robot move until another move command is mentioned, default is 0 |
baseValue | the duty value that is used for the movement, default is 0 |
◆ rightMotorTask()
void Motion::rightMotorTask |
( |
void * | args | ) |
|
|
staticprotected |
◆ rotateAntiClockwise()
void Motion::rotateAntiClockwise |
( |
uint32_t | rotateForMs = 0, |
|
|
uint | baseValue = DEFAULT_BASE_VALUE ) |
|
static |
Rotate anticlockwise for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop().
- Parameters
-
rotateForMs | Representing the duration of rotating anticlockwise in milliseconds or 0 to let the robot turn until another movecommand is issued. Default is 0. |
baseValue | The value that is used to start with the calibrated movement (not released yet, currently just the used value). |
Definition at line 173 of file Motion.cpp.
◆ rotateClockwise()
void Motion::rotateClockwise |
( |
uint32_t | rotateForMs = 0, |
|
|
uint | baseValue = DEFAULT_BASE_VALUE ) |
|
static |
Rotate clockwise for a certain amount of time. Call with moveForMs 0 will start movement, that must be stopped explicit by call to stop().
- Parameters
-
rotateForMs | Representing the duration of rotating clockwise in milliseconds, or 0 to rotate until another movecmd is issued. Default is 0 |
baseValue | The value that is used to start with the calibrated movement (not released yet, currently just the used value) |
Definition at line 134 of file Motion.cpp.
◆ stop()
void Motion::stop |
( |
void | | ) |
|
|
static |
stops any current movement, no matter if timebased or endless
Definition at line 187 of file Motion.cpp.
◆ buffer
◆ correctionThreshold
int Motion::correctionThreshold = 150 |
|
inlinestaticprotected |
◆ detection
◆ left
◆ LEFT_MOTOR_DUTY
◆ MOTOR_LEFT_PIN
const int Motion::MOTOR_LEFT_PIN = 12 |
|
staticprotected |
◆ MOTOR_RIGHT_PIN
const int Motion::MOTOR_RIGHT_PIN = 11 |
|
staticprotected |
◆ right
◆ RIGHT_MOTOR_DUTY
◆ xAntiClockwiseTaskHandle
TaskHandle_t Motion::xAntiClockwiseTaskHandle = NULL |
|
inlinestaticprotected |
◆ xClockwiseTaskHandle
TaskHandle_t Motion::xClockwiseTaskHandle = NULL |
|
inlinestaticprotected |
◆ xLastWakeTime
TickType_t Motion::xLastWakeTime |
|
inlinestaticprotected |
◆ xMoveTaskHandle
TaskHandle_t Motion::xMoveTaskHandle = NULL |
|
inlinestaticprotected |
The documentation for this class was generated from the following files: