2026-06-01 09:46:36 +08:00
|
|
|
#ifndef DIAGRAM_H
|
|
|
|
|
#define DIAGRAM_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include "ToolsUI/ToolsWidget.h"
|
|
|
|
|
|
|
|
|
|
#include "Chart.h"
|
|
|
|
|
#include "QCheckBox"
|
|
|
|
|
|
|
|
|
|
#include "QChart"
|
|
|
|
|
#include <QChartView>
|
|
|
|
|
#include <QLineSeries>
|
|
|
|
|
#include <QValueAxis>
|
|
|
|
|
#include <QDateTimeAxis>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "QDateTime"
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class Diagram;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Diagram : public ToolsWidget
|
|
|
|
|
{
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
|
|
void setAttitude(uint8_t source,
|
|
|
|
|
float ax,float ay,float az,
|
|
|
|
|
float p,float q,float r,
|
|
|
|
|
float rol,float pit,float yaw);
|
|
|
|
|
|
|
|
|
|
void setBaseState(uint32_t pos,QVariant real,QVariant meas);
|
|
|
|
|
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);
|
|
|
|
|
void setNavigation(uint32_t pos,QVariant value);
|
|
|
|
|
void setControlState(uint32_t pos,QVariant value);
|
|
|
|
|
void setTime(uint32_t pos, QTime Value);
|
|
|
|
|
|
|
|
|
|
void setTargetPoint(int Value);
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
void on_checkBox_att_stateChanged(int arg1);
|
|
|
|
|
void on_checkBox_gyro_stateChanged(int arg1);
|
|
|
|
|
void on_checkBox_acc_stateChanged(int arg1);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::Diagram *ui;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DIAGRAM_H
|