Rev 2408 | Rev 2418 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2408 | Rev 2416 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
52 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
53 | #include "main.h" |
53 | #include "main.h" |
54 | unsigned char DisableRcOffBeeping = 0; |
54 | unsigned char DisableRcOffBeeping = 0; |
55 | unsigned char PlatinenVersion = 10; |
55 | unsigned char PlatinenVersion = 10; |
56 | unsigned char BattLowVoltageWarning = 94; |
56 | unsigned char BattLowVoltageWarning = 94; |
- | 57 | unsigned char BattAutoLandingVoltage = 0, BattComingHomeVoltage = 0; |
|
57 | unsigned int FlugMinuten = 0,FlugMinutenGesamt = 0; |
58 | unsigned int FlugMinuten = 0,FlugMinutenGesamt = 0; |
58 | unsigned int FlugSekunden = 0; |
59 | unsigned int FlugSekunden = 0; |
59 | pVoidFnct_pVoidFnctChar_const_fmt _printf_P; |
60 | pVoidFnct_pVoidFnctChar_const_fmt _printf_P; |
60 | unsigned char FoundMotors = 0; |
61 | unsigned char FoundMotors = 0; |
61 | unsigned char JetiBeep = 0; // to allow any Morse-Beeping of the Jeti-Box |
62 | unsigned char JetiBeep = 0; // to allow any Morse-Beeping of the Jeti-Box |
Line 91... | Line 92... | ||
91 | #define MAX_CELL_VOLTAGE 43 // max cell voltage for LiPO |
92 | #define MAX_CELL_VOLTAGE 43 // max cell voltage for LiPO |
92 | if(print) |
93 | if(print) |
93 | { |
94 | { |
94 | printf("\n\rBatt:"); |
95 | printf("\n\rBatt:"); |
95 | LipoCells = 1 + UBat / MAX_CELL_VOLTAGE; |
96 | LipoCells = 1 + UBat / MAX_CELL_VOLTAGE; |
- | 97 | if(LipoCells > 6) LipoCells = 6; |
|
96 | } |
98 | } |
- | 99 | ||
97 | if(EE_Parameter.UnterspannungsWarnung < 50) |
100 | if(EE_Parameter.UnterspannungsWarnung < 50) |
98 | { |
101 | { |
99 | BattLowVoltageWarning = LipoCells * EE_Parameter.UnterspannungsWarnung; |
102 | BattLowVoltageWarning = LipoCells * EE_Parameter.UnterspannungsWarnung; |
100 | if(print) |
103 | if(print) |
101 | { |
104 | { |
Line 104... | Line 107... | ||
104 | } |
107 | } |
105 | } |
108 | } |
106 | else BattLowVoltageWarning = EE_Parameter.UnterspannungsWarnung; |
109 | else BattLowVoltageWarning = EE_Parameter.UnterspannungsWarnung; |
Line 107... | Line 110... | ||
107 | 110 | ||
108 | // automatische Zellenerkennung |
111 | // automatische Zellenerkennung |
109 | if(EE_Parameter.AutoLandingVoltage < 50) EE_Parameter.AutoLandingVoltage = LipoCells * EE_Parameter.AutoLandingVoltage; |
112 | if(EE_Parameter.AutoLandingVoltage < 50) BattAutoLandingVoltage = LipoCells * EE_Parameter.AutoLandingVoltage; else BattAutoLandingVoltage = EE_Parameter.AutoLandingVoltage; |
Line 110... | Line 113... | ||
110 | if(EE_Parameter.ComingHomeVoltage < 50) EE_Parameter.ComingHomeVoltage = LipoCells * EE_Parameter.ComingHomeVoltage; |
113 | if(EE_Parameter.ComingHomeVoltage < 50) BattComingHomeVoltage = LipoCells * EE_Parameter.ComingHomeVoltage; else BattComingHomeVoltage = EE_Parameter.ComingHomeVoltage; |
111 | 114 | ||
112 | if(EE_Parameter.AutoLandingVoltage > BattLowVoltageWarning) EE_Parameter.AutoLandingVoltage = BattLowVoltageWarning - 1; |
115 | if(BattAutoLandingVoltage > BattLowVoltageWarning) BattAutoLandingVoltage = BattLowVoltageWarning - 1; |
Line 113... | Line 116... | ||
113 | if(EE_Parameter.ComingHomeVoltage >= BattLowVoltageWarning) EE_Parameter.ComingHomeVoltage = BattLowVoltageWarning - 1; |
116 | if(BattComingHomeVoltage >= BattLowVoltageWarning) BattComingHomeVoltage = BattLowVoltageWarning - 1; |
114 | if(EE_Parameter.AutoLandingVoltage >= EE_Parameter.ComingHomeVoltage) EE_Parameter.AutoLandingVoltage = EE_Parameter.ComingHomeVoltage - 1; |
117 | if(BattAutoLandingVoltage >= BattComingHomeVoltage && EE_Parameter.ComingHomeVoltage) BattAutoLandingVoltage = BattComingHomeVoltage - 1; |
115 | 118 | ||
116 | if(print) |
119 | if(print) |
117 | { |
120 | { |
118 | printf(" Low warning: %d.%dV",BattLowVoltageWarning/10,BattLowVoltageWarning%10); |
121 | printf(" Low warning: %d.%dV",BattLowVoltageWarning/10,BattLowVoltageWarning%10); |
- | 122 | if(BattComingHomeVoltage) printf(" Auto-CH: %d.%dV",BattComingHomeVoltage/10,BattComingHomeVoltage%10); |
|
119 | if(EE_Parameter.ComingHomeVoltage) printf(" Auto-CH: %d.%dV",EE_Parameter.ComingHomeVoltage/10,EE_Parameter.ComingHomeVoltage%10); |
123 | if(BattAutoLandingVoltage) printf(" Autolanding: %d.%dV",BattAutoLandingVoltage/10,BattAutoLandingVoltage%10); |
Line 120... | Line 124... | ||
120 | if(EE_Parameter.AutoLandingVoltage) printf(" Autolanding: %d.%dV",EE_Parameter.AutoLandingVoltage/10,EE_Parameter.AutoLandingVoltage%10); |
124 | } |
121 | } |
125 | |
122 | } |
126 | } |