75 lines
1.7 KiB
C++
75 lines
1.7 KiB
C++
#ifndef GLOBALSETTING_H
|
|
#define GLOBALSETTING_H
|
|
|
|
#include <QWidget>
|
|
#include "QDebug"
|
|
#include "Config/Config.h"
|
|
|
|
|
|
namespace Ui {
|
|
class GlobalSetting;
|
|
}
|
|
|
|
class GlobalSetting : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
typedef struct
|
|
{
|
|
QVariant d0;
|
|
QVariant kd;
|
|
QVariant len;
|
|
}_servo;
|
|
|
|
public:
|
|
explicit GlobalSetting(QWidget *parent = nullptr);
|
|
~GlobalSetting();
|
|
|
|
|
|
void getGCSID(void);
|
|
void getServo(void);
|
|
void getHeartBeat(void);
|
|
void getTTS(void);
|
|
|
|
private slots:
|
|
void on_pushButton_setGCSID_clicked();
|
|
|
|
void on_pushButton_getServoOffset_clicked();
|
|
|
|
void on_pushButton_setServoOffset_clicked();
|
|
|
|
void on_pushButton_getHeartBeat_clicked();
|
|
|
|
void on_pushButton_setHeartBeat_clicked();
|
|
|
|
void on_pushButton_Beep_clicked();
|
|
|
|
void on_pushButton_TTS_clicked();
|
|
|
|
signals:
|
|
void showMessage(const QString &message,int TimeOut = 0);
|
|
|
|
void setGCSID(int id);
|
|
|
|
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);
|
|
|
|
|
|
void setHeartBeat(QVariant state,QVariant frq);
|
|
|
|
void setBeep(QVariant beep);
|
|
|
|
void setTTS(QVariant flag);
|
|
|
|
private:
|
|
Ui::GlobalSetting *ui;
|
|
};
|
|
|
|
#endif // GLOBALSETTING_H
|