diff --git a/src/include/Air_Ground_CEC/mainwindow.hpp b/src/include/Air_Ground_CEC/mainwindow.hpp index febdcb4..1239bcb 100644 --- a/src/include/Air_Ground_CEC/mainwindow.hpp +++ b/src/include/Air_Ground_CEC/mainwindow.hpp @@ -59,6 +59,8 @@ private slots: private slots: void on_Open_receive_clicked(); + void on_ConnectTello_clicked(); + private: Ui::MainWindow *ui; QNode qnode; diff --git a/src/main/mainwindow.cpp b/src/main/mainwindow.cpp index afd9dc0..8f9175d 100644 --- a/src/main/mainwindow.cpp +++ b/src/main/mainwindow.cpp @@ -1,6 +1,7 @@ +#define TELLODISCONNECTION 274 #include "../include/Air_Ground_CEC/mainwindow.hpp" #include - +#include MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : QMainWindow(parent), qnode(argc, argv), @@ -408,3 +409,20 @@ void MainWindow::on_Stop_receive_clicked() timer->stop(); capture.release(); } + +void MainWindow::on_ConnectTello_clicked() +{ + /* + Tello T("192.168.10.1"); + int socket_fd, err; + + if((socket_fd = socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP))==-1) + { + cout << "initialized error" << endl; + cout << 0; + exit(TELLODISCONNECTION); + } + */ +} + + diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui index be5f123..46c53e7 100644 --- a/src/ui/mainwindow.ui +++ b/src/ui/mainwindow.ui @@ -310,6 +310,19 @@ margin:0px 0px 0px 0px; + + + + + 211 + 71 + + + + Connect + + +