first commit
This commit is contained in:
98
source/ZZ_PSDK_391/VehicleController.h
Normal file
98
source/ZZ_PSDK_391/VehicleController.h
Normal file
@ -0,0 +1,98 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "dji_typedef.h"
|
||||
#include "dji_core.h"
|
||||
#include "dji_waypoint_v2.h"
|
||||
|
||||
#include "ConfigParser_DJI.h"
|
||||
#include "pch.h"
|
||||
|
||||
//#include "ConfigParser_M300RTK.h"
|
||||
#include "Widget_Nikira.h"
|
||||
#include "ZZ_Types.h"
|
||||
using namespace std;
|
||||
using namespace ZZ_DATA_DEF::DJI;
|
||||
//using namespace ZZ_DATA_DEF::MainConfig;
|
||||
|
||||
class VehicleController :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VehicleController(QObject* parent = nullptr);
|
||||
virtual ~VehicleController();
|
||||
|
||||
public:
|
||||
static int m_siFlagIsPumpWorking;
|
||||
static int m_siFlagIsStartCaptureSignalEmitted;
|
||||
static VehicleController* spCaller;
|
||||
static char m_scCaptureMode;
|
||||
SensorPort m_struSensorPort;
|
||||
private:
|
||||
///////////Config need modify
|
||||
ZZ_ConfigParser_M350RTK m_clsConfigParser;
|
||||
AppRegInfo m_struAppRegInfo;
|
||||
HardwareInfo m_struHardwareInfo;
|
||||
//ZZ_ConfigParser_M300RTK m_clsConfigParser;
|
||||
ZZ_Widget_Nikira m_clsWidget;
|
||||
|
||||
//M300RTKSettings m_struM300RTKSs;
|
||||
//AppRegInfo m_struAppRegInfo;
|
||||
//HardwareInfo m_struHardwareInfo;
|
||||
//UIConfig m_struUIConfig;
|
||||
|
||||
int m_iFlagIsVehicleTakeoff;
|
||||
int m_iFlagIsVehicleCapturing;
|
||||
int m_iFlagIsCaptureModeInited;
|
||||
|
||||
float m_fHeightOfHomePoint_BM;
|
||||
public:
|
||||
/// test func Do Not Call
|
||||
static T_DjiReturnCode DjiTest_FcSubscriptionReceiveFlightStatusCallback(const uint8_t* ccData, uint16_t sDataSize,const T_DjiDataTimestamp* tDjiTimestamp);
|
||||
static T_DjiReturnCode DjiTest_FcSubscriptionReceiveHeightCallback(const uint8_t* data, uint16_t dataSize,const T_DjiDataTimestamp* timestamp);
|
||||
|
||||
/// callback func to monitor flight status
|
||||
static T_DjiReturnCode ZZ_DjiWaypointV2EventCallback(T_DjiWaypointV2MissionEventPush eventData);
|
||||
public:
|
||||
/// call First
|
||||
int Initialize();
|
||||
int SetupEnvironment();
|
||||
/// call Seconde
|
||||
int StartupPSDK_M350RTK();
|
||||
|
||||
///call to save Settings
|
||||
int UpdateUIConfig();
|
||||
|
||||
/// data call
|
||||
int GetOneDataFrame(M350RTKDataFrame &M350RTKDataFrame);
|
||||
private:
|
||||
///
|
||||
int SetupMessagePipe();
|
||||
///
|
||||
int SetupWidget();
|
||||
///
|
||||
public:///for test
|
||||
int InitSystemParams();
|
||||
int SetupSubscriptions();
|
||||
///
|
||||
public:///for test
|
||||
int SetupWaypointStatusCallback();
|
||||
///
|
||||
|
||||
///
|
||||
int LoadUserAppInfo(T_DjiUserInfo* struDjiUserInfo);
|
||||
static T_DjiReturnCode DjiUser_PrintMessage(const uint8_t* data, uint16_t dataLen);
|
||||
signals:
|
||||
int Signal_StartCapture();
|
||||
int Signal_StopCapture();
|
||||
|
||||
void Signal_UpdateVehicleMessage(QString qstrMessage);
|
||||
public slots:
|
||||
int Slot_OnChangeCaptureMode(char cMode);
|
||||
///for test
|
||||
int Slot_TestStartCapture();
|
||||
int Slot_TestStopCapture();
|
||||
};
|
||||
|
Reference in New Issue
Block a user