diff --git a/src/FirmwarePlugin/FirmwarePlugin.h b/src/FirmwarePlugin/FirmwarePlugin.h index a395674..f4f05a0 100644 --- a/src/FirmwarePlugin/FirmwarePlugin.h +++ b/src/FirmwarePlugin/FirmwarePlugin.h @@ -88,10 +88,6 @@ public: /// list available from the firmware. Call will be made again if advanced mode changes. virtual QStringList flightModes(Vehicle* /*vehicle*/) { return QStringList(); } - /// Returns the list of additional flight modes to add to the list for joystick button actions. - /// Call will be made again if advanced mode changes. - virtual QStringList extraJoystickFlightModes(Vehicle* /*vehicle*/) { return QStringList(); } - /// Returns the name for this flight mode. Flight mode names must be human readable as well as audio speakable. /// @param base_mode Base mode from mavlink HEARTBEAT message /// @param custom_mode Custom mode from mavlink HEARTBEAT message diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index ddc3ed3..e138739 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -1011,7 +1011,7 @@ void Joystick::_executeButtonAction(const QString& action, bool buttonDown) if (buttonDown) emit setVtolInFwdFlight(true); } else if (action == _buttonActionVTOLMultiRotor) { if (buttonDown) emit setVtolInFwdFlight(false); - } else if (_activeVehicle->flightModes().contains(action) || _activeVehicle->extraJoystickFlightModes().contains(action)) { + } else if (_activeVehicle->flightModes().contains(action)) { if (buttonDown) emit setFlightMode(action); } else if(action == _buttonActionContinuousZoomIn || action == _buttonActionContinuousZoomOut) { if (buttonDown) { @@ -1128,10 +1128,6 @@ void Joystick::_buildActionList(Vehicle* activeVehicle) foreach(auto mode, list) { _assignableButtonActions.append(new AssignableButtonAction(this, mode)); } - list = activeVehicle->extraJoystickFlightModes(); - foreach(auto mode, list) { - _assignableButtonActions.append(new AssignableButtonAction(this, mode)); - } } _assignableButtonActions.append(new AssignableButtonAction(this, _buttonActionVTOLFixedWing)); _assignableButtonActions.append(new AssignableButtonAction(this, _buttonActionVTOLMultiRotor)); diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index f4c91fe..0faa325 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -2185,11 +2185,6 @@ QStringList Vehicle::flightModes() return _firmwarePlugin->flightModes(this); } -QStringList Vehicle::extraJoystickFlightModes() -{ - return _firmwarePlugin->extraJoystickFlightModes(this); -} - QString Vehicle::flightMode() const { return _firmwarePlugin->flightMode(_base_mode, _custom_mode); diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index 9fc87f0..18acaec 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -164,7 +164,6 @@ public: Q_PROPERTY(bool autoDisarm READ autoDisarm NOTIFY autoDisarmChanged) Q_PROPERTY(bool flightModeSetAvailable READ flightModeSetAvailable CONSTANT) Q_PROPERTY(QStringList flightModes READ flightModes NOTIFY flightModesChanged) - Q_PROPERTY(QStringList extraJoystickFlightModes READ extraJoystickFlightModes NOTIFY flightModesChanged) Q_PROPERTY(QString flightMode READ flightMode WRITE setFlightMode NOTIFY flightModeChanged) Q_PROPERTY(TrajectoryPoints* trajectoryPoints MEMBER _trajectoryPoints CONSTANT) Q_PROPERTY(QmlObjectListModel* cameraTriggerPoints READ cameraTriggerPoints CONSTANT) @@ -521,7 +520,6 @@ public: bool flightModeSetAvailable (); QStringList flightModes (); - QStringList extraJoystickFlightModes (); QString flightMode () const; void setFlightMode (const QString& flightMode);