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