gehongbo_branch
pvqf6mep3 2 years ago
commit cc3622a0c1

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

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

@ -203,7 +203,7 @@ margin:0px 0px 0px 0px;
<item row="0" column="0">
<widget class="QStackedWidget" name="stackedWidget_main">
<property name="currentIndex">
<number>2</number>
<number>1</number>
</property>
<widget class="QWidget" name="mainWidget">
<widget class="QLabel" name="label_2">
@ -310,6 +310,19 @@ margin:0px 0px 0px 0px;
</property>
</spacer>
</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>
<widget class="QPushButton" name="Open_receive">
<property name="minimumSize">

Loading…
Cancel
Save