Unverified Commit ba088926 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5873 from DonLakeFlyer/ToolbarIndicatorSignalling

Allows FirmwarePlugin::toolbarIndicators to signal change
parents 9cec7ebe 794200dc
......@@ -257,6 +257,7 @@ public:
virtual QString vehicleImageCompass(const Vehicle* vehicle) const;
/// Allows the core plugin to override the toolbar indicators
/// signals toolbarIndicatorsChanged
/// @return A list of QUrl with the indicators (see MainToolBarIndicators.qml)
virtual const QVariantList& toolBarIndicators(const Vehicle* vehicle);
......@@ -298,6 +299,9 @@ public:
// FIXME: Hack workaround for non pluginize FollowMe support
static const QString px4FollowMeFlightMode;
signals:
void toolbarIndicatorsChanged(void);
protected:
// Arms the vehicle with validation and retries
// @return: true - vehicle armed, false - vehicle failed to arm
......
......@@ -357,6 +357,8 @@ void Vehicle::_commonInit(void)
{
_firmwarePlugin = _firmwarePluginManager->firmwarePluginForAutopilot(_firmwareType, _vehicleType);
connect(_firmwarePlugin, &FirmwarePlugin::toolbarIndicatorsChanged, this, &Vehicle::toolBarIndicatorsChanged);
connect(this, &Vehicle::coordinateChanged, this, &Vehicle::_updateDistanceToHome);
connect(this, &Vehicle::homePositionChanged, this, &Vehicle::_updateDistanceToHome);
connect(this, &Vehicle::hobbsMeterChanged, this, &Vehicle::_updateHobbsMeter);
......
......@@ -314,7 +314,7 @@ public:
Q_PROPERTY(unsigned int telemetryTXBuffer READ telemetryTXBuffer NOTIFY telemetryTXBufferChanged)
Q_PROPERTY(int telemetryLNoise READ telemetryLNoise NOTIFY telemetryLNoiseChanged)
Q_PROPERTY(int telemetryRNoise READ telemetryRNoise NOTIFY telemetryRNoiseChanged)
Q_PROPERTY(QVariantList toolBarIndicators READ toolBarIndicators CONSTANT)
Q_PROPERTY(QVariantList toolBarIndicators READ toolBarIndicators NOTIFY toolBarIndicatorsChanged)
Q_PROPERTY(QmlObjectListModel* adsbVehicles READ adsbVehicles CONSTANT)
Q_PROPERTY(bool initialPlanRequestComplete READ initialPlanRequestComplete NOTIFY initialPlanRequestCompleteChanged)
Q_PROPERTY(QVariantList staticCameraList READ staticCameraList CONSTANT)
......@@ -745,6 +745,7 @@ signals:
void capabilitiesKnownChanged(bool capabilitiesKnown);
void initialPlanRequestCompleteChanged(bool initialPlanRequestComplete);
void capabilityBitsChanged(uint64_t capabilityBits);
void toolBarIndicatorsChanged(void);
void messagesReceivedChanged ();
void messagesSentChanged ();
......
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