Rev 1171 | Rev 1219 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1171 | Rev 1173 | ||
---|---|---|---|
Line 194... | Line 194... | ||
194 | AdWertAccNick = (Aktuell_ax + accx); |
194 | AdWertAccNick = (Aktuell_ax + accx); |
195 | kanal = AD_NICK; |
195 | kanal = AD_NICK; |
196 | break; |
196 | break; |
197 | case 15: |
197 | case 15: |
198 | nick1 += ADC; |
198 | nick1 += ADC; |
- | 199 | if(PlatinenVersion == 10) nick1 *= 2; else nick1 *= 4; |
|
199 | AdWertNick = nick1 / 2; |
200 | AdWertNick = nick1 / 8; |
200 | nick_filter = (nick_filter + 4 * nick1) / 2; |
201 | nick_filter = (nick_filter + nick1) / 2; |
201 | if(PlatinenVersion == 10) { AdWertNick /= 2;nick_filter /=2;} |
- | |
202 | HiResNick = nick_filter - 8 * AdNeutralNick; |
202 | HiResNick = nick_filter - AdNeutralNick; |
203 | AdWertNickFilter = (AdWertNickFilter + HiResNick) / 2; |
203 | AdWertNickFilter = (AdWertNickFilter + HiResNick) / 2; |
204 | // DebugOut.Analog[21] = AdWertNickFilter / 4; |
- | |
205 | kanal = AD_ROLL; |
204 | kanal = AD_ROLL; |
206 | break; |
205 | break; |
207 | case 16: |
206 | case 16: |
208 | roll1 += ADC; |
207 | roll1 += ADC; |
- | 208 | if(PlatinenVersion == 10) roll1 *= 2; else roll1 *= 4; |
|
209 | AdWertRoll = roll1 / 2; |
209 | AdWertRoll = roll1 / 8; |
210 | roll_filter = (roll_filter + 4 * roll1) / 2; |
210 | roll_filter = (roll_filter + roll1) / 2; |
211 | if(PlatinenVersion == 10) { AdWertRoll /= 2;roll_filter /=2;} |
- | |
212 | HiResRoll = roll_filter - 8 * AdNeutralRoll; |
211 | HiResRoll = roll_filter - AdNeutralRoll; |
213 | AdWertRollFilter = (AdWertRollFilter + HiResRoll) / 2; |
212 | AdWertRollFilter = (AdWertRollFilter + HiResRoll) / 2; |
214 | // DebugOut.Analog[22] = AdWertRollFilter / 4; |
- | |
215 | kanal = AD_DRUCK; |
213 | kanal = AD_DRUCK; |
216 | break; |
214 | break; |
217 | case 17: |
215 | case 17: |
218 | state = 0; |
216 | state = 0; |
219 | AdReady = 1; |
217 | AdReady = 1; |
Line 225... | Line 223... | ||
225 | { |
223 | { |
226 | tmpLuftdruck /= 2; |
224 | tmpLuftdruck /= 2; |
227 | MessLuftdruck = ADC; |
225 | MessLuftdruck = ADC; |
228 | messanzahl_Druck = 0; |
226 | messanzahl_Druck = 0; |
229 | HoeheD = (31 * HoeheD + (int) Parameter_Luftdruck_D * (int)(255 * ExpandBaro + StartLuftdruck - tmpLuftdruck - HoehenWert))/32; // D-Anteil = neuerWert - AlterWert |
227 | HoeheD = (31 * HoeheD + (int) Parameter_Luftdruck_D * (int)(255 * ExpandBaro + StartLuftdruck - tmpLuftdruck - HoehenWert))/32; // D-Anteil = neuerWert - AlterWert |
230 | DebugOut.Analog[24] = 255 * ExpandBaro + StartLuftdruck - tmpLuftdruck; |
- | |
231 | DebugOut.Analog[23] = HoeheD; |
- | |
232 | Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8; |
228 | Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8; |
233 | HoehenWert = 255 * ExpandBaro + StartLuftdruck - Luftdruck; |
229 | HoehenWert = 255 * ExpandBaro + StartLuftdruck - Luftdruck; |
234 | tmpLuftdruck /= 2; |
230 | tmpLuftdruck /= 2; |
235 | } |
231 | } |
236 | kanal = AD_NICK; |
232 | kanal = AD_NICK; |