Rev 2146 | Rev 2230 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2146 | Rev 2191 | ||
---|---|---|---|
Line 174... | Line 174... | ||
174 | signed int KopplungsteilNickRoll,KopplungsteilRollNick; |
174 | signed int KopplungsteilNickRoll,KopplungsteilRollNick; |
175 | signed int tmp_motorwert[MAX_MOTORS]; |
175 | signed int tmp_motorwert[MAX_MOTORS]; |
176 | char VarioCharacter = ' '; |
176 | char VarioCharacter = ' '; |
177 | unsigned int HooverGasEmergencyPercent = 0; // The gas value for Emergency landing |
177 | unsigned int HooverGasEmergencyPercent = 0; // The gas value for Emergency landing |
Line 178... | Line -... | ||
178 | - | ||
179 | #define LIMIT_MIN(value, min) {if(value <= min) value = min;} |
- | |
180 | #define LIMIT_MAX(value, max) {if(value >= max) value = max;} |
- | |
181 | #define LIMIT_MIN_MAX(value, min, max) {if(value <= min) value = min; else if(value >= max) value = max;} |
- | |
Line 182... | Line 178... | ||
182 | 178 | ||
183 | 179 | ||
184 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
180 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
185 | // Debugwerte zuordnen |
181 | // Debugwerte zuordnen |
Line 354... | Line 350... | ||
354 | LED_Init(); |
350 | LED_Init(); |
355 | FC_StatusFlags |= FC_STATUS_CALIBRATE; |
351 | FC_StatusFlags |= FC_STATUS_CALIBRATE; |
356 | FromNaviCtrl_Value.Kalman_K = -1; |
352 | FromNaviCtrl_Value.Kalman_K = -1; |
357 | FromNaviCtrl_Value.Kalman_MaxDrift = 0; |
353 | FromNaviCtrl_Value.Kalman_MaxDrift = 0; |
358 | FromNaviCtrl_Value.Kalman_MaxFusion = 32; |
354 | FromNaviCtrl_Value.Kalman_MaxFusion = 32; |
- | 355 | ||
359 | for(i=0;i<8;i++) |
356 | for(i=0;i<8;i++) |
360 | { |
357 | { |
361 | Poti[i] = PPM_in[EE_Parameter.Kanalbelegung[K_POTI1 + i]] + 127; |
358 | Poti[i] = PPM_in[EE_Parameter.Kanalbelegung[K_POTI1 + i]] + 127; |
362 | } |
359 | } |
363 | SenderOkay = 100; |
360 | SenderOkay = 100; |
364 | if(ServoActive) |
361 | if(ServoActive) |
365 | { |
362 | { |
366 | // HEF4017Reset_ON; |
- | |
367 | DDRD |=0x80; // enable J7 -> Servo signal |
363 | DDRD |=0x80; // enable J7 -> Servo signal |
368 | } |
364 | } |
- | 365 | else NickServoValue = (128 * 4 * 16); // neutral position |
|
Line 369... | Line 366... | ||
369 | 366 | ||
370 | if((AdNeutralNick < 150 * 16) || (AdNeutralNick > 850 * 16)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_NICK; }; |
367 | if((AdNeutralNick < 150 * 16) || (AdNeutralNick > 850 * 16)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_NICK; }; |
371 | if((AdNeutralRoll < 150 * 16) || (AdNeutralRoll > 850 * 16)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_ROLL; }; |
368 | if((AdNeutralRoll < 150 * 16) || (AdNeutralRoll > 850 * 16)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_ROLL; }; |
372 | if((AdNeutralGier < 150 * 2) || (AdNeutralGier > 850 * 2)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_YAW; }; |
369 | if((AdNeutralGier < 150 * 2) || (AdNeutralGier > 850 * 2)) { VersionInfo.HardwareError[0] |= FC_ERROR0_GYRO_YAW; }; |