|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|