Skip to content

Commit

Permalink
Flight mode config no longer warning about not being configured
Browse files Browse the repository at this point in the history
Given the prevalence of things like Joysticks, Android controllers and the fact that you can change flight modes all you want from the QGC ui. It is not longer required to setup flight modes on an RC Transmitter channel.
  • Loading branch information
DonLakeFlyer committed Mar 4, 2025
1 parent 716e9cc commit 548706d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
27 changes: 0 additions & 27 deletions src/AutoPilotPlugins/PX4/FlightModesComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,6 @@ QString FlightModesComponent::iconResource(void) const
return "/qmlimages/FlightModesComponentIcon.png";
}

bool FlightModesComponent::requiresSetup(void) const
{
return _vehicle->parameterManager()->getParameter(-1, "COM_RC_IN_MODE")->rawValue().toInt() == 1 ? false : true;
}

bool FlightModesComponent::setupComplete(void) const
{
if (_vehicle->parameterManager()->getParameter(-1, "COM_RC_IN_MODE")->rawValue().toInt() == 1) {
return true;
}

if (_vehicle->parameterManager()->parameterExists(ParameterManager::defaultComponentId, "RC_MAP_FLTMODE") && _vehicle->parameterManager()->getParameter(ParameterManager::defaultComponentId, "RC_MAP_FLTMODE")->rawValue().toInt() != 0) {
return true;
}

return false;
}

QStringList FlightModesComponent::setupCompleteChangedTriggerList(void) const
{
QStringList list;

list << QStringLiteral("RC_MAP_MODE_SW") << QStringLiteral("RC_MAP_FLTMODE");

return list;
}

QUrl FlightModesComponent::setupSource(void) const
{
return QUrl::fromUserInput("qrc:/qml/PX4FlightModes.qml");
Expand Down
5 changes: 0 additions & 5 deletions src/AutoPilotPlugins/PX4/FlightModesComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ class FlightModesComponent : public VehicleComponent
public:
FlightModesComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = nullptr);

// Virtuals from VehicleComponent
virtual QStringList setupCompleteChangedTriggerList(void) const;

// Virtuals from VehicleComponent
virtual QString name(void) const;
virtual QString description(void) const;
virtual QString iconResource(void) const;
virtual bool requiresSetup(void) const;
virtual bool setupComplete(void) const;
virtual QUrl setupSource(void) const;
virtual QUrl summaryQmlSource(void) const;

Expand Down

0 comments on commit 548706d

Please sign in to comment.