diff --git a/src/AutoPilotPlugins/PX4/FlightModesComponent.cc b/src/AutoPilotPlugins/PX4/FlightModesComponent.cc index 17d71adeab8df344d813dc6c835133f994fc5f6e..9c64344a770f9c606b9d614924100ed127dbe112 100644 --- a/src/AutoPilotPlugins/PX4/FlightModesComponent.cc +++ b/src/AutoPilotPlugins/PX4/FlightModesComponent.cc @@ -107,7 +107,7 @@ QString FlightModesComponent::prerequisiteSetup(void) const return plugin->airframeComponent()->name(); } else if (!plugin->radioComponent()->setupComplete()) { return plugin->radioComponent()->name(); - } else if (!plugin->sensorsComponent()->setupComplete()) { + } else if (!plugin->vehicle()->hilMode() && !plugin->sensorsComponent()->setupComplete()) { return plugin->sensorsComponent()->name(); } } diff --git a/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc b/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc index 14b0ea56214316503ea8b477eff7acf213428f1f..c2adda7c0ad96d9b206c426474a9b377d6fe09e0 100644 --- a/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc +++ b/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc @@ -73,9 +73,11 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void) _radioComponent->setupTriggerSignals(); _components.append(QVariant::fromValue((VehicleComponent*)_radioComponent)); - _sensorsComponent = new SensorsComponent(_vehicle, this); - _sensorsComponent->setupTriggerSignals(); - _components.append(QVariant::fromValue((VehicleComponent*)_sensorsComponent)); + if (!_vehicle->hilMode()) { + _sensorsComponent = new SensorsComponent(_vehicle, this); + _sensorsComponent->setupTriggerSignals(); + _components.append(QVariant::fromValue((VehicleComponent*)_sensorsComponent)); + } _flightModesComponent = new FlightModesComponent(_vehicle, this); _flightModesComponent->setupTriggerSignals();