Subversion Repositories FlightCtrl

Rev

Rev 2026 | Rev 2033 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2026 Rev 2032
Line 38... Line 38...
38
extern VersionInfo_t versionInfo;
38
extern VersionInfo_t versionInfo;
Line 39... Line 39...
39
 
39
 
40
typedef struct {
40
typedef struct {
41
  // IMU
41
  // IMU
42
  /*PMM*/uint8_t gyroP;
-
 
43
  /* P */uint8_t gyroD;
42
  /*PMM*/uint8_t gyroP;
44
  /* P */uint8_t gyroI;
43
  /* P */uint8_t gyroI;
45
  /* P */uint8_t IFactor;
-
 
46
  uint8_t yawIFactor;
44
  /* P */uint8_t gyroD;
Line 47... Line 45...
47
  /* P */uint8_t compassYawEffect;
45
  /* P */uint8_t compassYawEffect;
48
 
46
 
49
  // Control
-
 
50
  /* P */uint8_t externalControl;
-
 
51
 
-
 
52
  /* P */uint8_t axisCoupling1;
-
 
53
  /* P */uint8_t axisCoupling2;
47
  // Control
54
  /* P */uint8_t axisCouplingYawCorrection;
48
  /* P */uint8_t externalControl;
Line 55... Line 49...
55
  /* P */uint8_t dynamicStability;
49
  /* P */uint8_t dynamicStability;
56
  uint8_t maxAccVector;
50
  uint8_t maxAccVector;
-
 
51
 
57
 
52
  // Height control
58
  // Height control
53
  /*PMM*/uint8_t heightP;
59
  /*PMM*/uint8_t heightP;
-
 
Line 60... Line 54...
60
  /*PMM*/uint8_t heightD;
54
  /* P */uint8_t heightI;
Line 61... Line 55...
61
  /* P */uint8_t heightSetting;
55
  /*PMM*/uint8_t heightD;
62
  /* P */uint8_t heightACCEffect;
-
 
63
 
56
  /* P */uint8_t heightSetting;
64
  uint8_t attitudeControl;
57
 
Line 65... Line 58...
65
 
58
  uint8_t attitudeControl;
66
  // The rest...
-
 
67
  /* P */uint8_t userParams[8];
-
 
68
  /*PMM*/uint8_t output0Timing;
59
 
-
 
60
  // The rest...
-
 
61
  /*PMM*/uint8_t output0Timing;
69
  /*PMM*/uint8_t output1Timing;
62
  /*PMM*/uint8_t output1Timing;
Line 70... Line 63...
70
 
63
 
Line 71... Line 64...
71
  uint8_t servoManualControl[2];
64
  uint8_t servoManualControl[2];
Line 118... Line 111...
118
// values above 250 representing poti1 to poti4
111
// values above 250 representing poti1 to poti4
119
typedef struct {
112
typedef struct {
120
  // Global bitflags
113
  // Global bitflags
121
  uint8_t bitConfig;  // see upper defines for bitcoding
114
  uint8_t bitConfig;  // see upper defines for bitcoding
Line 122... Line -...
122
 
-
 
123
  // Height Control
-
 
124
  uint8_t airpressureFilter;
-
 
125
  uint8_t airpressureAccZCorrection;
-
 
126
  uint8_t heightP;
-
 
127
  uint8_t heightD;
-
 
128
  uint8_t heightSetting;
-
 
129
  uint8_t heightControlMaxThrottleChange;
-
 
130
  uint8_t heightSlewRate;
-
 
131
 
-
 
132
  // Attitude Control
-
 
133
  uint8_t attitudeControl;
-
 
134
 
-
 
135
  // Control
-
 
136
  uint8_t stickP;
-
 
137
  uint8_t stickD;
-
 
138
  uint8_t stickYawP;
-
 
139
  uint8_t stickThrottleD;
-
 
140
  uint8_t minThrottle;
-
 
141
  uint8_t maxThrottle;
-
 
142
  uint8_t externalControl; // for serial Control
-
 
143
  uint8_t maxAccVector;
-
 
144
  uint8_t maxControlActivity;
-
 
145
  uint8_t motorSmoothing;
-
 
146
 
115
 
147
  // IMU
116
  // IMU
148
  uint8_t gyroQuadrant;
117
  uint8_t gyroQuadrant;
149
  uint8_t accQuadrant;
118
  uint8_t accQuadrant;
Line 150... Line 119...
150
  uint8_t imuReversedFlags;
119
  uint8_t imuReversedFlags;
151
 
120
 
152
  uint8_t gyroPIDFilterConstant;
121
  uint8_t gyroPIDFilterConstant;
153
  uint8_t gyroATTFilterConstant;
122
  uint8_t gyroATTFilterConstant;
Line 154... Line -...
154
  uint8_t gyroDFilterConstant;
-
 
155
  uint8_t accFilterConstant;
123
  uint8_t gyroDFilterConstant;
156
 
124
  uint8_t accFilterConstant;
157
  uint8_t gyroP;
-
 
158
  uint8_t gyroI;
125
 
159
  uint8_t gyroD;
126
  uint8_t maxAccVector;
160
 
127
  uint8_t maxControlActivity;
Line 161... Line 128...
161
  uint8_t zerothOrderCorrection;
128
  uint8_t zerothOrderCorrection;
162
  uint8_t driftCompDivider; // 1/k  (Koppel_ACC_Wirkung)
129
  uint8_t driftCompDivider; // 1/k  (Koppel_ACC_Wirkung)
163
  uint8_t driftCompLimit;   // limit for gyrodrift compensation
130
  uint8_t driftCompLimit;   // limit for gyrodrift compensation
Line -... Line 131...
-
 
131
 
-
 
132
  uint8_t axisCoupling1; // Value: 0-250  Faktor, mit dem Yaw die Achsen Roll und Nick koppelt (NickRollMitkopplung)
-
 
133
  uint8_t axisCoupling2; // Value: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
-
 
134
  uint8_t axisCouplingYawCorrection;// Value: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
-
 
135
 
-
 
136
  uint8_t levelCorrection[2];
-
 
137
 
-
 
138
  // Control
-
 
139
  uint8_t gyroP;
-
 
140
  uint8_t gyroI;
-
 
141
  uint8_t gyroD;
-
 
142
 
-
 
143
  uint8_t attitudeControl;
-
 
144
  uint8_t stickP;
-
 
145
  uint8_t stickD;
-
 
146
  uint8_t stickYawP;
164
 
147
  uint8_t stickThrottleD;
165
  uint8_t axisCoupling1; // Value: 0-250  Faktor, mit dem Yaw die Achsen Roll und Nick koppelt (NickRollMitkopplung)
148
  uint8_t minThrottle;
166
  uint8_t axisCoupling2; // Value: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
149
  uint8_t maxThrottle;
167
  uint8_t axisCouplingYawCorrection;// Value: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
150
  uint8_t externalControl; // for serial Control
-
 
151
  uint8_t motorSmoothing;
-
 
152
  uint8_t dynamicStability; // PID limit for Attitude controller
-
 
153
  uint8_t IFactor;
-
 
154
  uint8_t yawIFactor;
-
 
155
  uint8_t compassYawEffect;
-
 
156
  uint8_t batteryVoltageWarning;
-
 
157
  uint8_t emergencyThrottle;
-
 
158
  uint8_t emergencyFlightDuration;
-
 
159
 
-
 
160
  // Height Control
168
 
161
  uint8_t airpressureFilter;
-
 
162
  uint8_t airpressureAccZCorrection;
-
 
163
  uint8_t heightP;
-
 
164
  uint8_t heightI;
Line 169... Line 165...
169
  uint8_t dynamicStability; // PID limit for Attitude controller
165
  uint8_t heightD;
170
  uint8_t IFactor;
166
  uint8_t heightSetting;
171
  uint8_t yawIFactor;
167
  uint8_t heightControlMaxIntegralThrottleChange;
172
  uint8_t compassYawEffect;
168
  uint8_t heightControlMaxThrottleChange;
Line 173... Line -...
173
  uint8_t levelCorrection[2];
-
 
174
 
-
 
175
  // Servos
-
 
176
  uint8_t servoCount;
-
 
177
  uint8_t servoManualMaxSpeed;
-
 
178
  servo_t servoConfigurations[2]; // [PITCH, ROLL]
169
  uint8_t heightSlewRate;
179
 
170
 
180
  // Battery warning and emergency flight
171
  // Servos
181
  uint8_t batteryVoltageWarning;
172
  uint8_t servoCount;