Initial version of combining rtsp_ai_player and camera modules.

Functionality has been written to rtsp_ai_player.

TODO!!
- move functionality of camera module misc/rtsp_ai_player/aienginegimbalserver.cpp
- implement all signals in AiEngineGimbalClient
- get drone position from autopilot and send it to AiEngineGimbalServer
This commit is contained in:
Tuomas Järvinen
2024-07-18 22:01:50 +02:00
parent 7c802106c7
commit 8e88cb6fe1
12 changed files with 262 additions and 113 deletions
@@ -0,0 +1,36 @@
#include <QDebug>
#include "aienginegimbalserver.h"
AiEngineGimbalServer::AiEngineGimbalServer(QObject *parent)
: QObject{parent}
{
mSerialPort = new QSerialPort(this);
// TODO!! Setup and use serial port....
}
// TODO!! Client doesn't really send any signal yet to this slot.
void AiEngineGimbalServer::dronePositionSlot(AiEngineDronePosition position)
{
qDebug() << "AiEngineGimbalServer::dronePositionSlot() Server got new drone position:"
<< position.position.lat
<< position.position.lon
<< position.position.alt;
}
// This is actually called from the client.
void AiEngineGimbalServer::zoomToAiTargetSlot(AiEngineCameraTarget target)
{
qDebug() << "AiEngineGimbalServer::zoomToAiTargetSlot() Move camera to the new target:"
<< "index:" << target.index
<< "pos:" << target.rectangle.top << target.rectangle.left << target.rectangle.bottom << target.rectangle.right;
}
// TODO!! Not sent from the client yet.
void AiEngineGimbalServer::cameraPositionSlot(AiEngineCameraPosition position)
{
qDebug() << "SAiEngineGimbalServer::cameraPositionSlot() Move camera to:" << position.pitch << position.yaw << "zoom:" << position.zoom;
}