1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1603 Sliders are not updated fine. Still round / little slider value change but at least works now.

This commit is contained in:
Laurent Lalanne 2014-11-10 11:36:47 +01:00
parent a13f7cd6be
commit 7c8bcb5134

View File

@ -247,18 +247,18 @@ void ConfigFixedWingWidget::refreshWidgetsValues(QString frameType)
if (channel > -1) {
// If for some reason the actuators were incoherent, we might fail here, hence the check.
m_aircraft->elevonSlider1->setValue(
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL) * 100);
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL) / 1.27);
m_aircraft->elevonSlider2->setValue(
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH) * -100);
-getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH) / 1.27);
}
} else if (frameType == "FixedWingVtail") {
int channel = m_aircraft->fwElevator1ChannelBox->currentIndex() - 1;
if (channel > -1) {
// If for some reason the actuators were incoherent, we might fail here, hence the check.
m_aircraft->elevonSlider1->setValue(
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW) * 100);
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW) / 1.27);
m_aircraft->elevonSlider2->setValue(
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH) * 100);
getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH) / 1.27);
}
}
}