Rev 1919 | Rev 1921 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1919 | Rev 1920 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #include "printf_P.h" |
2 | #include "printf_P.h" |
3 | #include "main.h" |
3 | #include "main.h" |
4 | #include "spi.h" |
4 | #include "spi.h" |
5 | #include "capacity.h" |
5 | #include "capacity.h" |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
7 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
8 | #define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
- | |
9 | 8 | #define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);} |
|
10 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
9 | #define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
Line 11... | Line 10... | ||
11 | #define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);} |
10 | #define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);} |
12 | 11 | ||
- | 12 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
|
- | 13 | #define VOICE_BEEP 5 |
|
- | 14 | #define HoTT_GRAD 96 |
|
- | 15 | #define HoTT_LINKS 123 |
|
- | 16 | #define HoTT_RECHTS 124 |
|
Line 13... | Line 17... | ||
13 | #define VOICE_MINIMALE_EINGANSSPANNUNG 16 |
17 | #define HoTT_OBEN 125 |
14 | #define VOICE_BEEP 5 |
18 | #define HoTT_UNTEN 126 |
15 | 19 | ||
Line 69... | Line 73... | ||
69 | switch(what++) |
73 | switch(what++) |
70 | { |
74 | { |
71 | case 0: |
75 | case 0: |
72 | HoTT_printfxy(0,0,"%2i.%1iV ",UBat/10, UBat%10); |
76 | HoTT_printfxy(0,0,"%2i.%1iV ",UBat/10, UBat%10); |
73 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy_INV(6,0,"!!",UBat/10, UBat%10); |
77 | if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy_INV(6,0,"!!",UBat/10, UBat%10); |
74 | HoTT_printfxy(8,0,"%4imAh %2i:%02i",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60); |
78 | HoTT_printfxy(6,0,"%4imAh %2i:%02i ",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60); |
75 | break; |
79 | break; |
76 | case 1: |
80 | case 1: |
77 | HoTT_printfxy(0,1,"DIR:%3d%c",(int)(ErsatzKompass / GIER_GRAD_FAKTOR), 0x60); |
81 | HoTT_printfxy(0,1,"DIR:%3d%c",(int)(ErsatzKompass / GIER_GRAD_FAKTOR), HoTT_GRAD); |
78 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
82 | if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG) |
- | 83 | { |
|
79 | HoTT_printfxy_INV(10,1,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter) |
84 | if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
80 | else HoTT_printfxy(10,1,"ALT: ---- ", (int16_t)(HoehenWert/100),VarioCharacter); |
85 | else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100)) |
- | 86 | } |
|
- | 87 | else HoTT_printfxy(10,1,"ALT:---- "); |
|
- | 88 | HoTT_printfxy(20,1,"%c",VarioCharacter); |
|
81 | break; |
89 | break; |
82 | case 2: |
90 | case 2: |
83 | HoTT_printfxy(0,2,"I=%3i.%1iA %4iW ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
91 | HoTT_printfxy(0,2,"I=%3i.%1iA%4iW ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower); |
84 | break; |
92 | break; |
85 | case 3: |
93 | case 3: |
86 | if(NaviDataOkay) |
94 | if(NaviDataOkay) |
87 | { |
95 | { |
88 | HoTT_printfxy(0,3,"Home:%3dm %3d%c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, 0x60); |
96 | HoTT_printfxy(0,3,"Home:%3dm %3d%c %c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter); |
- | 97 | if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy(17,3,"CF") else HoTT_printfxy(17,3," "); |
|
89 | } |
98 | } |
90 | else |
99 | else |
91 | { |
100 | { |
92 | Hott_ClearLine(3); |
101 | Hott_ClearLine(3); |
93 | } |
102 | } |
Line 103... | Line 112... | ||
103 | break; |
112 | break; |
Line 104... | Line 113... | ||
104 | 113 | ||
105 | case SATFIX_2D: |
114 | case SATFIX_2D: |
106 | case SATFIX_NONE: |
115 | case SATFIX_NONE: |
107 | default: |
116 | default: |
108 | HoTT_printfxy(16,4,"NOFIX"); |
117 | HoTT_printfxy_INV(16,4,"NOFIX"); |
109 | break; |
118 | break; |
110 | } |
119 | } |
111 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
120 | if(GPSInfo.Flags & FLAG_DIFFSOLN) |
112 | { |
121 | { |
Line 117... | Line 126... | ||
117 | { //012345678901234567890 |
126 | { //012345678901234567890 |
118 | HoTT_printfxy(0,4,"No NaviCtrl! "); |
127 | HoTT_printfxy(0,4,"No NaviCtrl! "); |
119 | } |
128 | } |
120 | break; |
129 | break; |
121 | case 5: |
130 | case 5: |
122 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC ", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,0x60); |
131 | HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC ", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD); |
123 | break; |
132 | break; |
124 | case 6: |
133 | case 6: |
125 | if(RequiredMotors == 4) Hott_ClearLine(6); |
134 | if(RequiredMotors == 4) Hott_ClearLine(6); |
126 | else |
135 | else |
127 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,0x60) |
136 | if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD) |
128 | else |
137 | else |
129 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,0x6D); |
138 | if(RequiredMotors > 6) HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,0x6D); |
130 | //HoTT_printfxy(0,6,"%2x:%c %c %c %c %c %c %c %c ",Parameter_UserParam1,Parameter_UserParam1,Parameter_UserParam1+1,Parameter_UserParam1+2,Parameter_UserParam1+3,Parameter_UserParam1+4,Parameter_UserParam1+5,Parameter_UserParam1+6 ,Parameter_UserParam1+7 ,Parameter_UserParam1+8); |
139 | //HoTT_printfxy(0,6,"%2x:%c %c %c %c %c %c %c %c ",Parameter_UserParam1,Parameter_UserParam1,Parameter_UserParam1+1,Parameter_UserParam1+2,Parameter_UserParam1+3,Parameter_UserParam1+4,Parameter_UserParam1+5,Parameter_UserParam1+6 ,Parameter_UserParam1+7 ,Parameter_UserParam1+8); |
- | 140 | //HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard); |
|
- | 141 | //if(HoTTBlink) HoTT_printfxy_INV(10,6,"BLINK"); |
|
131 | break; |
142 | break; |
132 | case 7: if(NC_ErrorCode) {Hott_ClearLine(7); HoTT_printfxy_INV(3,7,"ERROR: %2d ",NC_ErrorCode);} |
143 | case 7: if(NC_ErrorCode) {Hott_ClearLine(7); HoTT_printfxy_BLINK(3,7,"ERROR: %2d ",NC_ErrorCode);} |
133 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
144 | else HoTT_printfxy(0,7," www.MikroKopter.de "); |
134 | break; |
145 | break; |
135 | - | ||
136 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
146 | case 8: ASCIIPacket.WarnBeep = HoTT_Waring(); |
137 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
147 | // ASCIIPacket.WarnBeep = Parameter_UserParam1; |
138 | case 9: |
148 | case 9: |
139 | case 10: |
149 | case 10: |
140 | case 11: |
150 | case 11: |