mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
TxPID module: add ILimit values to the list of settings
This commit is contained in:
parent
a01e38c277
commit
403e9cd220
@ -193,12 +193,18 @@ static void updatePIDs(UAVObjEvent* ev)
|
|||||||
case TXPIDSETTINGS_PIDS_ROLLRATEKD:
|
case TXPIDSETTINGS_PIDS_ROLLRATEKD:
|
||||||
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KD], value);
|
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KD], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_ROLLRATEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ROLLATTITUDEKP:
|
case TXPIDSETTINGS_PIDS_ROLLATTITUDEKP:
|
||||||
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KP], value);
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KP], value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ROLLATTITUDEKI:
|
case TXPIDSETTINGS_PIDS_ROLLATTITUDEKI:
|
||||||
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KI], value);
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KI], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_ROLLATTITUDEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_PITCHRATEKP:
|
case TXPIDSETTINGS_PIDS_PITCHRATEKP:
|
||||||
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KP], value);
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KP], value);
|
||||||
break;
|
break;
|
||||||
@ -208,12 +214,18 @@ static void updatePIDs(UAVObjEvent* ev)
|
|||||||
case TXPIDSETTINGS_PIDS_PITCHRATEKD:
|
case TXPIDSETTINGS_PIDS_PITCHRATEKD:
|
||||||
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KD], value);
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KD], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_PITCHRATEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_PITCHATTITUDEKP:
|
case TXPIDSETTINGS_PIDS_PITCHATTITUDEKP:
|
||||||
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KP], value);
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KP], value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_PITCHATTITUDEKI:
|
case TXPIDSETTINGS_PIDS_PITCHATTITUDEKI:
|
||||||
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KI], value);
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KI], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_PITCHATTITUDEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ROLLPITCHRATEKP:
|
case TXPIDSETTINGS_PIDS_ROLLPITCHRATEKP:
|
||||||
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KP], value);
|
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KP], value);
|
||||||
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KP], value);
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KP], value);
|
||||||
@ -226,6 +238,10 @@ static void updatePIDs(UAVObjEvent* ev)
|
|||||||
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KD], value);
|
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_KD], value);
|
||||||
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KD], value);
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_KD], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_ROLLPITCHRATEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.RollRatePID[STABILIZATIONSETTINGS_ROLLRATEPID_ILIMIT], value);
|
||||||
|
needsUpdate |= update(&stab.PitchRatePID[STABILIZATIONSETTINGS_PITCHRATEPID_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ROLLPITCHATTITUDEKP:
|
case TXPIDSETTINGS_PIDS_ROLLPITCHATTITUDEKP:
|
||||||
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KP], value);
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KP], value);
|
||||||
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KP], value);
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KP], value);
|
||||||
@ -234,6 +250,10 @@ static void updatePIDs(UAVObjEvent* ev)
|
|||||||
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KI], value);
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_KI], value);
|
||||||
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KI], value);
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_KI], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_ROLLPITCHATTITUDEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.RollPI[STABILIZATIONSETTINGS_ROLLPI_ILIMIT], value);
|
||||||
|
needsUpdate |= update(&stab.PitchPI[STABILIZATIONSETTINGS_PITCHPI_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_YAWRATEKP:
|
case TXPIDSETTINGS_PIDS_YAWRATEKP:
|
||||||
needsUpdate |= update(&stab.YawRatePID[STABILIZATIONSETTINGS_YAWRATEPID_KP], value);
|
needsUpdate |= update(&stab.YawRatePID[STABILIZATIONSETTINGS_YAWRATEPID_KP], value);
|
||||||
break;
|
break;
|
||||||
@ -243,12 +263,18 @@ static void updatePIDs(UAVObjEvent* ev)
|
|||||||
case TXPIDSETTINGS_PIDS_YAWRATEKD:
|
case TXPIDSETTINGS_PIDS_YAWRATEKD:
|
||||||
needsUpdate |= update(&stab.YawRatePID[STABILIZATIONSETTINGS_YAWRATEPID_KD], value);
|
needsUpdate |= update(&stab.YawRatePID[STABILIZATIONSETTINGS_YAWRATEPID_KD], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_YAWRATEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.YawRatePID[STABILIZATIONSETTINGS_YAWRATEPID_ILIMIT], value);
|
||||||
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_YAWATTITUDEKP:
|
case TXPIDSETTINGS_PIDS_YAWATTITUDEKP:
|
||||||
needsUpdate |= update(&stab.YawPI[STABILIZATIONSETTINGS_YAWPI_KP], value);
|
needsUpdate |= update(&stab.YawPI[STABILIZATIONSETTINGS_YAWPI_KP], value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_YAWATTITUDEKI:
|
case TXPIDSETTINGS_PIDS_YAWATTITUDEKI:
|
||||||
needsUpdate |= update(&stab.YawPI[STABILIZATIONSETTINGS_YAWPI_KI], value);
|
needsUpdate |= update(&stab.YawPI[STABILIZATIONSETTINGS_YAWPI_KI], value);
|
||||||
break;
|
break;
|
||||||
|
case TXPIDSETTINGS_PIDS_YAWATTITUDEILIMIT:
|
||||||
|
needsUpdate |= update(&stab.YawPI[STABILIZATIONSETTINGS_YAWPI_ILIMIT], value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,10 @@
|
|||||||
Roll Rate.Kp, Pitch Rate.Kp, Roll+Pitch Rate.Kp, Yaw Rate.Kp,
|
Roll Rate.Kp, Pitch Rate.Kp, Roll+Pitch Rate.Kp, Yaw Rate.Kp,
|
||||||
Roll Rate.Ki, Pitch Rate.Ki, Roll+Pitch Rate.Ki, Yaw Rate.Ki,
|
Roll Rate.Ki, Pitch Rate.Ki, Roll+Pitch Rate.Ki, Yaw Rate.Ki,
|
||||||
Roll Rate.Kd, Pitch Rate.Kd, Roll+Pitch Rate.Kd, Yaw Rate.Kd,
|
Roll Rate.Kd, Pitch Rate.Kd, Roll+Pitch Rate.Kd, Yaw Rate.Kd,
|
||||||
|
Roll Rate.ILimit, Pitch Rate.ILimit, Roll+Pitch Rate.ILimit, Yaw Rate.ILimit,
|
||||||
Roll Attitude.Kp, Pitch Attitude.Kp, Roll+Pitch Attitude.Kp, Yaw Attitude.Kp,
|
Roll Attitude.Kp, Pitch Attitude.Kp, Roll+Pitch Attitude.Kp, Yaw Attitude.Kp,
|
||||||
Roll Attitude.Ki, Pitch Attitude.Ki, Roll+Pitch Attitude.Ki, Yaw Attitude.Ki"
|
Roll Attitude.Ki, Pitch Attitude.Ki, Roll+Pitch Attitude.Ki, Yaw Attitude.Ki,
|
||||||
|
Roll Attitude.ILimit, Pitch Attitude.ILimit, Roll+Pitch Attitude.ILimit, Yaw Attitude.ILimit"
|
||||||
defaultvalue="Disabled"/>
|
defaultvalue="Disabled"/>
|
||||||
<field name="MinPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
<field name="MinPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
||||||
<field name="MaxPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
<field name="MaxPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user