mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-1903 Add AccelTau, AccelKp and AccelKi to TxPID
This commit is contained in:
parent
97780a2106
commit
b2dd03cf23
@ -55,6 +55,7 @@
|
||||
#include "accessorydesired.h"
|
||||
#include "manualcontrolcommand.h"
|
||||
#include "stabilizationsettings.h"
|
||||
#include "attitudesettings.h"
|
||||
#ifdef REVOLUTION
|
||||
#include "altitudeholdsettings.h"
|
||||
#endif
|
||||
@ -195,6 +196,10 @@ static void updatePIDs(UAVObjEvent *ev)
|
||||
}
|
||||
StabilizationSettingsData stab;
|
||||
StabilizationSettingsGet(&stab);
|
||||
|
||||
AttitudeSettingsData att;
|
||||
AttitudeSettingsGet(&att);
|
||||
|
||||
#ifdef REVOLUTION
|
||||
AltitudeHoldSettingsData altitude;
|
||||
AltitudeHoldSettingsGet(&altitude);
|
||||
@ -203,6 +208,7 @@ static void updatePIDs(UAVObjEvent *ev)
|
||||
|
||||
uint8_t needsUpdateBank = 0;
|
||||
uint8_t needsUpdateStab = 0;
|
||||
uint8_t needsUpdateAtt = 0;
|
||||
#ifdef REVOLUTION
|
||||
uint8_t needsUpdateAltitude = 0;
|
||||
#endif
|
||||
@ -365,6 +371,16 @@ static void updatePIDs(UAVObjEvent *ev)
|
||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTOR:
|
||||
needsUpdateBank |= update(&bank.AcroInsanityFactor, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACCELTAU:
|
||||
needsUpdateAtt |= update(&att.AccelTau, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACCELKP:
|
||||
needsUpdateAtt |= update(&att.AccelKp, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACCELKI:
|
||||
needsUpdateAtt |= update(&att.AccelKi, value);
|
||||
break;
|
||||
|
||||
#ifdef REVOLUTION
|
||||
case TXPIDSETTINGS_PIDS_ALTITUDEPOSKP:
|
||||
needsUpdateAltitude |= update(&altitude.VerticalPosP, value);
|
||||
@ -390,6 +406,9 @@ static void updatePIDs(UAVObjEvent *ev)
|
||||
if (needsUpdateStab) {
|
||||
StabilizationSettingsSet(&stab);
|
||||
}
|
||||
if (needsUpdateAtt) {
|
||||
AttitudeSettingsSet(&att);
|
||||
}
|
||||
#ifdef REVOLUTION
|
||||
if (needsUpdateAltitude) {
|
||||
AltitudeHoldSettingsSet(&altitude);
|
||||
|
@ -20,7 +20,8 @@
|
||||
Roll+Pitch Attitude.Kp, Roll+Pitch Attitude.Ki, Roll+Pitch Attitude.ILimit, Roll+Pitch Attitude.Resp,
|
||||
Yaw Attitude.Kp, Yaw Attitude.Ki, Yaw Attitude.ILimit, Yaw Attitude.Resp,
|
||||
Roll.Expo, Pitch.Expo, Roll+Pitch.Expo, Yaw.Expo,
|
||||
GyroTau,AcroPlusFactor,Altitude Pos.Kp,Altitude Velocity.Kp,Altitude Velocity.Ki,Altitude Velocity.Kd,Altitude Velocity.Beta"
|
||||
GyroTau,AcroPlusFactor,Altitude Pos.Kp,Altitude Velocity.Kp,Altitude Velocity.Ki,Altitude Velocity.Kd,Altitude Velocity.Beta,
|
||||
AccelTau, AccelKp, AccelKi"
|
||||
defaultvalue="Disabled"/>
|
||||
<field name="MinPID" 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