From 594453d191746d94d562683e14e1ee2c053d5d38 Mon Sep 17 00:00:00 2001 From: Mike LaBranche Date: Sat, 7 Jul 2012 09:00:59 -0700 Subject: [PATCH] MixerCurve, Tweek: use base curve min to init custom curve2 --- .../src/plugins/config/configvehicletypewidget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp index fbad34e22..7c8716f24 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp @@ -616,15 +616,16 @@ void ConfigVehicleTypeWidget::updateCustomAirframeUI() } else { // no, init a straight curve - m_aircraft->customThrottle1Curve->initLinearCurve(curveValues.count(),(double)1); + m_aircraft->customThrottle1Curve->initLinearCurve(curveValues.count(), 1.0); } if (MixerSettings* mxr = qobject_cast(mixer)) { MixerSettings::DataFields mixerSettingsData = mxr->getData(); if (mixerSettingsData.Curve2Source == MixerSettings::CURVE2SOURCE_THROTTLE) m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_THROTTLE); - else + else { m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_PITCH); + } } // Setup all Throttle2 curves for all types of airframes @@ -634,7 +635,7 @@ void ConfigVehicleTypeWidget::updateCustomAirframeUI() m_aircraft->customThrottle2Curve->initCurve(&curveValues); } else { - m_aircraft->customThrottle2Curve->initLinearCurve(curveValues.count(),(double)1); + m_aircraft->customThrottle2Curve->initLinearCurve(curveValues.count(), 1.0, m_aircraft->customThrottle2Curve->getMin()); } // Update the mixer table: