Files
sil/mainwindow.h
T
2020-10-05 10:41:44 +08:00

49 lines
738 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
extern "C"
{
#include "SIL.h"
typedef void (*SIL_initialize_ptr)(void);
typedef void (*SIL_step_ptr)(void);
}
#include <QMainWindow>
#include <QUdpSocket>
#include <QTimer>
#include <QHostAddress>
QT_BEGIN_NAMESPACE
namespace Ui
{
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
public slots:
void update200Hz();
void onFire();
private:
Ui::MainWindow *ui;
SIL_initialize_ptr init_func;
SIL_step_ptr step_func;
ExtU_SIL_T *u;
ExtY_SIL_T *y;
uint8_t seq;
QTimer *timer200Hz;
QUdpSocket *qgc_sock;
};
#endif // MAINWINDOW_H