Rev 1937 | 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 | |||
1937 | holgerb | 6 | #define MAX_ERR_NUMBER 22 |
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 |
||
28 | unsigned char Packet_ID; // HOTT_ELECTRIC_AIR_PACKET_ID |
||
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; // |
||
36 | unsigned char VoltageCell7; // |
||
37 | unsigned char VoltageCell8; // |
||
38 | unsigned char VoltageCell9; // |
||
39 | unsigned char VoltageCell10; // |
||
40 | unsigned char VoltageCell11; // |
||
41 | unsigned char VoltageCell12; // |
||
42 | unsigned char VoltageCell13; // |
||
43 | unsigned char VoltageCell14; // |
||
44 | unsigned int Battery1; // 51 = 5,1V |
||
45 | unsigned int Battery2; // 51 = 5,1V |
||
46 | unsigned char Temperature1; // 44 = 24°C, 0 = -20°C |
||
47 | unsigned char Temperature2; // 44 = 24°C, 0 = -20°C |
||
48 | unsigned int Altitude; |
||
49 | unsigned int Current; // 1 = 0.1A |
||
50 | unsigned int InputVoltage; // 66 = 6,6V |
||
51 | unsigned int Capacity; // 1 = 10mAh |
||
52 | unsigned int m_sec; // 3000 = 0 |
||
53 | unsigned int m_3sec; // 3000 = 0 |
||
54 | unsigned char NullByte1; // 0x00 |
||
55 | unsigned char NullByte2; // 0x00 |
||
56 | unsigned char EndByte; // 0x7D |
||
57 | } ElectricAirPacket_t; |
||
58 | |||
59 | typedef struct |
||
60 | { |
||
61 | unsigned char StartByte; // 0x7C |
||
62 | unsigned char Packet_ID; // 0x89 - Vario ID |
||
63 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
||
64 | unsigned int Altitude; // 500 = 0m |
||
65 | unsigned int MaxAltitude; // 500 = 0m |
||
66 | unsigned int MinAltitude; // 500 = 0m |
||
67 | unsigned int m_sec; // 3000 = 0 |
||
68 | unsigned int m_3sec; // 3000 = 0 |
||
69 | unsigned int m_10sec; // 3000 = 0 |
||
70 | unsigned char NullByte; // 0x00 |
||
71 | unsigned char EndByte; // 0x7D |
||
72 | } VarioPacket_t; |
||
73 | |||
74 | typedef struct |
||
75 | { |
||
1940 | holgerb | 76 | unsigned char StartByte; //0 // 0x7C |
77 | unsigned char Packet_ID; //1 // 0x89 - Vario ID |
||
78 | unsigned char WarnBeep; //2 // Anzahl der Töne 0..36 |
||
79 | unsigned char Heading; //3 // 1 = 2° |
||
80 | unsigned int Speed; //4+5 // in km/h |
||
81 | unsigned char Lat_North; //6 |
||
82 | unsigned char Lat_G; //7 |
||
83 | unsigned char Lat_M; //8 |
||
84 | unsigned char Lat_Sek1; //9 |
||
85 | unsigned char Lat_Sek2; //10 |
||
86 | unsigned char Lon_East; //11 |
||
87 | unsigned char Lon_G; //12 |
||
88 | unsigned char Lon_M; //13 |
||
89 | unsigned char Lon_Sek1; //14 |
||
90 | unsigned char Lon_Sek2; //15 |
||
91 | unsigned int Distance; //16+17 // 9000 = 0m |
||
92 | unsigned int Altitude; //18+19 // 500 = 0m |
||
93 | unsigned int m_sec; //20+21 // 3000 = 0 |
||
94 | unsigned int m_3sec; //22+23 // 3000 = 0 |
||
95 | unsigned int m_10sec; //24+25 // 3000 = 0 |
||
1917 | holgerb | 96 | unsigned char NullByte; // 0x00 |
97 | unsigned char NullByte1; // 0x00 |
||
98 | unsigned char EndByte; // 0x7D |
||
99 | } GPSPacket_t; |
||
100 | |||
101 | typedef struct |
||
102 | { |
||
103 | unsigned char StartByte; // 0x7B |
||
1937 | holgerb | 104 | unsigned char Packet_ID; // |
1917 | holgerb | 105 | unsigned char WarnBeep; // Anzahl der Töne 0..36 |
106 | char Text[8*21]; |
||
107 | unsigned char EndByte; // 0x7D |
||
108 | } ASCIIPacket_t; |
||
109 | |||
1937 | holgerb | 110 | |
1940 | holgerb | 111 | |
1917 | holgerb | 112 | extern GPSPacket_t GPSPacket; |
113 | extern VarioPacket_t VarioPacket; |
||
114 | extern ASCIIPacket_t ASCIIPacket; |
||
115 | extern ElectricAirPacket_t ElectricAirPacket; |
||
116 | |||
117 | #define HOTT_VARIO_PACKET_ID 0x89 |
||
118 | #define HOTT_GPS_PACKET_ID 0x8A |
||
119 | #define HOTT_ELECTRIC_AIR_PACKET_ID 0x8E |
||
120 | |||
121 | #endif |
||
1925 | holgerb | 122 | #endif |
123 |