From 458120cce275c2b88daacf5c997106dd857303b3 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Tue, 26 Aug 2014 14:17:24 +0200 Subject: [PATCH] OP-1422 Tricopter_mixers_settings : Do the same calc as Gcs and round values so Wizard set same values as Gcs defaults. Little fix for HexaX wizard that set HexaH frame ! --- .../src/plugins/setupwizard/vehicleconfigurationhelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index 119d58120..19a5d4099 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -440,8 +440,8 @@ void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings ch Q_ASSERT(field); field->setValue((channels[i].throttle1 * 127) / 100, 0); field->setValue((channels[i].throttle2 * 127) / 100, 1); - field->setValue((channels[i].roll * 127) / 100, 2); - field->setValue((channels[i].pitch * 127) / 100, 3); + field->setValue(qRound(((double)channels[i].roll * 127) / 100), 2); + field->setValue(qRound(((double)channels[i].pitch * 127) / 100), 3); field->setValue((channels[i].yaw * 127) / 100, 4); } @@ -1014,7 +1014,7 @@ void VehicleConfigurationHelper::setupHexaCopter() } case VehicleConfigurationSource::MULTI_ROTOR_HEXA_X: { - frame = SystemSettings::AIRFRAMETYPE_HEXAH; + frame = SystemSettings::AIRFRAMETYPE_HEXAX; // HexaX according to new mixer table and pitch-roll-yaw mixing at 100% // Pitch Roll Yaw // M1 { 1, -0.5, -1 },