17 typedef unsigned char byte;
18 typedef unsigned short int word;
20 #define L_JOY_LIMIT_X 1830
21 #define H_JOY_LIMIT_X 2050
22 #define L_JOY_LIMIT_Y 1940
23 #define H_JOY_LIMIT_Y 2160
25 #define CRC_INIT 0xffff
26 #define CRC_POLYNOMIAL 0x1021
float calculateSpeedLeft(const int &xAxis, const int &yAxis)
Calculate speed value on left motor from joystick swing.
float calculateSpeedRight(const int &xAxis, const int &yAxis)
Calculate speed value on right motor from joystick swing.
float calculateAcceleration(const int &acceleration)
calculateAcceleration
Parser()
Construct new Parser object.
void changedRightMotorAcceleration(const QString &accelerationValue)
Signal emitted when parsed data of right motor acceleration is ready.
void changedLidar(const std::map< float, int > lidarData)
Signal emitted when parsed data of lidar is ready.
~Parser()
Destruct Parser object.
void changedLeftMotorGSpeed(const QString &speedValue)
Signal emitted when parsed data of left motor given speed is ready.
void changedBattery(int battery)
Signal emitted when parsed data of battery voltage is ready.
void processData()
processData
bool parseFrame(const std::string &frame)
Parse line from serial port into managed variables.
void changedRightMotorSpeed(const QString &speedValue)
Signal emitted when parsed data of right motor speed is ready.
void changedLeftMotorSpeed(const QString &speedValue)
Signal emitted when parsed data of left motor speed is ready.
void changedJoystick(const QPoint &coordinates)
Signal emitted when parsed data of joystick swing is ready.
void changedRightMotorGSpeed(const QString &speedValue)
Signal emitted when parsed data of right motor given speed is ready.
void changedLeftMotorAcceleration(const QString &accelerationValue)
Signal emitted when parsed data of left motor acceleration is ready.
std::map< float, int > _lidarData