2020-10-26 21:42:04 +08:00
|
|
|
#ifndef DIAGRAM_H
|
|
|
|
|
#define DIAGRAM_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
2021-01-07 10:55:02 +08:00
|
|
|
#include "ToolsUI/ToolsWidget.h"
|
2020-10-26 21:42:04 +08:00
|
|
|
|
|
|
|
|
#include "Chart.h"
|
2020-12-07 16:29:08 +08:00
|
|
|
#include "QCheckBox"
|
2020-10-26 21:42:04 +08:00
|
|
|
|
|
|
|
|
#include "QChart"
|
|
|
|
|
#include <QChartView>
|
|
|
|
|
#include <QLineSeries>
|
|
|
|
|
#include <QValueAxis>
|
|
|
|
|
#include <QDateTimeAxis>
|
|
|
|
|
|
2020-11-19 11:39:28 +08:00
|
|
|
|
|
|
|
|
#include "QDateTime"
|
|
|
|
|
|
2020-10-26 21:42:04 +08:00
|
|
|
namespace Ui {
|
|
|
|
|
class Diagram;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-07 10:55:02 +08:00
|
|
|
class Diagram : public ToolsWidget
|
2020-10-26 21:42:04 +08:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit Diagram(QWidget *parent = nullptr);
|
|
|
|
|
~Diagram();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chart *attChart = nullptr;
|
|
|
|
|
Chart *gyroChart = nullptr;
|
|
|
|
|
Chart *accChart = nullptr;
|
|
|
|
|
Chart *asChart = nullptr;
|
|
|
|
|
Chart *vzChart = nullptr;
|
|
|
|
|
Chart *altChart = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
2020-10-27 15:04:51 +08:00
|
|
|
|
2020-11-17 22:55:22 +08:00
|
|
|
void setAttitude(uint8_t source,
|
|
|
|
|
float ax,float ay,float az,
|
|
|
|
|
float p,float q,float r,
|
|
|
|
|
float rol,float pit,float yaw);
|
2020-10-27 15:04:51 +08:00
|
|
|
|
2020-11-17 22:55:22 +08:00
|
|
|
void setBaseState(uint32_t pos,QVariant real,QVariant meas);
|
2020-10-27 15:04:51 +08:00
|
|
|
void setServo(uint32_t pos,QVariant real,QVariant meas);
|
|
|
|
|
void setEngine(uint32_t pos,QVariant value);
|
|
|
|
|
void setBattery(uint32_t pos,QVariant value);
|
|
|
|
|
void setDlink(uint32_t pos,QVariant value);
|
2020-11-17 22:55:22 +08:00
|
|
|
void setNavigation(uint32_t pos,QVariant value);
|
|
|
|
|
void setControlState(uint32_t pos,QVariant value);
|
2020-11-19 11:39:28 +08:00
|
|
|
void setTime(uint32_t pos, QTime Value);
|
|
|
|
|
|
|
|
|
|
void setTargetPoint(int Value);
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
|
2020-10-26 21:42:04 +08:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
|
|
2020-10-28 13:48:15 +08:00
|
|
|
private slots:
|
|
|
|
|
|
2020-12-07 16:29:08 +08:00
|
|
|
void on_checkBox_att_stateChanged(int arg1);
|
|
|
|
|
void on_checkBox_gyro_stateChanged(int arg1);
|
|
|
|
|
void on_checkBox_acc_stateChanged(int arg1);
|
2020-11-21 18:19:28 +08:00
|
|
|
|
2020-10-26 21:42:04 +08:00
|
|
|
private:
|
|
|
|
|
Ui::Diagram *ui;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DIAGRAM_H
|