Commit 8a049a99 authored by Don Gagne's avatar Don Gagne

Add fixedWing and multiRotor properties

parent f4622c87
......@@ -1334,3 +1334,23 @@ void Vehicle::_say(const QString& text, int severity)
if (!qgcApp()->runningUnitTests())
qgcApp()->toolbox()->audioOutput()->say(text.toLower(), severity);
}
bool Vehicle::fixedWing(void) const
{
return vehicleType() == MAV_TYPE_FIXED_WING;
}
bool Vehicle::multiRotor(void) const
{
switch (vehicleType()) {
case MAV_TYPE_QUADROTOR:
case MAV_TYPE_COAXIAL:
case MAV_TYPE_HELICOPTER:
case MAV_TYPE_HEXAROTOR:
case MAV_TYPE_OCTOROTOR:
case MAV_TYPE_TRICOPTER:
return true;
default:
return false;
}
}
......@@ -122,6 +122,8 @@ public:
Q_PROPERTY(uint messagesReceived READ messagesReceived NOTIFY messagesReceivedChanged)
Q_PROPERTY(uint messagesSent READ messagesSent NOTIFY messagesSentChanged)
Q_PROPERTY(uint messagesLost READ messagesLost NOTIFY messagesLostChanged)
Q_PROPERTY(bool fixedWing READ fixedWing CONSTANT)
Q_PROPERTY(bool multiRotor READ multiRotor CONSTANT)
/// Resets link status counters
Q_INVOKABLE void resetCounters ();
......@@ -170,8 +172,8 @@ public:
// Property accesors
int id(void) { return _id; }
MAV_AUTOPILOT firmwareType(void) { return _firmwareType; }
MAV_TYPE vehicleType(void) { return _vehicleType; }
MAV_AUTOPILOT firmwareType(void) const { return _firmwareType; }
MAV_TYPE vehicleType(void) const { return _vehicleType; }
/// Returns the highest quality link available to the Vehicle
LinkInterface* priorityLink(void);
......@@ -214,6 +216,9 @@ public:
bool hilMode(void);
void setHilMode(bool hilMode);
bool fixedWing(void) const;
bool multiRotor(void) const;
QmlObjectListModel* trajectoryPoints(void) { return &_mapTrajectoryList; }
int flowImageIndex() { return _flowImageIndex; }
......
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