From 1bd93f892625ed55051dcd90e316a96929af02d1 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Tue, 20 Dec 2016 18:57:52 +0100 Subject: [PATCH] LP-454 Made case of section's names consistent - Change Vehicle names --- .../gcs/src/plugins/config/airframe_ccpm.ui | 4 +- .../gcs/src/plugins/config/airframe_ground.ui | 4 +- .../src/plugins/config/airframe_multirotor.ui | 2 +- .../configgroundvehiclewidget.cpp | 48 +++++++++---------- .../config/configvehicletypewidget.cpp | 8 ++-- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ground/gcs/src/plugins/config/airframe_ccpm.ui b/ground/gcs/src/plugins/config/airframe_ccpm.ui index 946ccf06f..b875042ea 100644 --- a/ground/gcs/src/plugins/config/airframe_ccpm.ui +++ b/ground/gcs/src/plugins/config/airframe_ccpm.ui @@ -1061,7 +1061,7 @@ margin:1px; - Motor outputs + Motor Outputs Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1206,7 +1206,7 @@ margin:1px; - Swashplate outputs + Swashplate Outputs diff --git a/ground/gcs/src/plugins/config/airframe_ground.ui b/ground/gcs/src/plugins/config/airframe_ground.ui index fbf23aabd..5720b2ce5 100644 --- a/ground/gcs/src/plugins/config/airframe_ground.ui +++ b/ground/gcs/src/plugins/config/airframe_ground.ui @@ -102,7 +102,7 @@ - Output channel assignments + Output Channel Assignments @@ -365,7 +365,7 @@ margin:1px; - Vehicle frame + Vehicle Frame diff --git a/ground/gcs/src/plugins/config/airframe_multirotor.ui b/ground/gcs/src/plugins/config/airframe_multirotor.ui index a50cc8969..0834a57d4 100644 --- a/ground/gcs/src/plugins/config/airframe_multirotor.ui +++ b/ground/gcs/src/plugins/config/airframe_multirotor.ui @@ -509,7 +509,7 @@ Typical value is 50% for + or X configuration on quads. - Motor output channels + Motor Output Channels diff --git a/ground/gcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp b/ground/gcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp index 7af8ae885..f835dc84e 100644 --- a/ground/gcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp +++ b/ground/gcs/src/plugins/config/cfg_vehicletypes/configgroundvehiclewidget.cpp @@ -81,15 +81,15 @@ ConfigGroundVehicleWidget::ConfigGroundVehicleWidget(QWidget *parent) : populateChannelComboBoxes(); QStringList groundVehicleTypes; - groundVehicleTypes << "Turnable (car)" << "Differential (tank)" << "Motorcycle" << "Turnable (boat)" << "Differential (boat)"; + groundVehicleTypes << "Car (Turnable)" << "Tank (Differential)" << "Motorcycle" << "Boat (Turnable)" << "Boat (Differential)"; m_aircraft->groundVehicleType->addItems(groundVehicleTypes); m_aircraft->groundShape->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_aircraft->groundShape->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - // Set default model to "Turnable (car)" + // Set default model to "Car (Turnable)" connect(m_aircraft->groundVehicleType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupUI(QString))); - m_aircraft->groundVehicleType->setCurrentIndex(m_aircraft->groundVehicleType->findText("Turnable (car)")); + m_aircraft->groundVehicleType->setCurrentIndex(m_aircraft->groundVehicleType->findText("Car (Turnable)")); setupUI(m_aircraft->groundVehicleType->currentText()); } @@ -126,10 +126,10 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) initMixerCurves(frameType); - if (frameType == "GroundVehicleBoat" || frameType == "Turnable (boat)") { + if (frameType == "GroundVehicleBoat" || frameType == "Boat (Turnable)") { // Boat m_vehicleImg->setElementId("boat"); - setComboCurrentIndex(m_aircraft->groundVehicleType, m_aircraft->groundVehicleType->findText("Turnable (boat)")); + setComboCurrentIndex(m_aircraft->groundVehicleType, m_aircraft->groundVehicleType->findText("Boat (Turnable)")); m_aircraft->gvMotor1ChannelBox->setEnabled(true); m_aircraft->gvMotor2ChannelBox->setEnabled(true); @@ -143,9 +143,9 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvSteering1Label->setText("First rudder"); m_aircraft->gvSteering2Label->setText("Second rudder"); - m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle curve1"); + m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle Curve 1"); m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle curve2"); + m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle Curve 2"); m_aircraft->gvThrottleCurve2GroupBox->setEnabled(false); m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); @@ -158,22 +158,22 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->groundVehicleThrottle1->initLinearCurve(5, 1.0, 0.0); m_aircraft->groundVehicleThrottle2->initLinearCurve(5, 1.0, 0.0); } - } else if ((frameType == "GroundVehicleDifferential") || (frameType == "Differential (tank)") || - (frameType == "GroundVehicleDifferentialBoat") || (frameType == "Differential (boat)")) { - bool is_Boat = frameType.contains("oat"); + } else if ((frameType == "GroundVehicleDifferential") || (frameType == "Tank (Differential)") || + (frameType == "GroundVehicleDifferentialBoat") || (frameType == "Boat (Differential)")) { + bool is_Boat = frameType.contains("Boat"); if (is_Boat) { // Boat differential m_vehicleImg->setElementId("boat_diff"); setComboCurrentIndex(m_aircraft->groundVehicleType, - m_aircraft->groundVehicleType->findText("Differential (boat)")); + m_aircraft->groundVehicleType->findText("Boat (Differential)")); m_aircraft->gvSteering1Label->setText("First rudder"); m_aircraft->gvSteering2Label->setText("Second rudder"); } else { // Tank m_vehicleImg->setElementId("tank"); setComboCurrentIndex(m_aircraft->groundVehicleType, - m_aircraft->groundVehicleType->findText("Differential (tank)")); + m_aircraft->groundVehicleType->findText("Tank (Differential)")); m_aircraft->gvSteering1Label->setText("Front steering"); m_aircraft->gvSteering2Label->setText("Rear steering"); } @@ -191,9 +191,9 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->differentialSteeringSlider1->setEnabled(true); m_aircraft->differentialSteeringSlider2->setEnabled(true); - m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle curve1"); + m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle Curve 1"); m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle curve2 "); + m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle Curve 2 "); m_aircraft->gvThrottleCurve2GroupBox->setEnabled(false); m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); @@ -226,9 +226,9 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvSteering2Label->setText("Balancing"); // Curve1 for Motorcyle - m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle curve1"); + m_aircraft->gvThrottleCurve1GroupBox->setTitle("Throttle Curve 1"); m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle curve2"); + m_aircraft->gvThrottleCurve2GroupBox->setTitle("Throttle Curve 2"); m_aircraft->gvThrottleCurve2GroupBox->setEnabled(false); m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); @@ -244,7 +244,7 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) } else { // Car m_vehicleImg->setElementId("car"); - setComboCurrentIndex(m_aircraft->groundVehicleType, m_aircraft->groundVehicleType->findText("Turnable (car)")); + setComboCurrentIndex(m_aircraft->groundVehicleType, m_aircraft->groundVehicleType->findText("Car (Turnable)")); m_aircraft->gvMotor1ChannelBox->setEnabled(true); m_aircraft->gvMotor2ChannelBox->setEnabled(true); @@ -258,9 +258,9 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType) m_aircraft->gvSteering1Label->setText("Front steering"); m_aircraft->gvSteering2Label->setText("Rear steering"); - m_aircraft->gvThrottleCurve1GroupBox->setTitle("Front Motor Throttle curve"); + m_aircraft->gvThrottleCurve1GroupBox->setTitle("Front Motor Throttle Curve"); m_aircraft->gvThrottleCurve1GroupBox->setEnabled(true); - m_aircraft->gvThrottleCurve2GroupBox->setTitle("Rear Motor Throttle curve"); + m_aircraft->gvThrottleCurve2GroupBox->setTitle("Rear Motor Throttle Curve"); m_aircraft->gvThrottleCurve2GroupBox->setEnabled(true); m_aircraft->groundVehicleThrottle2->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); @@ -408,16 +408,16 @@ QString ConfigGroundVehicleWidget::updateConfigObjectsFromWidgets() setThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, m_aircraft->groundVehicleThrottle2->getCurve()); // All airframe types must start with "GroundVehicle" - if (m_aircraft->groundVehicleType->currentText() == "Differential (boat)") { + if (m_aircraft->groundVehicleType->currentText() == "Boat (Differential)") { airframeType = "GroundVehicleDifferentialBoat"; setupGroundVehicleDifferential(airframeType); - } else if (m_aircraft->groundVehicleType->currentText() == "Turnable (boat)") { + } else if (m_aircraft->groundVehicleType->currentText() == "Boat (Turnable)") { airframeType = "GroundVehicleBoat"; setupGroundVehicleTurnable(airframeType); - } else if (m_aircraft->groundVehicleType->currentText() == "Turnable (car)") { + } else if (m_aircraft->groundVehicleType->currentText() == "Car (Turnable)") { airframeType = "GroundVehicleCar"; setupGroundVehicleTurnable(airframeType); - } else if (m_aircraft->groundVehicleType->currentText() == "Differential (tank)") { + } else if (m_aircraft->groundVehicleType->currentText() == "Tank (Differential)") { airframeType = "GroundVehicleDifferential"; setupGroundVehicleDifferential(airframeType); } else { @@ -615,7 +615,7 @@ bool ConfigGroundVehicleWidget::throwConfigError(QString airframeType) m_aircraft->gvSteering1ChannelBox->setItemData(0, 0, Qt::DecorationRole); // Reset color palettes m_aircraft->gvSteering2ChannelBox->setItemData(0, 0, Qt::DecorationRole); // Reset color palettes } - } else if (airframeType.contains("GroundVehicleDifferential")) { // Tank and differential Boat + } else if (airframeType.contains("GroundVehicleDifferential")) { // differential Tank and Boat if (m_aircraft->gvMotor1ChannelBox->currentText() == "None" || m_aircraft->gvMotor2ChannelBox->currentText() == "None") { m_aircraft->gvMotor1ChannelBox->setItemData(0, pixmap, Qt::DecorationRole); // Set color palettes diff --git a/ground/gcs/src/plugins/config/configvehicletypewidget.cpp b/ground/gcs/src/plugins/config/configvehicletypewidget.cpp index 0ac696d19..9e35c40d6 100644 --- a/ground/gcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/gcs/src/plugins/config/configvehicletypewidget.cpp @@ -284,11 +284,11 @@ int ConfigVehicleTypeWidget::frameCategory(QString frameType) return ConfigVehicleTypeWidget::MULTIROTOR; } else if (frameType == "HeliCP") { return ConfigVehicleTypeWidget::HELICOPTER; - } else if (frameType == "GroundVehicleCar" || frameType == "Turnable (car)" - || frameType == "GroundVehicleDifferential" || frameType == "Differential (tank)" + } else if (frameType == "GroundVehicleCar" || frameType == "Car (Turnable)" + || frameType == "GroundVehicleDifferential" || frameType == "Tank (Differential)" || frameType == "GroundVehicleMotorcycle" || frameType == "Motorcycle" - || frameType == "GroundVehicleBoat" || frameType == "Turnable (boat)" - || frameType == "GroundVehicleDifferentialBoat" || frameType == "Differential (boat)") { + || frameType == "GroundVehicleBoat" || frameType == "Boat (Turnable)" + || frameType == "GroundVehicleDifferentialBoat" || frameType == "Boat (Differential)") { return ConfigVehicleTypeWidget::GROUND; } else { return ConfigVehicleTypeWidget::CUSTOM;