Browse Source

More lists to bracket initializer

QGC4.4
Tomaz Canabrava 6 years ago committed by Daniel Agar
parent
commit
ce36842712
  1. 5
      src/AutoPilotPlugins/PX4/PowerComponent.cc
  2. 2
      src/AutoPilotPlugins/PX4/SensorsComponent.cc

5
src/AutoPilotPlugins/PX4/PowerComponent.cc

@ -49,10 +49,7 @@ bool PowerComponent::setupComplete(void) const @@ -49,10 +49,7 @@ bool PowerComponent::setupComplete(void) const
QStringList PowerComponent::setupCompleteChangedTriggerList(void) const
{
QStringList triggerList;
triggerList << "BAT_V_CHARGED" << "BAT_V_EMPTY" << "BAT_N_CELLS";
return triggerList;
return {"BAT_V_CHARGED", "BAT_V_EMPTY", "BAT_N_CELLS"};
}
QUrl PowerComponent::setupSource(void) const

2
src/AutoPilotPlugins/PX4/SensorsComponent.cc

@ -26,7 +26,7 @@ SensorsComponent::SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, @@ -26,7 +26,7 @@ SensorsComponent::SensorsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot,
VehicleComponent(vehicle, autopilot, parent),
_name(tr("Sensors"))
{
_deviceIds << QStringLiteral("CAL_GYRO0_ID") << QStringLiteral("CAL_ACC0_ID");
_deviceIds = QStringList({QStringLiteral("CAL_GYRO0_ID"), QStringLiteral("CAL_ACC0_ID") };
}
QString SensorsComponent::name(void) const

Loading…
Cancel
Save