mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
OP-1422_Tricopter_mixers_settings : Uncrustify
This commit is contained in:
parent
94809de9c4
commit
0edf70d0aa
@ -481,11 +481,11 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType)
|
||||
|
||||
// get motor 2 value for Yaw and Roll
|
||||
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
|
||||
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW);
|
||||
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_YAW);
|
||||
setYawMixLevel(qRound(value / 1.27));
|
||||
|
||||
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
|
||||
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL);
|
||||
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
|
||||
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL);
|
||||
m_aircraft->mrRollMixLevel->setValue(-qRound(value / 1.27));
|
||||
}
|
||||
} else if (frameType == "HexaCoax") {
|
||||
@ -968,11 +968,11 @@ void ConfigMultiRotorWidget::setupQuadMotor(int channel, double pitch, double ro
|
||||
UAVDataObject *mixer = dynamic_cast<UAVDataObject *>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||
|
||||
Q_ASSERT(mixer);
|
||||
|
||||
//Normalize mixer values, allow a well balanced mixer saved
|
||||
|
||||
// Normalize mixer values, allow a well balanced mixer saved
|
||||
pitch = (pitch < 0) ? qFloor(pitch * 127) : qCeil(pitch * 127);
|
||||
roll = (roll < 0) ? qFloor(roll * 127) : qCeil(roll * 127);
|
||||
yaw = (yaw < 0) ? qFloor(yaw * 127) : qCeil(yaw * 127);
|
||||
roll = (roll < 0) ? qFloor(roll * 127) : qCeil(roll * 127);
|
||||
yaw = (yaw < 0) ? qFloor(yaw * 127) : qCeil(yaw * 127);
|
||||
|
||||
setMixerType(mixer, channel, VehicleConfig::MIXERTYPE_MOTOR);
|
||||
|
||||
|
@ -442,23 +442,23 @@ void VehicleConfigurationHelper::applyMixerConfiguration(mixerChannelSettings ch
|
||||
field->setValue((channels[i].throttle1 * 127) / 100, 0);
|
||||
field->setValue((channels[i].throttle2 * 127) / 100, 1);
|
||||
|
||||
//Normalize mixer values, allow a well balanced mixer saved
|
||||
if(channels[i].roll < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].roll * 127) / 100), 2);
|
||||
// Normalize mixer values, allow a well balanced mixer saved
|
||||
if (channels[i].roll < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].roll * 127) / 100), 2);
|
||||
} else {
|
||||
field->setValue(qCeil((double)(channels[i].roll * 127) / 100), 2);
|
||||
field->setValue(qCeil((double)(channels[i].roll * 127) / 100), 2);
|
||||
}
|
||||
|
||||
if(channels[i].pitch < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].pitch * 127) / 100), 3);
|
||||
if (channels[i].pitch < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].pitch * 127) / 100), 3);
|
||||
} else {
|
||||
field->setValue(qCeil((double)(channels[i].pitch * 127) / 100), 3);
|
||||
field->setValue(qCeil((double)(channels[i].pitch * 127) / 100), 3);
|
||||
}
|
||||
|
||||
if(channels[i].yaw < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].yaw * 127) / 100), 4);
|
||||
if (channels[i].yaw < 0) {
|
||||
field->setValue(qFloor((double)(channels[i].yaw * 127) / 100), 4);
|
||||
} else {
|
||||
field->setValue(qCeil((double)(channels[i].yaw * 127) / 100), 4);
|
||||
field->setValue(qCeil((double)(channels[i].yaw * 127) / 100), 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user