Rev 2416 | Rev 2471 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2416 | Rev 2426 | ||
---|---|---|---|
Line 129... | Line 129... | ||
129 | Luftdruck = MessLuftdruck * CalAthmospheare; |
129 | Luftdruck = MessLuftdruck * CalAthmospheare; |
130 | #endif |
130 | #endif |
131 | Delay_ms_Mess(300); |
131 | Delay_ms_Mess(300); |
132 | } |
132 | } |
Line 133... | Line 133... | ||
133 | 133 | ||
134 | 134 | /* |
|
135 | void SucheGyroOffset(void) |
135 | void SucheGyroOffset(void) |
136 | { |
136 | { |
137 | unsigned char i, ready = 0; |
137 | unsigned char i, ready = 0; |
138 | int timeout; |
138 | int timeout; |
Line 154... | Line 154... | ||
154 | while(!AdReady); |
154 | while(!AdReady); |
155 | if(i<10) Delay_ms_Mess(10); |
155 | if(i<10) Delay_ms_Mess(10); |
156 | } |
156 | } |
157 | Delay_ms_Mess(70); |
157 | Delay_ms_Mess(70); |
158 | } |
158 | } |
159 | 159 | */ |
|
160 | /* |
160 | /* |
161 | 0 n |
161 | 0 n |
162 | 1 r |
162 | 1 r |
163 | 2 g |
163 | 2 g |
164 | 3 y |
164 | 3 y |
Line 294... | Line 294... | ||
294 | case 11: |
294 | case 11: |
295 | roll1 += ADC; |
295 | roll1 += ADC; |
296 | kanal = AD_GIER; |
296 | kanal = AD_GIER; |
297 | break; |
297 | break; |
298 | case 12: |
298 | case 12: |
299 | if(PlatinenVersion == 10) AdWertGier = (ADC + gier1 + 1) / 2; |
299 | /* if(PlatinenVersion == 10) AdWertGier = (ADC + gier1 + 1) / 2; |
300 | else |
300 | else |
301 | if(PlatinenVersion >= 20) AdWertGier = 2047 - (ADC + gier1); |
301 | if(PlatinenVersion >= 20) AdWertGier = 2047 - (ADC + gier1); |
302 | else AdWertGier = (ADC + gier1); |
302 | else AdWertGier = (ADC + gier1); |
- | 303 | */ |
|
- | 304 | AdWertGier = 2047 - (ADC + gier1); |
|
303 | kanal = AD_ACC_Y; |
305 | kanal = AD_ACC_Y; |
304 | break; |
306 | break; |
305 | case 13: |
307 | case 13: |
306 | Aktuell_ay = NeutralAccY - ADC; |
308 | Aktuell_ay = NeutralAccY - ADC; |
307 | AdWertAccRoll = (Aktuell_ay + accy); |
309 | AdWertAccRoll = (Aktuell_ay + accy); |
Line 312... | Line 314... | ||
312 | AdWertAccNick = (Aktuell_ax + accx); |
314 | AdWertAccNick = (Aktuell_ax + accx); |
313 | kanal = AD_NICK; |
315 | kanal = AD_NICK; |
314 | break; |
316 | break; |
315 | case 15: |
317 | case 15: |
316 | nick1 += ADC; |
318 | nick1 += ADC; |
317 | if(PlatinenVersion == 10) nick1 *= 2; else nick1 *= 4; |
319 | //if(PlatinenVersion == 10) nick1 *= 2; else |
- | 320 | nick1 *= 4; |
|
318 | AdWertNick = nick1 / 8; |
321 | AdWertNick = nick1 / 8; |
319 | nick_filter = (nick_filter + nick1) / 2; |
322 | nick_filter = (nick_filter + nick1) / 2; |
320 | HiResNick = nick_filter - AdNeutralNick; |
323 | HiResNick = nick_filter - AdNeutralNick; |
321 | AdWertNickFilter = (AdWertNickFilter + HiResNick) / 2; |
324 | AdWertNickFilter = (AdWertNickFilter + HiResNick) / 2; |
322 | kanal = AD_ROLL; |
325 | kanal = AD_ROLL; |
323 | break; |
326 | break; |
324 | case 16: |
327 | case 16: |
325 | roll1 += ADC; |
328 | roll1 += ADC; |
326 | if(PlatinenVersion == 10) roll1 *= 2; else roll1 *= 4; |
329 | //if(PlatinenVersion == 10) roll1 *= 2; else |
- | 330 | roll1 *= 4; |
|
327 | AdWertRoll = roll1 / 8; |
331 | AdWertRoll = roll1 / 8; |
328 | roll_filter = (roll_filter + roll1) / 2; |
332 | roll_filter = (roll_filter + roll1) / 2; |
329 | HiResRoll = roll_filter - AdNeutralRoll; |
333 | HiResRoll = roll_filter - AdNeutralRoll; |
330 | AdWertRollFilter = (AdWertRollFilter + HiResRoll) / 2; |
334 | AdWertRollFilter = (AdWertRollFilter + HiResRoll) / 2; |
331 | kanal = AD_DRUCK; |
335 | kanal = AD_DRUCK; |