Rev 1932 | Rev 1936 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1932 | Rev 1933 | ||
---|---|---|---|
Line 564... | Line 564... | ||
564 | { |
564 | { |
565 | unsigned char tmp,i; |
565 | unsigned char tmp,i; |
566 | for(i=0;i<8;i++) |
566 | for(i=0;i<8;i++) |
567 | { |
567 | { |
568 | int tmp2; |
568 | int tmp2; |
569 | tmp2 = PPM_in[EE_Parameter.Kanalbelegung[K_POTI1 + i]] + 127; |
569 | tmp = EE_Parameter.Kanalbelegung[K_POTI1 + i]; |
- | 570 | tmp2 = PPM_in[tmp] + 127; |
|
570 | if(tmp2 > 255) tmp2 = 255; else if(tmp2 < 0) tmp2 = 0; |
571 | if(tmp2 > 255) tmp2 = 255; else if(tmp2 < 0) tmp2 = 0; |
- | 572 | ||
- | 573 | if(tmp == 25) Poti[i] = tmp2; // 25 = WaypointEvent channel -> no filter |
|
- | 574 | else |
|
571 | if(tmp2 != Poti[i]) |
575 | if(tmp2 != Poti[i]) |
572 | { |
576 | { |
573 | Poti[i] += (tmp2 - Poti[i]) / 4; |
577 | Poti[i] += (tmp2 - Poti[i]) / 4; |
574 | if(Poti[i] > tmp2) Poti[i]--; |
578 | if(Poti[i] > tmp2) Poti[i]--; |
575 | else Poti[i]++; |
579 | else Poti[i]++; |
576 | } |
580 | } |
577 | } |
581 | } |
578 | CHK_POTI_MM(Parameter_Luftdruck_D,EE_Parameter.Luftdruck_D,0,100); |
582 | CHK_POTI_MM(Parameter_Luftdruck_D,EE_Parameter.Luftdruck_D,0,100); |
579 | CHK_POTI_MM(Parameter_Hoehe_P,EE_Parameter.Hoehe_P,0,100); |
583 | CHK_POTI_MM(Parameter_Hoehe_P,EE_Parameter.Hoehe_P,0,100); |
580 | CHK_POTI_MM(Parameter_Gyro_P,EE_Parameter.Gyro_P,10,255); |
584 | CHK_POTI_MM(Parameter_Gyro_P,EE_Parameter.Gyro_P,10,255); |
581 | CHK_POTI_MM(Parameter_J16Timing,EE_Parameter.J16Timing,1,255); |
585 | CHK_POTI_MM(Parameter_J16Timing,EE_Parameter.J16Timing,5,255); |
582 | CHK_POTI_MM(Parameter_J17Timing,EE_Parameter.J17Timing,1,255); |
586 | CHK_POTI_MM(Parameter_J17Timing,EE_Parameter.J17Timing,5,255); |
583 | CHK_POTI(Parameter_Servo3,EE_Parameter.Servo3); |
587 | CHK_POTI(Parameter_Servo3,EE_Parameter.Servo3); |
584 | CHK_POTI(Parameter_Servo4,EE_Parameter.Servo4); |
588 | CHK_POTI(Parameter_Servo4,EE_Parameter.Servo4); |
585 | CHK_POTI(Parameter_Servo5,EE_Parameter.Servo5); |
589 | CHK_POTI(Parameter_Servo5,EE_Parameter.Servo5); |
586 | CHK_POTI(Parameter_HoehenSchalter,EE_Parameter.MaxHoehe); |
590 | CHK_POTI(Parameter_HoehenSchalter,EE_Parameter.MaxHoehe); |
587 | CHK_POTI(Parameter_Hoehe_ACC_Wirkung,EE_Parameter.Hoehe_ACC_Wirkung); |
591 | CHK_POTI(Parameter_Hoehe_ACC_Wirkung,EE_Parameter.Hoehe_ACC_Wirkung); |
Line 878... | Line 882... | ||
878 | 882 | ||
Line 879... | Line 883... | ||
879 | if(GPS_AidMode) { StickNick /= 2; StickRoll /= 2; };// in that case the GPS controls stronger |
883 | if(GPS_AidMode) { StickNick /= 2; StickRoll /= 2; };// in that case the GPS controls stronger |
880 | 884 | ||
881 | StickNick -= GPS_Nick; |
885 | StickNick -= GPS_Nick; |
Line 882... | Line 886... | ||
882 | StickRoll -= GPS_Roll; |
886 | StickRoll -= GPS_Roll; |
883 | StickGas = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 120; |
887 | StickGas = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 127; |
884 | 888 | ||
885 | GyroFaktor = (Parameter_Gyro_P + 10.0); |
889 | GyroFaktor = (Parameter_Gyro_P + 10.0); |