mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 12:36:35 +00:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user