Rev 2081 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2081 | Rev 2093 | ||
---|---|---|---|
1 | #ifndef _HOTTMENU_H |
1 | #ifndef _HOTTMENU_H |
2 | #define _HOTTMENU_H |
2 | #define _HOTTMENU_H |
- | 3 | ||
- | 4 | typedef struct{ |
|
- | 5 | char offset; |
|
- | 6 | unsigned char min; |
|
- | 7 | unsigned char max; |
|
- | 8 | char name[4]; |
|
- | 9 | unsigned char *Variable; |
|
- | 10 | } Parameter_List_t; |
|
- | 11 | ||
- | 12 | #define MAXPARAM 43 //Muss eine ungerade Zahl sein |
|
- | 13 | ||
- | 14 | extern const Parameter_List_t Parameter_List[]; |
|
- | 15 | ||
3 | 16 | ||
4 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
17 | #if ((defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))) |
5 | 18 | ||
6 | #define MAX_ERR_NUMBER (29+1) |
19 | #define MAX_ERR_NUMBER (29+1) |
7 | extern const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17]; |
20 | extern const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17]; |
- | 21 | ||
- | 22 | extern char dummy; |
|
- | 23 | ||
- | 24 | ||
8 | 25 | ||
9 | extern unsigned char HottKeyboard,HoTT_RequestedSensor; |
26 | extern unsigned char HottKeyboard,HoTT_RequestedSensor; |
10 | extern unsigned char HottUpdate(unsigned char key); |
27 | extern unsigned char HottUpdate(unsigned char key); |
11 | 28 | ||
12 | extern volatile unsigned char *HoTT_DataPointer; |
29 | extern volatile unsigned char *HoTT_DataPointer; |
13 | 30 | ||
14 | extern void CreateHoTT_Menu(void); |
31 | extern void CreateHoTT_Menu(void); |
15 | extern void LIBFC_HoTT_Putchar(char); |
32 | extern void LIBFC_HoTT_Putchar(char); |
16 | extern void LIBFC_HoTT_Putchar_INV(char); // print Invers |
33 | extern void LIBFC_HoTT_Putchar_INV(char); // print Invers |
17 | extern void LIBFC_HoTT_Putchar_BLINK(char); |
34 | extern void LIBFC_HoTT_Putchar_BLINK(char); |
18 | extern void LIBFC_HoTT_SetPos(unsigned char); |
35 | extern void LIBFC_HoTT_SetPos(unsigned char); |
19 | extern void LIBFC_HoTT_Clear(void); |
36 | extern void LIBFC_HoTT_Clear(void); |
20 | extern void NC_Fills_HoTT_Telemety(void); |
37 | extern void NC_Fills_HoTT_Telemety(void); |
21 | extern void HoTT_Menu(void); |
38 | extern void HoTT_Menu(void); |
22 | extern unsigned char HoTT_Telemety(unsigned char); |
39 | extern unsigned char HoTT_Telemety(unsigned char); |
23 | extern unsigned char HoTT_Waring(void); |
40 | extern unsigned char HoTT_Waring(void); |
24 | extern volatile unsigned char HoTTBlink; |
41 | extern volatile unsigned char HoTTBlink; |
25 | 42 | ||
26 | typedef struct |
43 | typedef struct |
27 | { |
44 | { |
28 | unsigned char StartByte; // 0x7C |
45 | unsigned char StartByte; // 0x7C |
29 | unsigned char Packet_ID; // HOTT_GENERAL_PACKET_ID |
46 | unsigned char Packet_ID; // HOTT_GENERAL_PACKET_ID |
30 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
47 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
31 | unsigned char VoltageCell1; // 208 = 4,16V (Voltage * 50 = Wert) |
48 | unsigned char VoltageCell1; // 208 = 4,16V (Voltage * 50 = Wert) |
32 | unsigned char VoltageCell2; // 209 = 4,18V |
49 | unsigned char VoltageCell2; // 209 = 4,18V |
33 | unsigned char VoltageCell3; // |
50 | unsigned char VoltageCell3; // |
34 | unsigned char VoltageCell4; // |
51 | unsigned char VoltageCell4; // |
35 | unsigned char VoltageCell5; // |
52 | unsigned char VoltageCell5; // |
36 | unsigned char VoltageCell6; // |
53 | unsigned char VoltageCell6; // |
37 | unsigned int Battery1; // 51 = 5,1V |
54 | unsigned int Battery1; // 51 = 5,1V |
38 | unsigned int Battery2; // 51 = 5,1V |
55 | unsigned int Battery2; // 51 = 5,1V |
39 | unsigned char Temperature1; // 44 = 24°C, 0 = -20°C |
56 | unsigned char Temperature1; // 44 = 24°C, 0 = -20°C |
40 | unsigned char Temperature2; // 44 = 24°C, 0 = -20°C |
57 | unsigned char Temperature2; // 44 = 24°C, 0 = -20°C |
41 | unsigned char FuelPercent; |
58 | unsigned char FuelPercent; |
42 | signed int FuelCapacity; |
59 | signed int FuelCapacity; |
43 | unsigned int Rpm; |
60 | unsigned int Rpm; |
44 | unsigned int Altitude; |
61 | unsigned int Altitude; |
45 | unsigned int m_sec; // 3000 = 0 |
62 | unsigned int m_sec; // 3000 = 0 |
46 | unsigned char m_3sec; // 120 = 0 |
63 | unsigned char m_3sec; // 120 = 0 |
47 | unsigned int Current; // 1 = 0.1A |
64 | unsigned int Current; // 1 = 0.1A |
48 | unsigned int InputVoltage; // 66 = 6,6V |
65 | unsigned int InputVoltage; // 66 = 6,6V |
49 | unsigned int Capacity; // 1 = 10mAh |
66 | unsigned int Capacity; // 1 = 10mAh |
50 | unsigned char NullByte1; // 0x00 |
67 | unsigned char NullByte1; // 0x00 |
51 | unsigned char NullByte2; // 0x00 |
68 | unsigned char NullByte2; // 0x00 |
52 | unsigned char EndByte; // 0x7D |
69 | unsigned char EndByte; // 0x7D |
53 | } HoTTGeneral_t; |
70 | } HoTTGeneral_t; |
54 | 71 | ||
55 | typedef struct |
72 | typedef struct |
56 | { |
73 | { |
57 | unsigned char StartByte; // 0x7C |
74 | unsigned char StartByte; // 0x7C |
58 | unsigned char Packet_ID; // HOTT_ELECTRIC_AIR_PACKET_ID |
75 | unsigned char Packet_ID; // HOTT_ELECTRIC_AIR_PACKET_ID |
59 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
76 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
60 | unsigned char VoltageCell1; // 208 = 4,16V (Voltage * 50 = Wert) |
77 | unsigned char VoltageCell1; // 208 = 4,16V (Voltage * 50 = Wert) |
61 | unsigned char VoltageCell2; // 209 = 4,18V |
78 | unsigned char VoltageCell2; // 209 = 4,18V |
62 | unsigned char VoltageCell3; // |
79 | unsigned char VoltageCell3; // |
63 | unsigned char VoltageCell4; // |
80 | unsigned char VoltageCell4; // |
64 | unsigned char VoltageCell5; // |
81 | unsigned char VoltageCell5; // |
65 | unsigned char VoltageCell6; // |
82 | unsigned char VoltageCell6; // |
66 | unsigned char VoltageCell7; // |
83 | unsigned char VoltageCell7; // |
67 | unsigned char VoltageCell8; // |
84 | unsigned char VoltageCell8; // |
68 | unsigned char VoltageCell9; // |
85 | unsigned char VoltageCell9; // |
69 | unsigned char VoltageCell10; // |
86 | unsigned char VoltageCell10; // |
70 | unsigned char VoltageCell11; // |
87 | unsigned char VoltageCell11; // |
71 | unsigned char VoltageCell12; // |
88 | unsigned char VoltageCell12; // |
72 | unsigned char VoltageCell13; // |
89 | unsigned char VoltageCell13; // |
73 | unsigned char VoltageCell14; // |
90 | unsigned char VoltageCell14; // |
74 | unsigned int Battery1; // 51 = 5,1V |
91 | unsigned int Battery1; // 51 = 5,1V |
75 | unsigned int Battery2; // 51 = 5,1V |
92 | unsigned int Battery2; // 51 = 5,1V |
76 | unsigned char Temperature1; // 44 = 24°C, 0 = -20°C |
93 | unsigned char Temperature1; // 44 = 24°C, 0 = -20°C |
77 | unsigned char Temperature2; // 44 = 24°C, 0 = -20°C |
94 | unsigned char Temperature2; // 44 = 24°C, 0 = -20°C |
78 | signed int Altitude; |
95 | signed int Altitude; |
79 | unsigned int Current; // 1 = 0.1A |
96 | unsigned int Current; // 1 = 0.1A |
80 | unsigned int InputVoltage; // 66 = 6,6V |
97 | unsigned int InputVoltage; // 66 = 6,6V |
81 | unsigned int Capacity; // 1 = 10mAh |
98 | unsigned int Capacity; // 1 = 10mAh |
82 | unsigned int m_sec; // 30000 = 0 |
99 | unsigned int m_sec; // 30000 = 0 |
83 | unsigned int m_3sec; // 120 = 0 |
100 | unsigned int m_3sec; // 120 = 0 |
84 | unsigned char NullByte1; // 0x00 |
101 | unsigned char NullByte1; // 0x00 |
85 | unsigned char NullByte2; // 0x00 |
102 | unsigned char NullByte2; // 0x00 |
86 | unsigned char EndByte; // 0x7D |
103 | unsigned char EndByte; // 0x7D |
87 | } ElectricAirPacket_t; |
104 | } ElectricAirPacket_t; |
88 | 105 | ||
89 | 106 | ||
90 | typedef struct |
107 | typedef struct |
91 | { |
108 | { |
92 | unsigned char StartByte; // 0x7C |
109 | unsigned char StartByte; // 0x7C |
93 | unsigned char Packet_ID; // 0x89 - Vario ID |
110 | unsigned char Packet_ID; // 0x89 - Vario ID |
94 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
111 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
95 | signed int Altitude; // 500 = 0m |
112 | signed int Altitude; // 500 = 0m |
96 | signed int MaxAltitude; // 500 = 0m |
113 | signed int MaxAltitude; // 500 = 0m |
97 | signed int MinAltitude; // 500 = 0m |
114 | signed int MinAltitude; // 500 = 0m |
98 | unsigned int m_sec; // 30000 = 0 |
115 | unsigned int m_sec; // 30000 = 0 |
99 | unsigned int m_3sec; // 30000 = 0 |
116 | unsigned int m_3sec; // 30000 = 0 |
100 | unsigned int m_10sec; // |
117 | unsigned int m_10sec; // |
101 | unsigned char NullByte; // 0x00 |
118 | unsigned char NullByte; // 0x00 |
102 | unsigned char EndByte; // 0x7D |
119 | unsigned char EndByte; // 0x7D |
103 | } VarioPacket_t; |
120 | } VarioPacket_t; |
104 | 121 | ||
105 | typedef struct |
122 | typedef struct |
106 | { |
123 | { |
107 | unsigned char StartByte; //0 // 0x7C |
124 | unsigned char StartByte; //0 // 0x7C |
108 | unsigned char Packet_ID; //1 // 0x89 - Vario ID |
125 | unsigned char Packet_ID; //1 // 0x89 - Vario ID |
109 | unsigned char WarnBeep; //2 // Anzahl der Töne 0..36 |
126 | unsigned char WarnBeep; //2 // Anzahl der Töne 0..36 |
110 | unsigned char Heading; //3 // 1 = 2° |
127 | unsigned char Heading; //3 // 1 = 2° |
111 | unsigned int Speed; //4+5 // in km/h |
128 | unsigned int Speed; //4+5 // in km/h |
112 | unsigned char Lat_North; //6 |
129 | unsigned char Lat_North; //6 |
113 | unsigned char Lat_G; //7 |
130 | unsigned char Lat_G; //7 |
114 | unsigned char Lat_M; //8 |
131 | unsigned char Lat_M; //8 |
115 | unsigned char Lat_Sek1; //9 |
132 | unsigned char Lat_Sek1; //9 |
116 | unsigned char Lat_Sek2; //10 |
133 | unsigned char Lat_Sek2; //10 |
117 | unsigned char Lon_East; //11 |
134 | unsigned char Lon_East; //11 |
118 | unsigned char Lon_G; //12 |
135 | unsigned char Lon_G; //12 |
119 | unsigned char Lon_M; //13 |
136 | unsigned char Lon_M; //13 |
120 | unsigned char Lon_Sek1; //14 |
137 | unsigned char Lon_Sek1; //14 |
121 | unsigned char Lon_Sek2; //15 |
138 | unsigned char Lon_Sek2; //15 |
122 | unsigned int Distance; //16+17 // 9000 = 0m |
139 | unsigned int Distance; //16+17 // 9000 = 0m |
123 | signed int Altitude; //18+19 // 500 = 0m |
140 | signed int Altitude; //18+19 // 500 = 0m |
124 | unsigned int m_sec; //20+21 // 3000 = 0 |
141 | unsigned int m_sec; //20+21 // 3000 = 0 |
125 | unsigned int m_3sec; // 120 = 0 |
142 | unsigned int m_3sec; // 120 = 0 |
126 | unsigned int m_10sec; // |
143 | unsigned int m_10sec; // |
127 | unsigned char NullByte; // 0x00 |
144 | unsigned char NullByte; // 0x00 |
128 | unsigned char NullByte1; // 0x00 |
145 | unsigned char NullByte1; // 0x00 |
129 | unsigned char EndByte; // 0x7D |
146 | unsigned char EndByte; // 0x7D |
130 | } GPSPacket_t; |
147 | } GPSPacket_t; |
131 | 148 | ||
132 | typedef struct |
149 | typedef struct |
133 | { |
150 | { |
134 | unsigned char StartByte; // 0x7B |
151 | unsigned char StartByte; // 0x7B |
135 | unsigned char Packet_ID; // |
152 | unsigned char Packet_ID; // |
136 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
153 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
137 | char Text[8*21]; |
154 | char Text[8*21]; |
138 | unsigned char EndByte; // 0x7D |
155 | unsigned char EndByte; // 0x7D |
139 | } ASCIIPacket_t; |
156 | } ASCIIPacket_t; |
140 | 157 | ||
141 | 158 | ||
142 | 159 | ||
143 | extern GPSPacket_t GPSPacket; |
160 | extern GPSPacket_t GPSPacket; |
144 | extern VarioPacket_t VarioPacket; |
161 | extern VarioPacket_t VarioPacket; |
145 | extern ASCIIPacket_t ASCIIPacket; |
162 | extern ASCIIPacket_t ASCIIPacket; |
146 | extern ElectricAirPacket_t ElectricAirPacket; |
163 | extern ElectricAirPacket_t ElectricAirPacket; |
147 | extern HoTTGeneral_t HoTTGeneral; |
164 | extern HoTTGeneral_t HoTTGeneral; |
148 | 165 | ||
149 | #define HOTT_VARIO_PACKET_ID 0x89 |
166 | #define HOTT_VARIO_PACKET_ID 0x89 |
150 | #define HOTT_GPS_PACKET_ID 0x8A |
167 | #define HOTT_GPS_PACKET_ID 0x8A |
151 | #define HOTT_ELECTRIC_AIR_PACKET_ID 0x8E |
168 | #define HOTT_ELECTRIC_AIR_PACKET_ID 0x8E |
152 | #define HOTT_GENERAL_PACKET_ID 0x8D |
169 | #define HOTT_GENERAL_PACKET_ID 0x8D |
153 | 170 | ||
154 | #endif |
171 | #endif |
155 | #endif |
172 | #endif |
156 | 173 | ||
157 | 174 |