mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 08:16:34 +00:00
Fixed camera control related issues and
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <QUdpSocket>
|
||||
|
||||
#include "aienginegimbalserver.h"
|
||||
#include "aienginegimbalserveractions.h"
|
||||
|
||||
|
||||
AiEngineGimbalServer::AiEngineGimbalServer(QObject *parent)
|
||||
: QObject{parent}
|
||||
{
|
||||
@@ -31,8 +32,12 @@ AiEngineGimbalServer::AiEngineGimbalServer(QObject *parent)
|
||||
|
||||
// Create and bind the new UDP socket for receiving commands
|
||||
mReceiveUdpSocket = new QUdpSocket(this);
|
||||
mReceiveUdpSocket->bind(QHostAddress::LocalHost, 45454);
|
||||
|
||||
|
||||
|
||||
// mReceiveUdpSocket->bind(QHostAddress::LocalHost, 45454);
|
||||
if (!mReceiveUdpSocket->bind(QHostAddress::LocalHost, 45454)) {
|
||||
qDebug() << "Failed to bind UDP socket:" << mReceiveUdpSocket->errorString();
|
||||
}
|
||||
// Connect the socket to handle incoming messages
|
||||
connect(mReceiveUdpSocket, &QUdpSocket::readyRead, this, &AiEngineGimbalServer::processUdpCommands);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user