mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OP-1222 fixed elevon mixer to be consistent with aileron type (no channel reversals needed), made FW wizzard and config widget create the same type of mixer setup
This commit is contained in:
parent
3f9fa97d0f
commit
daefab99be
@ -427,7 +427,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
||||
if (channel > -1) {
|
||||
setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_SERVO);
|
||||
value = (double)(m_aircraft->elevonSlider2->value() * 1.27);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH, value);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH, -value);
|
||||
value = (double)(m_aircraft->elevonSlider1->value() * 1.27);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL, value);
|
||||
|
||||
@ -436,7 +436,7 @@ bool ConfigFixedWingWidget::setupFrameElevon(QString airframeType)
|
||||
value = (double)(m_aircraft->elevonSlider2->value() * 1.27);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_PITCH, value);
|
||||
value = (double)(m_aircraft->elevonSlider1->value() * 1.27);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL, -value);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL, value);
|
||||
}
|
||||
|
||||
m_aircraft->fwStatusLabel->setText("Mixer generated");
|
||||
@ -498,7 +498,7 @@ bool ConfigFixedWingWidget::setupFrameVtail(QString airframeType)
|
||||
|
||||
channel = m_aircraft->fwAileron2ChannelBox->currentIndex() - 1;
|
||||
setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_SERVO);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL, -127);
|
||||
setMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL, 127);
|
||||
}
|
||||
|
||||
// vtail
|
||||
|
@ -1636,8 +1636,8 @@ void VehicleConfigurationHelper::setupElevon()
|
||||
channels[0].type = MIXER_TYPE_SERVO;
|
||||
channels[0].throttle1 = 0;
|
||||
channels[0].throttle2 = 0;
|
||||
channels[0].roll = -100;
|
||||
channels[0].pitch = 100;
|
||||
channels[0].roll = 100;
|
||||
channels[0].pitch = -100;
|
||||
channels[0].yaw = 0;
|
||||
|
||||
// Elevon Servo 1 (Chan 2)
|
||||
@ -1645,7 +1645,7 @@ void VehicleConfigurationHelper::setupElevon()
|
||||
channels[1].throttle1 = 0;
|
||||
channels[1].throttle2 = 0;
|
||||
channels[1].roll = 100;
|
||||
channels[1].pitch = -100;
|
||||
channels[1].pitch = 100;
|
||||
channels[1].yaw = 0;
|
||||
|
||||
guiSettings.fixedwing.FixedWingThrottle = 3;
|
||||
|
Loading…
Reference in New Issue
Block a user