Rev 2388 | Rev 2403 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2388 | Rev 2390 | ||
---|---|---|---|
Line 95... | Line 95... | ||
95 | unsigned char SpeakHoTT = SPEAK_MIKROKOPTER; |
95 | unsigned char SpeakHoTT = SPEAK_MIKROKOPTER; |
96 | unsigned char ToNC_SpeakHoTT = 0, ShowSettingNameTime = 0; |
96 | unsigned char ToNC_SpeakHoTT = 0, ShowSettingNameTime = 0; |
97 | int HoTTVarioMeter = 0; |
97 | int HoTTVarioMeter = 0; |
98 | const char PROGMEM MIKROKOPTER[] = {" MikroKopter "}; |
98 | const char PROGMEM MIKROKOPTER[] = {" MikroKopter "}; |
99 | const char PROGMEM UNDERVOLTAGE[] = {" !! LiPo voltage !! "}; |
99 | const char PROGMEM UNDERVOLTAGE[] = {" !! LiPo voltage !! "}; |
- | 100 | const char PROGMEM LANDING[] = {" !! LANDING !! "}; |
|
100 | const char PROGMEM SETTING[] = {"Set :"}; |
101 | const char PROGMEM SETTING[] = {"Set :"}; |
101 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
102 | const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] = |
102 | { |
103 | { |
103 | //0123456789123456 |
104 | //0123456789123456 |
104 | "No Error \0", // 0 |
105 | "No Error \0", // 0 |
Line 207... | Line 208... | ||
207 | unsigned char status = 0; |
208 | unsigned char status = 0; |
208 | static char old_status = 0; |
209 | static char old_status = 0; |
209 | static int repeat; |
210 | static int repeat; |
210 | //if(Parameter_UserParam1) return(Parameter_UserParam1); |
211 | //if(Parameter_UserParam1) return(Parameter_UserParam1); |
211 | ToNC_SpeakHoTT = SpeakHoTT; |
212 | ToNC_SpeakHoTT = SpeakHoTT; |
212 | if(FC_StatusFlags & FC_STATUS_LOWBAT) status = VOICE_MINIMALE_EINGANSSPANNUNG; |
213 | if(FC_StatusFlags & FC_STATUS_LOWBAT) |
- | 214 | { |
|
- | 215 | if(LowVoltageLandingActive && (EE_Parameter.Receiver == RECEIVER_HOTT)) status = SPEAK_LANDING; |
|
- | 216 | else status = VOICE_MINIMALE_EINGANSSPANNUNG; // Jeti hat kein wort: "LANDEN" |
|
- | 217 | } |
|
213 | else |
218 | else |
214 | if(NC_ErrorCode && NC_ErrorCode+1 < MAX_ERR_NUMBER) // Fehlercodes |
219 | if(NC_ErrorCode && NC_ErrorCode+1 < MAX_ERR_NUMBER) // Fehlercodes |
215 | { |
220 | { |
216 | if(MotorenEin || !pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][1])) status = pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][0]); |
221 | if(MotorenEin || !pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][1])) status = pgm_read_byte(&HOTT_ERROR[NC_ErrorCode][0]); |
217 | } |
222 | } |
Line 221... | Line 226... | ||
221 | if(!(EE_Parameter.GlobalConfig3 & CFG3_SPEAK_ALL)) SpeakHoTT = 0; // is the voice wanted? |
226 | if(!(EE_Parameter.GlobalConfig3 & CFG3_SPEAK_ALL)) SpeakHoTT = 0; // is the voice wanted? |
222 | else status = SpeakHoTT; |
227 | else status = SpeakHoTT; |
223 | } |
228 | } |
224 | else ToNC_SpeakHoTT = status; |
229 | else ToNC_SpeakHoTT = status; |
Line 225... | Line 230... | ||
225 | 230 | ||
226 | if(old_status == status) // Gleichen Fehler nur alle 5 sek bringen |
231 | if(old_status == status) // Gleichen Fehler nur alle 4 sek bringen |
227 | { |
232 | { |
228 | if(!CheckDelay(repeat)) return(0); |
233 | if(!CheckDelay(repeat)) return(0); |
229 | repeat = SetDelay(5000); |
234 | repeat = SetDelay(4000); |
230 | } |
235 | } |
Line 231... | Line 236... | ||
231 | else repeat = SetDelay(2000); |
236 | else repeat = SetDelay(2000); |
232 | 237 | ||
Line 345... | Line 350... | ||
345 | for(i=0; i<16;i++) VarioPacket.Text[i+3] = pgm_read_byte(&NC_ERROR_TEXT[NC_ErrorCode][i]); |
350 | for(i=0; i<16;i++) VarioPacket.Text[i+3] = pgm_read_byte(&NC_ERROR_TEXT[NC_ErrorCode][i]); |
346 | VarioPacket.Text[19] = ' '; |
351 | VarioPacket.Text[19] = ' '; |
347 | VarioPacket.Text[20] = ' '; |
352 | VarioPacket.Text[20] = ' '; |
348 | } |
353 | } |
349 | else |
354 | else |
- | 355 | if(LowVoltageLandingActive) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&LANDING[i]); // no Error |
|
- | 356 | else |
|
350 | if(FC_StatusFlags & FC_STATUS_LOWBAT) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&UNDERVOLTAGE[i]); // no Error |
357 | if(FC_StatusFlags & FC_STATUS_LOWBAT) for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&UNDERVOLTAGE[i]); // no Error |
351 | else |
358 | else |
352 | if(ShowSettingNameTime) // no Error |
359 | if(ShowSettingNameTime) // no Error |
353 | { |
360 | { |
354 | for(i=0; i<sizeof(SETTING);i++) VarioPacket.Text[i] = pgm_read_byte(&SETTING[i]); |
361 | for(i=0; i<sizeof(SETTING);i++) VarioPacket.Text[i] = pgm_read_byte(&SETTING[i]); |