Rev 1942 | Rev 1944 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1942 | Rev 1943 | ||
---|---|---|---|
Line 92... | Line 92... | ||
92 | int GierGyroFehler = 0; |
92 | int GierGyroFehler = 0; |
93 | char GyroFaktor,GyroFaktorGier; |
93 | char GyroFaktor,GyroFaktorGier; |
94 | char IntegralFaktor,IntegralFaktorGier; |
94 | char IntegralFaktor,IntegralFaktorGier; |
95 | int DiffNick,DiffRoll; |
95 | int DiffNick,DiffRoll; |
96 | int StickGasHover = 120, HoverGasMin = 0, HoverGasMax = 1023; |
96 | int StickGasHover = 120, HoverGasMin = 0, HoverGasMax = 1023; |
- | 97 | int StickNick = 0,StickRoll = 0,StickGier = 0,StickGas = 0; |
|
97 | //int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0, Poti5 = 0, Poti6 = 0, Poti7 = 0, Poti8 = 0; |
98 | //int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0, Poti5 = 0, Poti6 = 0, Poti7 = 0, Poti8 = 0; |
98 | unsigned char Poti[9] = {0,0,0,0,0,0,0,0}; |
99 | unsigned char Poti[9] = {0,0,0,0,0,0,0,0}; |
99 | volatile unsigned char SenderOkay = 0; |
100 | volatile unsigned char SenderOkay = 0; |
100 | int StickNick = 0,StickRoll = 0,StickGier = 0,StickGas = 0; |
- | |
101 | char MotorenEin = 0,StartTrigger = 0; |
101 | char MotorenEin = 0,StartTrigger = 0; |
102 | long HoehenWert = 0; |
102 | long HoehenWert = 0; |
103 | long SollHoehe = 0; |
103 | long SollHoehe = 0; |
104 | signed int AltitudeSetpointTrimming = 0; |
104 | signed int AltitudeSetpointTrimming = 0; |
105 | long FromNC_AltitudeSetpoint = 0; |
105 | long FromNC_AltitudeSetpoint = 0; |
Line 206... | Line 206... | ||
206 | DebugOut.Analog[27] = KompassSollWert; |
206 | DebugOut.Analog[27] = KompassSollWert; |
207 | DebugOut.Analog[29] = Capacity.MinOfMaxPWM; |
207 | DebugOut.Analog[29] = Capacity.MinOfMaxPWM; |
208 | DebugOut.Analog[30] = GPS_Nick; |
208 | DebugOut.Analog[30] = GPS_Nick; |
209 | DebugOut.Analog[31] = GPS_Roll; |
209 | DebugOut.Analog[31] = GPS_Roll; |
210 | if(VersionInfo.HardwareError[0] || VersionInfo.HardwareError[1]) DebugOut.Status[1] |= 1; else DebugOut.Status[1] &= 0xfe; |
210 | if(VersionInfo.HardwareError[0] || VersionInfo.HardwareError[1]) DebugOut.Status[1] |= 1; else DebugOut.Status[1] &= 0xfe; |
211 | - | ||
212 | DebugOut.Analog[16] = AltitudeSetpointTrimming; |
- | |
213 | DebugOut.Analog[17] = ElectricAirPacket.m_sec; |
- | |
214 | } |
211 | } |
Line 215... | Line 212... | ||
215 | 212 | ||
Line 1461... | Line 1458... | ||
1461 | { |
1458 | { |
1462 | // alternative height control |
1459 | // alternative height control |
1463 | // PD-Control with respect to hoover point |
1460 | // PD-Control with respect to hoover point |
1464 | // the thrust loss out of horizontal attitude is compensated |
1461 | // the thrust loss out of horizontal attitude is compensated |
1465 | // the setpoint will be fine adjusted with the gas stick position |
1462 | // the setpoint will be fine adjusted with the gas stick position |
1466 | if(1 || FC_StatusFlags & FC_STATUS_FLY) // trim setpoint only when flying |
1463 | if(FC_StatusFlags & FC_STATUS_FLY) // trim setpoint only when flying |
1467 | { // gas stick is above hoover point |
1464 | { // gas stick is above hoover point |
1468 | if(StickGas > (StickGasHover + HEIGHT_CONTROL_STICKTHRESHOLD) && !BaroAtUpperLimit) |
1465 | if(StickGas > (StickGasHover + HEIGHT_CONTROL_STICKTHRESHOLD) && !BaroAtUpperLimit) |
1469 | { |
1466 | { |
1470 | if(FC_StatusFlags & FC_STATUS_VARIO_TRIM_DOWN) |
1467 | if(FC_StatusFlags & FC_STATUS_VARIO_TRIM_DOWN) |
1471 | { |
1468 | { |