Commit cbbac43f authored by Lorenz Meier's avatar Lorenz Meier

Added flying wing support

parent b3ba7ea3
......@@ -38,6 +38,7 @@ This file is part of the QGROUNDCONTROL project
#include "QGC.h"
#include <QHostInfo>
#include "UAS.h"
#include "UASInterface.h"
#include "MainWindow.h"
QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress localHost, quint16 localPort) :
......@@ -226,12 +227,8 @@ void QGCXPlaneLink::setRemoteHost(const QString& newHost)
void QGCXPlaneLink::updateActuators(uint64_t time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8)
{
// XXX Control this via the onboard system type exclusively
if (mav->getSystemType() == MAV_TYPE_QUADROTOR)
// Only update this for multirotors
// if (airframeID == AIRFRAME_QUAD_X_MK_10INCH_I2C ||
// airframeID == AIRFRAME_QUAD_X_ARDRONE ||
// airframeID == AIRFRAME_QUAD_DJI_F450_PWM)
{
Q_UNUSED(time);
......@@ -294,9 +291,9 @@ void QGCXPlaneLink::updateControls(uint64_t time, float rollAilerons, float pitc
{
// Do not update this control type for
// all multirotors
if (airframeID == AIRFRAME_QUAD_X_MK_10INCH_I2C ||
airframeID == AIRFRAME_QUAD_X_ARDRONE ||
airframeID == AIRFRAME_QUAD_DJI_F450_PWM)
if (mav->getSystemType() == MAV_TYPE_QUADROTOR ||
mav->getSystemType() == MAV_TYPE_HEXAROTOR ||
mav->getSystemType() == MAV_TYPE_OCTOROTOR)
{
return;
}
......@@ -316,9 +313,26 @@ void QGCXPlaneLink::updateControls(uint64_t time, float rollAilerons, float pitc
p.b[4] = '\0';
p.index = 12;
p.f[0] = -pitchElevator;
p.f[1] = rollAilerons;
p.f[2] = yawRudder;
if (mav->getAirframe() == UASInterface::QGC_AIRFRAME_X8 ||
mav->getAirframe() == UASInterface::QGC_AIRFRAME_VIPER_2_0 ||
mav->getAirframe() == UASInterface::QGC_AIRFRAME_CAMFLYER_Q)
{
// de-mix delta-mixed inputs
// pitch input - mixed roll and pitch channels
p.f[0] = 0.5f * (rollAilerons - pitchElevator);
// roll input - mixed roll and pitch channels
p.f[1] = 0.5f * (rollAilerons + pitchElevator);
// yaw
p.f[2] = 0.0f;
}
else
{
// direct pass-through
p.f[0] = -pitchElevator;
p.f[1] = rollAilerons;
p.f[2] = yawRudder;
}
Q_UNUSED(time);
Q_UNUSED(systemMode);
......
......@@ -12,14 +12,14 @@
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 1.0.1 (Alpha RC18)"
#define QGC_APPLICATION_VERSION "v. 1.0.2 (beta)"
namespace QGC
{
const QString APPNAME = "QGROUNDCONTROL";
const QString COMPANYNAME = "QGROUNDCONTROL";
const int APPLICATIONVERSION = 101; // 1.0.1
const int APPLICATIONVERSION = 102; // 1.0.1
}
#endif // QGC_CONFIGURATION_H
......@@ -150,6 +150,9 @@ public:
QGC_AIRFRAME_PTERYX,
QGC_AIRFRAME_TRICOPTER,
QGC_AIRFRAME_HEXCOPTER,
QGC_AIRFRAME_X8,
QGC_AIRFRAME_VIPER_2_0,
QGC_AIRFRAME_CAMFLYER_Q,
QGC_AIRFRAME_END_OF_ENUM
};
......
......@@ -547,7 +547,11 @@ void UASView::selectAirframe()
<< "Predator"
<< "Coaxial"
<< "Pteryx"
<< "Asctec Firefly";
<< "Tricopter"
<< "Asctec Firefly"
<< "X8 Flying Wing"
<< "Viper 2.0 Flying Wing"
<< "Cam Flyer Q Flying Wing";
bool ok;
QString item = QInputDialog::getItem(this, tr("Select Airframe for %1").arg(uas->getUASName()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment