mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 08:36:33 +00:00
8e88cb6fe1
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
37 lines
1.2 KiB
C++
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;
|
|
}
|