1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #ifndef MAINWINDOW_H
- #define MAINWINDOW_H
- #include "common_data.h"
- #include "ctl.h"
- #include "tlm.h"
- #include <QTime>
- #include <QTimer>
- #include <QScrollBar>
- #include <QEnterEvent>
- #include <iostream>
- #include <QMainWindow>
- #include <QLabel>
- #include <ctime>
- QT_BEGIN_NAMESPACE
- namespace Ui {
- class MainWindow;
- }
- QT_END_NAMESPACE
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
- public:
- MainWindow(QWidget *parent = nullptr);
- ~MainWindow();
- private slots:
- void slotTimerAlarm();
- void on_taskStart_button_clicked();
- void on_interrupt_button_clicked();
- void on_stop_button_clicked();
- void on_resum_button_clicked();
- void on_pass_val_returnPressed();
- private:
- Ui::MainWindow *ui;
- QTimer *timer;
- int ctl_sock = 0;
- int tlm_sock = 0;
- int external_cmd_sock = 0;
- int ctl_state = 0;
- int task_state = 0;
- int last_fail_time = 0;
- QString alarm_buff{""};
- QString fail_buff{""};
- EVENT_t last_event = EVENT_UNKNOWN;
- gcs_tlm_t tlm;
- void auth();
- void telemHandler();
- void taskInit();
- void ctlConnector();
- void external_cmds_handler();
- double pwm_convert(int pwm);
- std::vector<QString> alarms = {
- "Инициировано полетное задание"
- , "Инициирован взлет"
- , "Инициировано зависание"
- , "Инициирована посадка"
- , "Выполнена посадка"
- , "Прервано полетное задание"
- , "Принудительное зависание"
- , "Возобновлено выполнение полетного задания"
- , "max"
- , "unknown"
- };
- };
- #endif // MAINWINDOW_H
|