Parsing class for a processing data from the serial port frame.
More...
#include <parser.hh>
|
float | calculateSpeedRight (const int &xAxis, const int &yAxis) |
| Calculate speed value on the right motor from the joystick swing. More...
|
|
float | calculateSpeedLeft (const int &xAxis, const int &yAxis) |
| Calculate speed value on the left motor from the joystick swing. More...
|
|
Definition at line 28 of file parser.hh.
◆ Parser()
◆ ~Parser()
◆ calculateSpeedLeft()
float Parser::calculateSpeedLeft |
( |
const int & |
xAxis, |
|
|
const int & |
yAxis |
|
) |
| |
|
private |
- Parameters
-
[in] | xAxis | Value of swing on the x axis. |
[in] | yAxis | Value of swing on the y axis. |
- Returns
- Speed value on the left motor.
Definition at line 190 of file parser.cpp.
◆ calculateSpeedRight()
float Parser::calculateSpeedRight |
( |
const int & |
xAxis, |
|
|
const int & |
yAxis |
|
) |
| |
|
private |
- Parameters
-
[in] | xAxis | Value of swing on the x axis. |
[in] | yAxis | Value of swing on the y axis. |
- Returns
- Speed value on the right motor.
Definition at line 136 of file parser.cpp.
◆ changedBattery
void Parser::changedBattery |
( |
int |
battery | ) |
|
|
signal |
- Parameters
-
[out] | battery | Value of the battery voltage. |
◆ changedJoystick
void Parser::changedJoystick |
( |
const QPoint & |
coordinates | ) |
|
|
signal |
- Parameters
-
[out] | coordinates | Values of swing on the x and the y axis. |
◆ changedLeftMotorAcceleration
void Parser::changedLeftMotorAcceleration |
( |
const QString & |
accelerationValue | ) |
|
|
signal |
- Parameters
-
[out] | accelerationValue | Value of the left motor acceleration. |
◆ changedLeftMotorGSpeed
void Parser::changedLeftMotorGSpeed |
( |
const QString & |
speedValue | ) |
|
|
signal |
- Parameters
-
[out] | speedValue | Value of left motor given speed. |
◆ changedLeftMotorSpeed
void Parser::changedLeftMotorSpeed |
( |
const QString & |
speedValue | ) |
|
|
signal |
- Parameters
-
[out] | speedValue | Value of left motor speed. |
◆ changedLidar
void Parser::changedLidar |
( |
const std::map< float, int > |
lidarData | ) |
|
|
signal |
- Parameters
-
[out] | lidarData | A map containing lidar data [key is angle and value is distance]. |
◆ changedRightMotorAcceleration
void Parser::changedRightMotorAcceleration |
( |
const QString & |
accelerationValue | ) |
|
|
signal |
- Parameters
-
[out] | accelerationValue | Value of the right motor acceleration. |
◆ changedRightMotorGSpeed
void Parser::changedRightMotorGSpeed |
( |
const QString & |
speedValue | ) |
|
|
signal |
- Parameters
-
[out] | speedValue | Value of right motor given speed. |
◆ changedRightMotorSpeed
void Parser::changedRightMotorSpeed |
( |
const QString & |
speedValue | ) |
|
|
signal |
- Parameters
-
[out] | speedValue | Value of the right motor speed. |
◆ leftMotorDirection
void Parser::leftMotorDirection |
( |
const int & |
direction | ) |
|
|
signal |
- Parameters
-
[out] | direction | Wheel spining direction. |
◆ parseFrame()
bool Parser::parseFrame |
( |
const std::string & |
frame | ) |
|
- Parameters
-
[in] | frame | One line from the serial port. |
- Returns
- Identifier wether a frame was parsed successfully.
Definition at line 21 of file parser.cpp.
◆ processData()
void Parser::processData |
( |
| ) |
|
◆ resetObstacleCloseStatus
void Parser::resetObstacleCloseStatus |
( |
| ) |
|
|
signal |
◆ rightMotorDirection
void Parser::rightMotorDirection |
( |
const int & |
direction | ) |
|
|
signal |
- Parameters
-
[out] | direction | A wheel spining direction. |
◆ setObstacleCloseStatus
void Parser::setObstacleCloseStatus |
( |
| ) |
|
|
signal |
◆ _battery
◆ _CRC16
◆ _leftAcceleration
int Parser::_leftAcceleration |
|
private |
◆ _leftSpeed
◆ _lidarData
std::map<float, int> Parser::_lidarData |
|
private |
◆ _rightAcceleration
int Parser::_rightAcceleration |
|
private |
◆ _rightSpeed
◆ _xAxis
◆ _yAxis
The documentation for this class was generated from the following files: