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