#ifndef MAINWINDOW_H #define MAINWINDOW_H extern "C" { #include "SIL.h" typedef void (*SIL_initialize_ptr)(void); typedef void (*SIL_step_ptr)(void); typedef const rtwCAPI_ModelMappingStaticInfo *(*SIL_GetCAPIStaticMap_ptr)(void); } #include #include #include #include #include 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(); void onExport(); void onImport(); void onTimes(int); private: Ui::MainWindow *ui; SIL_initialize_ptr init_func; SIL_step_ptr step_func; SIL_GetCAPIStaticMap_ptr getmap_func; ExtU_SIL_T *u; ExtY_SIL_T *y; RT_MODEL_SIL_T *m; real_T Att0[3]; real_T X0[3]; real_T hground; int stage; real_T gear_height; int times; int idx; void setup_param(const QVector &head, const QVector &onecase); void scan_param(void); uint8_t seq; uint8_t seq_rec; QFile *rec_file; QTimer *timer200Hz; QUdpSocket *qgc_sock; }; #endif // MAINWINDOW_H