Files
gcs-nf/App/Setting/Index0/Global/GlobalSetting.h
T

104 lines
2.4 KiB
C++
Raw Normal View History

2020-11-21 18:19:28 +08:00
#ifndef GLOBALSETTING_H
#define GLOBALSETTING_H
#include <QWidget>
#include "QDebug"
#include "Config/Config.h"
namespace Ui {
class GlobalSetting;
}
class GlobalSetting : public QWidget
{
Q_OBJECT
2021-06-27 18:25:22 +08:00
typedef struct
{
QVariant d0;
QVariant kd;
QVariant len;
}_servo;
2020-11-21 18:19:28 +08:00
public:
explicit GlobalSetting(QWidget *parent = nullptr);
~GlobalSetting();
void getGCSID(void);
2020-12-08 22:21:52 +08:00
void getServo(void);
2020-12-10 18:47:49 +08:00
void getHeartBeat(void);
2021-06-27 18:25:22 +08:00
void getTTS(void);
2022-02-13 14:06:45 +08:00
void getExportInfo(void);
2022-02-10 23:02:29 +08:00
void getVirtualMargin(void);
void setVirtualMargin(void);
2022-02-13 14:06:45 +08:00
2022-02-10 23:02:29 +08:00
QMap<int, Config::_latlng> red = {
{0,{0, 50,-50}},
2022-02-10 23:42:10 +08:00
{1,{1, 50, 50}},
{2,{2,-50, 50}},
{3,{3,-50,-50}}
2022-02-10 23:02:29 +08:00
};
QMap<int, Config::_latlng> orange = {
{0,{0, 35,-35}},
2022-02-10 23:42:10 +08:00
{1,{1, 35, 35}},
{2,{2,-35, 35}},
{3,{3,-35,-35}}
2022-02-10 23:02:29 +08:00
};
2020-11-21 18:19:28 +08:00
private slots:
void on_pushButton_setGCSID_clicked();
2020-12-08 22:21:52 +08:00
void on_pushButton_getServoOffset_clicked();
void on_pushButton_setServoOffset_clicked();
2020-12-10 18:47:49 +08:00
void on_pushButton_getHeartBeat_clicked();
void on_pushButton_setHeartBeat_clicked();
void on_pushButton_Beep_clicked();
2021-05-13 09:17:59 +08:00
void on_pushButton_TTS_clicked();
2022-02-10 23:02:29 +08:00
void on_pushButton_readVirtualMargin_clicked();
void on_pushButton_saveVirtualMargin_clicked();
2022-02-13 14:06:45 +08:00
void on_pushButton_InfoExport_clicked();
2020-11-21 18:19:28 +08:00
signals:
2020-12-08 22:21:52 +08:00
void showMessage(const QString &message,int TimeOut = 0);
2020-11-21 18:19:28 +08:00
void setGCSID(int id);
2021-06-27 18:25:22 +08:00
void setServo(QVariant ch1_d0,QVariant ch1_kd,QVariant ch1_len,
QVariant ch2_d0,QVariant ch2_kd,QVariant ch2_len,
QVariant ch3_d0,QVariant ch3_kd,QVariant ch3_len,
QVariant ch4_d0,QVariant ch4_kd,QVariant ch4_len,
QVariant ch5_d0,QVariant ch5_kd,QVariant ch5_len,
QVariant ch6_d0,QVariant ch6_kd,QVariant ch6_len,
QVariant ch7_d0,QVariant ch7_kd,QVariant ch7_len,
QVariant ch8_d0,QVariant ch8_kd,QVariant ch8_len);
2020-12-08 22:21:52 +08:00
2020-12-10 18:47:49 +08:00
void setHeartBeat(QVariant state,QVariant frq);
void setBeep(QVariant beep);
2020-11-21 18:19:28 +08:00
2021-05-13 09:17:59 +08:00
void setTTS(QVariant flag);
2022-02-11 14:10:16 +08:00
void setMargin(int type,QMap<int,Config::_latlng> latlng);
2022-02-13 14:06:45 +08:00
void setExportInfo(QVariant value);
2020-11-21 18:19:28 +08:00
private:
Ui::GlobalSetting *ui;
};
#endif // GLOBALSETTING_H