-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.cpp
executable file
·33 lines (23 loc) · 1004 Bytes
/
mainwindow.cpp
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
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
i2cMultiplexer = new QI2CMultiplexer(this);
double front_laser = i2cMultiplexer->getFrontLaser();
double left_laser = i2cMultiplexer->getLeftLaser();
double right_laser = i2cMultiplexer->getRightLaser();
int angle = i2cMultiplexer->getAngle();
double temperature = i2cMultiplexer->getTemperature();
float accX, accY, accZ, gyroX, gyroY, gyroZ;
i2cMultiplexer->getMotion6(&accX, &accY, &accZ, &gyroX, &gyroY, &gyroZ);
qDebug()<<"Front Laser: "<<front_laser << "cm";
qDebug()<<"Left Laser: " << left_laser << "cm";
qDebug()<<"Right Laser: " << right_laser << "cm";
qDebug()<<"Compass Angle: " << angle << "°";
qDebug()<<"Temperature: " << temperature << "C°";
qDebug()<<"AccX: " << accX << " AccY: " << accY << " AccZ: " << accZ;
qDebug()<<"GyroX: " << gyroX << " GyroY: " << gyroY << " GyroZ: " << gyroZ;
}
MainWindow::~MainWindow()
{
}