gehongbo_branch
pvqf6mep3 2 years ago
commit cc3622a0c1

@ -57,6 +57,8 @@ private slots:
private slots: private slots:
void on_Open_receive_clicked(); void on_Open_receive_clicked();
void on_ConnectTello_clicked();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
QNode qnode; QNode qnode;

@ -1,6 +1,7 @@
#define TELLODISCONNECTION 274
#include "../include/Air_Ground_CEC/mainwindow.hpp" #include "../include/Air_Ground_CEC/mainwindow.hpp"
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
#include <iostream>
MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
QMainWindow(parent), qnode(argc, argv), QMainWindow(parent), qnode(argc, argv),
@ -395,3 +396,17 @@ void MainWindow::on_Stop_receive_clicked()
timer->stop(); timer->stop();
capture.release(); 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);
}
}

@ -203,7 +203,7 @@ margin:0px 0px 0px 0px;
<item row="0" column="0"> <item row="0" column="0">
<widget class="QStackedWidget" name="stackedWidget_main"> <widget class="QStackedWidget" name="stackedWidget_main">
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="mainWidget"> <widget class="QWidget" name="mainWidget">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
@ -310,6 +310,19 @@ margin:0px 0px 0px 0px;
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QPushButton" name="ConnectTello">
<property name="minimumSize">
<size>
<width>211</width>
<height>71</height>
</size>
</property>
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="Open_receive"> <widget class="QPushButton" name="Open_receive">
<property name="minimumSize"> <property name="minimumSize">

Loading…
Cancel
Save