-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathisimControl.h
executable file
·50 lines (41 loc) · 1016 Bytes
/
isimControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include <QByteArray>
#include <QtSerialPort/QSerialPort>
class IsimControl {
public :
IsimControl(int id, QSerialPort* xbee);
~IsimControl();
void sendInstruction(quint8 length, quint8 instruction, float* params);
void setWheelSpeed(float leftSpeed, float rightSpeed);
void setDxlPosition(float leftAngle, float rightAngle);
void setMagnetPower(float leftMagnet, float rightManget);
void setGyroscopeData(float* ypr);
void setYaw(float yaw);
void updateYaw();
void updateGyroscopeData();
void updateSwitchPressed();
int getId();
float getYaw();
float getRoll();
float getPitch();
bool getSwitchPressed();
float getRmotorValue();
float getLmotorValue();
float getRdxlValue();
float getLdxlValue();
float getRmagnetValue();
float getLmagnetValue();
private:
QSerialPort* xbee;
int id;
float yaw;
float roll;
float pitch;
bool switchPressed;
float rmotorValue;
float lmotorValue;
float rmagnetValue;
float lmagnetValue;
float rdxlValue;
float ldxlValue;
};