Rev 592 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 592 | Rev 593 | ||
---|---|---|---|
Line 76... | Line 76... | ||
76 | volatile int KompassRichtung = 0; |
76 | volatile int KompassRichtung = 0; |
77 | unsigned char MAX_GAS,MIN_GAS; |
77 | unsigned char MAX_GAS,MIN_GAS; |
78 | unsigned char Notlandung = 0; |
78 | unsigned char Notlandung = 0; |
79 | unsigned char HoehenReglerAktiv = 0; |
79 | unsigned char HoehenReglerAktiv = 0; |
80 | long Umschlag180Nick = 250000L, Umschlag180Roll = 250000L; |
80 | long Umschlag180Nick = 250000L, Umschlag180Roll = 250000L; |
- | 81 | //-------HF------- |
|
- | 82 | unsigned char LED_Switch = 0; |
|
- | 83 | unsigned char LED_flash = 0; |
|
- | 84 | unsigned char LED_1 = 0; |
|
- | 85 | unsigned char LED_2 = 0; |
|
- | 86 | unsigned char LED_2on = 0; |
|
- | 87 | //-------HF------- |
|
Line 81... | Line 88... | ||
81 | 88 | ||
82 | float GyroFaktor; |
89 | float GyroFaktor; |
83 | float IntegralFaktor; |
90 | float IntegralFaktor; |
84 | volatile int DiffNick,DiffRoll; |
91 | volatile int DiffNick,DiffRoll; |
Line 586... | Line 593... | ||
586 | StickRoll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D; |
593 | StickRoll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D; |
587 | StickGier = -PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
594 | StickGier = -PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
588 | GyroFaktor = ((float)Parameter_Gyro_P + 10.0) / 256.0; |
595 | GyroFaktor = ((float)Parameter_Gyro_P + 10.0) / 256.0; |
589 | IntegralFaktor = ((float) Parameter_Gyro_I) / 44000; |
596 | IntegralFaktor = ((float) Parameter_Gyro_I) / 44000; |
Line -... | Line 597... | ||
- | 597 | ||
- | 598 | //------HF------- LEDs Schalten - LED1 Normal, LED2 Blitzlicht |
|
- | 599 | LED_Switch = PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]; |
|
- | 600 | if (((LED_Switch > 32) & (LED_Switch < 96)) | (LED_Switch > 160)) LED_2++; else if (LED_2 > 0) LED_2--; |
|
- | 601 | if ((LED_Switch > 96)) LED_1++; else if (LED_1 > 0) LED_1--; |
|
- | 602 | if (LED_1 >= 10) {LED_1 = 10; LED1_ON;} |
|
- | 603 | if (LED_1 <= 1) LED1_OFF; |
|
- | 604 | if (LED_2 >= 10) {LED_2 = 10; LED_2on = 1;} |
|
- | 605 | if (LED_2 <= 1) LED_2on = 0; |
|
- | 606 | if (LED_2on == 1) LED_flash++; |
|
- | 607 | if (LED_flash > 77) LED2_ON; else LED2_OFF; |
|
- | 608 | if (LED_flash > 80) LED_flash = 0; |
|
- | 609 | //------HF------- End LEDs Schalten |
|
590 | 610 | ||
591 | #define KEY_VALUE (Parameter_UserParam1 * 4) //(Poti3 * 8) |
611 | #define KEY_VALUE (Parameter_UserParam1 * 4) //(Poti3 * 8) |
592 | if(DubWiseKeys[1]) beeptime = 10; |
612 | if(DubWiseKeys[1]) beeptime = 10; |
593 | if(DubWiseKeys[1] & DUB_KEY_UP) tmp_int = KEY_VALUE; else |
613 | if(DubWiseKeys[1] & DUB_KEY_UP) tmp_int = KEY_VALUE; else |
594 | if(DubWiseKeys[1] & DUB_KEY_DOWN) tmp_int = -KEY_VALUE; else tmp_int = 0; |
614 | if(DubWiseKeys[1] & DUB_KEY_DOWN) tmp_int = -KEY_VALUE; else tmp_int = 0; |