Files
autopilot/misc/rtsp_ai_player/aienginegimbalserver.cpp
T
Tuomas Järvinen 8e88cb6fe1 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
2024-07-18 22:04:09 +02:00

37 lines
1.2 KiB
C++

#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;
}