1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

LP-245 config: add sparky2 support in OPLinkManager

This commit is contained in:
Philippe Renon 2016-09-16 23:36:43 +02:00
parent 66ff3934ee
commit 3692cf5e0f
2 changed files with 6 additions and 21 deletions

View File

@ -92,6 +92,10 @@ void OPLinkManager::onOPLinkStatusUpdate()
m_opLinkType = OPLINK_REVOLUTION;
onOPLinkConnect();
break;
case 0x92:
m_opLinkType = OPLINK_SPARKY2;
onOPLinkConnect();
break;
default:
m_opLinkType = OPLINK_UNKNOWN;
// stop monitoring status updates...

View File

@ -41,7 +41,8 @@ public:
enum OPLinkType {
OPLINK_UNKNOWN,
OPLINK_MINI,
OPLINK_REVOLUTION
OPLINK_REVOLUTION,
OPLINK_SPARKY2
};
OPLinkManager();
@ -52,40 +53,20 @@ public:
return m_opLinkType;
}
// void start(QIODevice *dev);
// void stop();
bool isConnected() const;
// ConnectionState connectionState() const;
signals:
// void connecting();
void connected();
// void disconnecting();
void disconnected();
// void telemetryUpdated(double txRate, double rxRate);
// void myStart();
// void myStop();
private slots:
// void onConnect();
// void onDisconnect();
void onDeviceConnect();
void onDeviceDisconnect();
void onOPLinkStatusUpdate();
void onOPLinkConnect();
void onOPLinkDisconnect();
// void onOPLinkUpdate(double txRate, double rxRate);
// void onStart();
// void onStop();
private:
// UAVObjectManager *m_uavobjectManager;
// UAVTalk *m_uavTalk;
// OPLink *m_telemetry;
// OPLinkMonitor *m_telemetryMonitor;
// QIODevice *m_telemetryDevice;
// ConnectionState m_connectionState;
// QThread m_telemetryReaderThread;
bool m_isConnected;
OPLinkType m_opLinkType;
OPLinkStatus *m_opLinkStatus;