Subversion Repositories FlightCtrl

Rev

Rev 1925 | Rev 1933 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1925 Rev 1930
Line 19... Line 19...
19
#define HoTT_LINKS      123
19
#define HoTT_LINKS      123
20
#define HoTT_RECHTS 124
20
#define HoTT_RECHTS 124
21
#define HoTT_OBEN       125
21
#define HoTT_OBEN       125
22
#define HoTT_UNTEN      126
22
#define HoTT_UNTEN      126
Line -... Line 23...
-
 
23
 
-
 
24
const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17] =
-
 
25
{
-
 
26
//0123456789123456
-
 
27
 "No Error        \0",  // 0
-
 
28
 "Not compatible  \0",  // 1
-
 
29
 "MK3Mag not compa\0",  // 2
-
 
30
 "No FC communicat\0",  // 3
-
 
31
 "MK3Mag communica\0",  // 4
-
 
32
 "GPS communicatio\0",  // 5
-
 
33
 "compass value   \0",  // 6
-
 
34
 "RC Signal lost  \0",  // 7
-
 
35
 "FC spi rx error \0",  // 8
-
 
36
 "No NC communicat\0",  // 9
-
 
37
 "FC Nick Gyro    \0",  // 10
-
 
38
 "FC Roll Gyro    \0",  // 11
-
 
39
 "FC Yaw Gyro     \0",  // 12
-
 
40
 "FC Nick ACC     \0",  // 13
-
 
41
 "FC Roll ACC     \0",  // 14
-
 
42
 "FC Z-ACC        \0",  // 15
-
 
43
 "Pressure sensor \0",  // 16
-
 
44
 "FC I2C          \0",  // 17
-
 
45
 "Bl Missing      \0",  // 18
-
 
46
 "Mixer Error     \0",  // 19
-
 
47
 "Carefree Error  \0"   // 20
Line 23... Line 48...
23
 
48
};
24
 
49
 
25
//---------------------------------------------------------------
50
//---------------------------------------------------------------
26
void Hott_ClearLine(unsigned char line)
51
void Hott_ClearLine(unsigned char line)
Line 30... Line 55...
30
//---------------------------------------------------------------
55
//---------------------------------------------------------------
Line 31... Line 56...
31
 
56
 
32
unsigned char HoTT_Waring(void)
57
unsigned char HoTT_Waring(void)
33
{
58
{
34
  if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG);
59
  if(FC_StatusFlags & FC_STATUS_LOWBAT) return(VOICE_MINIMALE_EINGANSSPANNUNG);
35
  if(MotorenEin && NC_ErrorCode)                return(VOICE_BEEP);
60
  if(/*MotorenEin &&*/ NC_ErrorCode)            return(VOICE_BEEP);
36
  return(0);
61
  return(0);
Line 37... Line 62...
37
}
62
}
38
 
63
 
Line 131... Line 156...
131
                                        HoTT_printfxy(16,4,"DGPS ");
156
                                        HoTT_printfxy(16,4,"DGPS ");
132
                                }
157
                                }
133
                        }
158
                        }
134
                        else
159
                        else
135
                        {                    //012345678901234567890
160
                        {                    //012345678901234567890
136
                                HoTT_printfxy(0,4,"No NaviCtrl!         ");
161
                                HoTT_printfxy(0,4,"   No NaviCtrl       ");
137
                        }
162
                        }
138
                        break;
163
                        break;
139
        case 5:
164
        case 5:
140
                        HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD);
165
                        HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD);
141
                        if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(18,5,"CF") else HoTT_printfxy(18,5,"  ");
166
                        if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy_INV(18,5,"CF") else HoTT_printfxy(18,5,"  ");
Line 146... Line 171...
146
                                if(RequiredMotors == 6)  HoTT_printfxy(0,6,"%3i %3i%cC        ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD)
171
                                if(RequiredMotors == 6)  HoTT_printfxy(0,6,"%3i %3i%cC        ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD)
147
                                else
172
                                else
148
                                if(RequiredMotors > 6)   HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,HoTT_GRAD);
173
                                if(RequiredMotors > 6)   HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,HoTT_GRAD);
149
//HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard);
174
//HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard);
150
                        break;
175
                        break;
-
 
176
        case 7: if(NC_ErrorCode)
-
 
177
                  {
-
 
178
                           if(HoTTBlink && NC_ErrorCode < MAX_ERR_NUMBER)
-
 
179
                            {
-
 
180
                             Hott_ClearLine(7);
151
        case 7: if(NC_ErrorCode) {Hott_ClearLine(7); HoTT_printfxy_BLINK(3,7,"ERROR: %2d ",NC_ErrorCode);}
181
                             HoTT_printfxy_INV(0,7,"ERR: %2d !",NC_ErrorCode);
-
 
182
                            }
-
 
183
                                else
-
 
184
                                {
-
 
185
                                 HoTT_printfxy(0,7,"ERR: ");     _printf_P(&LIBFC_HoTT_Putchar, NC_ERROR_TEXT[NC_ErrorCode] , 0);};
-
 
186
                                }
152
                        else HoTT_printfxy(0,7," www.MikroKopter.de ");
187
                        else HoTT_printfxy(0,7," www.MikroKopter.de ");
153
                        break;
188
                        break;
154
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
189
        case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
155
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
190
                        // ASCIIPacket.WarnBeep = Parameter_UserParam1;
156
        case 9:
191
        case 9: