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