Rev 127 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 127 | Rev 135 | ||
---|---|---|---|
Line 200... | Line 200... | ||
200 | //------------------------------------------------------------------------------ |
200 | //------------------------------------------------------------------------------ |
201 | if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
201 | if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
202 | if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
202 | if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
203 | if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
203 | if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
204 | if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
204 | if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
205 | if(Poti5 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI5]] + 110) Poti5++; else if(Poti5 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI5]] + 110 && Poti5) Poti5--; |
205 | if(Poti5 < PPM_in[9] + 110) Poti5++; else if(Poti5 > PPM_in[9] + 110 && Poti5) Poti5--; |
206 | if(Poti6 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI6]] + 110) Poti6++; else if(Poti6 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI6]] + 110 && Poti6) Poti6--; |
206 | if(Poti6 < PPM_in[10] + 110) Poti6++; else if(Poti6 > PPM_in[10] + 110 && Poti6) Poti6--; |
207 | if(Poti7 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI7]] + 110) Poti7++; else if(Poti7 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI7]] + 110 && Poti7) Poti7--; |
207 | if(Poti7 < PPM_in[11] + 110) Poti7++; else if(Poti7 > PPM_in[11] + 110 && Poti7) Poti7--; |
208 | if(Poti8 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI8]] + 110) Poti8++; else if(Poti8 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI8]] + 110 && Poti8) Poti8--; |
208 | if(Poti8 < PPM_in[12] + 110) Poti8++; else if(Poti8 > PPM_in[12] + 110 && Poti8) Poti8--; |
Line 209... | Line 209... | ||
209 | 209 | ||
210 | 210 | ||
211 | if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
211 | if(Poti1 < 0) Poti1 = 0; else if(Poti1 > 255) Poti1 = 255; |
Line 241... | Line 241... | ||
241 | ANALOG_ON; |
241 | ANALOG_ON; |
242 | if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
242 | if(Poti1 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110) Poti1++; else if(Poti1 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]] + 110 && Poti1) Poti1--; |
243 | if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
243 | if(Poti2 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110) Poti2++; else if(Poti2 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] + 110 && Poti2) Poti2--; |
244 | if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
244 | if(Poti3 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110) Poti3++; else if(Poti3 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] + 110 && Poti3) Poti3--; |
245 | if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
245 | if(Poti4 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110) Poti4++; else if(Poti4 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]] + 110 && Poti4) Poti4--; |
246 | if(Poti5 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI5]] + 110) Poti5++; else if(Poti5 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI5]] + 110 && Poti5) Poti5--; |
246 | if(Poti5 < PPM_in[9] + 110) Poti5++; else if(Poti5 > PPM_in[9] + 110 && Poti5) Poti5--; |
247 | if(Poti6 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI6]] + 110) Poti6++; else if(Poti6 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI6]] + 110 && Poti6) Poti6--; |
247 | if(Poti6 < PPM_in[10] + 110) Poti6++; else if(Poti6 > PPM_in[10] + 110 && Poti6) Poti6--; |
248 | if(Poti7 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI7]] + 110) Poti7++; else if(Poti7 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI7]] + 110 && Poti7) Poti7--; |
248 | if(Poti7 < PPM_in[11] + 110) Poti7++; else if(Poti7 > PPM_in[11] + 110 && Poti7) Poti7--; |
249 | if(Poti8 < PPM_in[EE_Parameter.Kanalbelegung[K_POTI8]] + 110) Poti8++; else if(Poti8 > PPM_in[EE_Parameter.Kanalbelegung[K_POTI8]] + 110 && Poti8) Poti8--; |
249 | if(Poti8 < PPM_in[12] + 110) Poti8++; else if(Poti8 > PPM_in[12] + 110 && Poti8) Poti8--; |
Line 250... | Line 250... | ||
250 | 250 | ||
Line 276... | Line 276... | ||
276 | if(MotorTest[1]) Motor_Hinten = MotorTest[1]; |
276 | if(MotorTest[1]) Motor_Hinten = MotorTest[1]; |
277 | if(MotorTest[2]) Motor_Links = MotorTest[2]; |
277 | if(MotorTest[2]) Motor_Links = MotorTest[2]; |
278 | if(MotorTest[3]) Motor_Rechts = MotorTest[3]; |
278 | if(MotorTest[3]) Motor_Rechts = MotorTest[3]; |
279 | } |
279 | } |
Line 280... | Line 280... | ||
280 | 280 | ||
281 | DebugOut.Analog[12] = Motor_Vorne; |
281 | // DebugOut.Analog[12] = Motor_Vorne; |
282 | DebugOut.Analog[13] = Motor_Hinten; |
282 | // DebugOut.Analog[13] = Motor_Hinten; |
283 | DebugOut.Analog[14] = Motor_Links; |
283 | // DebugOut.Analog[14] = Motor_Links; |
Line 284... | Line 284... | ||
284 | DebugOut.Analog[15] = Motor_Rechts; |
284 | // DebugOut.Analog[15] = Motor_Rechts; |
285 | 285 | ||
286 | //Start I2C Interrupt Mode |
286 | //Start I2C Interrupt Mode |
287 | twi_state = 0; |
287 | twi_state = 0; |
Line 702... | Line 702... | ||
702 | { |
702 | { |
703 | TimerWerteausgabe = 49; |
703 | TimerWerteausgabe = 49; |
704 | // DebugOut.Analog[0] = MesswertNick; |
704 | // DebugOut.Analog[0] = MesswertNick; |
705 | // DebugOut.Analog[1] = MesswertRoll; |
705 | // DebugOut.Analog[1] = MesswertRoll; |
706 | // DebugOut.Analog[2] = MesswertGier; |
706 | // DebugOut.Analog[2] = MesswertGier; |
707 | DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor; |
707 | DebugOut.Analog[0] = Poti1; |
708 | DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor; |
708 | DebugOut.Analog[1] = Poti2; |
709 | DebugOut.Analog[2] = Mittelwert_AccNick; |
709 | DebugOut.Analog[2] = Poti3; |
710 | DebugOut.Analog[3] = Mittelwert_AccRoll; |
710 | DebugOut.Analog[3] = Poti4; |
711 | DebugOut.Analog[4] = MesswertGier; |
711 | DebugOut.Analog[4] = Poti5; |
712 | DebugOut.Analog[5] = HoehenWert; |
712 | DebugOut.Analog[5] = Poti6; |
713 | DebugOut.Analog[6] = (Mess_Integral_Hoch / 512); |
713 | DebugOut.Analog[6] = Poti7; |
714 | DebugOut.Analog[7] = GasMischanteil; |
714 | DebugOut.Analog[7] = Poti8; |
715 | DebugOut.Analog[8] = KompassValue; |
715 | // DebugOut.Analog[8] = PPM_in[12]; |
716 | // DebugOut.Analog[9] = SollHoehe; |
716 | // DebugOut.Analog[9] = PPM_in[13]; |
717 | // DebugOut.Analog[10] = Mess_Integral_Gier / 128; |
717 | // DebugOut.Analog[10] = EE_Parameter.Kanalbelegung[K_POTI5]; |
718 | // DebugOut.Analog[11] = KompassStartwert; |
718 | // DebugOut.Analog[11] = EE_Parameter.Kanalbelegung[K_POTI6]; |
719 | // DebugOut.Analog[10] = Parameter_Gyro_I; |
719 | // DebugOut.Analog[12] = EE_Parameter.Kanalbelegung[K_POTI7]; |
720 | // DebugOut.Analog[10] = EE_Parameter.Gyro_I; |
720 | // DebugOut.Analog[13] = EE_Parameter.Kanalbelegung[K_POTI8]; |
721 | // DebugOut.Analog[9] = KompassRichtung; |
721 | // DebugOut.Analog[14] = EE_Parameter.Kanalbelegung[K_POTI4]; |
722 | // DebugOut.Analog[10] = GasMischanteil; |
722 | // DebugOut.Analog[10] = GasMischanteil; |
723 | // DebugOut.Analog[3] = HoeheD * 32; |
723 | // DebugOut.Analog[3] = HoeheD * 32; |
724 | // DebugOut.Analog[4] = hoehenregler; |
724 | // DebugOut.Analog[4] = hoehenregler; |
725 | } |
725 | } |