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

Merge remote-tracking branch 'origin/next' into thread/OP-1222_FW_Wizard

This commit is contained in:
m_thread 2014-08-25 23:47:33 +02:00
commit 12331586b7
4 changed files with 12 additions and 7 deletions

View File

@ -228,7 +228,11 @@ static void stabilizationOuterloopTask()
// That would be changed to Attitude mode max angle affecting Kp // That would be changed to Attitude mode max angle affecting Kp
// Also does not take dT into account // Also does not take dT into account
{ {
float rate_input = cast_struct_to_array(stabSettings.stabBank.ManualRate, stabSettings.stabBank.ManualRate.Roll)[t] * stabilizationDesiredAxis[t] / cast_struct_to_array(stabSettings.stabBank, stabSettings.stabBank.RollMax)[t]; float stickinput[3];
stickinput[0] = boundf(stabilizationDesiredAxis[0] / stabSettings.stabBank.RollMax, -1.0f, 1.0f);
stickinput[1] = boundf(stabilizationDesiredAxis[1] / stabSettings.stabBank.PitchMax, -1.0f, 1.0f);
stickinput[2] = boundf(stabilizationDesiredAxis[2] / stabSettings.stabBank.YawMax, -1.0f, 1.0f);
float rate_input = stickinput[t] * cast_struct_to_array(stabSettings.stabBank.ManualRate, stabSettings.stabBank.ManualRate.Roll)[t];
float weak_leveling = local_error[t] * stabSettings.settings.WeakLevelingKp; float weak_leveling = local_error[t] * stabSettings.settings.WeakLevelingKp;
weak_leveling = boundf(weak_leveling, -stabSettings.settings.MaxWeakLevelingRate, stabSettings.settings.MaxWeakLevelingRate); weak_leveling = boundf(weak_leveling, -stabSettings.settings.MaxWeakLevelingRate, stabSettings.settings.MaxWeakLevelingRate);

View File

@ -180,7 +180,7 @@ static void updatePIDs(UAVObjEvent *ev)
break; break;
case 2: case 2:
StabilizationSettingsBank2Get((StabilizationSettingsBank2Data *)&bank); StabilizationSettingsBank3Get((StabilizationSettingsBank3Data *)&bank);
break; break;
default: default:

View File

@ -425,7 +425,7 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType)
// get motor 2 value for Yaw and Roll // get motor 2 value for Yaw and Roll
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1; 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)); setYawMixLevel(qRound(value / 1.27));
// change channels // change channels
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1; channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
@ -454,7 +454,7 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType)
// get motor 2 value for Yaw and Roll // get motor 2 value for Yaw and Roll
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1; 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)); setYawMixLevel(qRound(value / 1.27));
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1; channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL); value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL);
@ -480,9 +480,9 @@ void ConfigMultiRotorWidget::refreshWidgetsValues(QString frameType)
m_aircraft->mrPitchMixLevel->setValue(qRound(value / 1.27)); m_aircraft->mrPitchMixLevel->setValue(qRound(value / 1.27));
// get motor 2 value for Yaw and Roll // get motor 2 value for Yaw and Roll
channel += 1; 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)); setYawMixLevel(qRound(value / 1.27));
channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1; channel = m_aircraft->multiMotorChannelBox2->currentIndex() - 1;
value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL); value = getMixerVectorValue(mixer, channel, VehicleConfig::MIXERVECTOR_ROLL);

View File

@ -15,7 +15,8 @@ OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR)
PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\" PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\"
} else { } else {
# not found, hope it's in the path... # not found, hope it's in the path...
PYTHON = \"$$(PYTHON)\" !macx: { PYTHON = \"$$(PYTHON)\" }
macx: { PYTHON = \"python\" }
} }
} }