Subversion Repositories FlightCtrl

Rev

Rev 1919 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1917 holgerb 1
#ifndef _HOTTMENU_H
2
#define _HOTTMENU_H
3
 
4
extern unsigned char HottKeyboard,HoTT_RequestedSensor;
5
extern unsigned char HottUpdate(unsigned char key);
6
 
7
extern void CreateHoTT_Menu(void);
8
extern void LIBFC_HoTT_Putchar(char);
9
extern void LIBFC_HoTT_Putchar_INV(char); // print Invers
10
extern void LIBFC_HoTT_SetPos(unsigned char);
11
extern void LIBFC_HoTT_Clear(void);
12
extern void HoTT_Menu(void);
13
 
14
typedef struct
15
{
16
  unsigned char StartByte;      // 0x7C
17
  unsigned char Packet_ID;      // HOTT_ELECTRIC_AIR_PACKET_ID  
18
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
19
  unsigned char VoltageCell1;   // 208 = 4,16V  (Voltage * 50 = Wert)
20
  unsigned char VoltageCell2;   // 209 = 4,18V
21
  unsigned char VoltageCell3;   // 
22
  unsigned char VoltageCell4;   // 
23
  unsigned char VoltageCell5;   // 
24
  unsigned char VoltageCell6;   // 
25
  unsigned char VoltageCell7;   // 
26
  unsigned char VoltageCell8;   // 
27
  unsigned char VoltageCell9;   // 
28
  unsigned char VoltageCell10;  // 
29
  unsigned char VoltageCell11;  // 
30
  unsigned char VoltageCell12;  // 
31
  unsigned char VoltageCell13;  // 
32
  unsigned char VoltageCell14;  // 
33
  unsigned int  Battery1;               // 51  = 5,1V
34
  unsigned int  Battery2;               // 51  = 5,1V
35
  unsigned char Temperature1;   // 44 = 24°C, 0 = -20°C
36
  unsigned char Temperature2;   // 44 = 24°C, 0 = -20°C
37
  unsigned int  Altitude;      
38
  unsigned int  Current;                // 1 = 0.1A
39
  unsigned int  InputVoltage;   // 66  = 6,6V
40
  unsigned int  Capacity;               // 1  = 10mAh
41
  unsigned int  m_sec;              // 3000 = 0
42
  unsigned int  m_3sec;             // 3000 = 0
43
  unsigned char NullByte1;      // 0x00
44
  unsigned char NullByte2;      // 0x00
45
  unsigned char EndByte;                // 0x7D
46
} ElectricAirPacket_t;
47
 
48
typedef struct
49
{
50
  unsigned char StartByte;      // 0x7C
51
  unsigned char Packet_ID;      // 0x89  - Vario ID 
52
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
53
  unsigned int Altitude;            // 500 = 0m
54
  unsigned int MaxAltitude;         // 500 = 0m
55
  unsigned int MinAltitude;         // 500 = 0m
56
  unsigned int m_sec;               // 3000 = 0
57
  unsigned int m_3sec;              // 3000 = 0
58
  unsigned int m_10sec;             // 3000 = 0
59
  unsigned char NullByte;       // 0x00
60
  unsigned char EndByte;                // 0x7D
61
} VarioPacket_t;
62
 
63
typedef struct
64
{
65
  unsigned char StartByte;      // 0x7C
66
  unsigned char Packet_ID;      // 0x89  - Vario ID 
67
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
68
  unsigned char Heading;                // 1 = 2°
69
  unsigned int Speed;               // in km/h
70
  unsigned char Lat_G;     
71
  unsigned char Lat_M;     
72
  unsigned char Lat_Sek1;          
73
  unsigned char Lat_Sek2;          
74
  unsigned char Lon_G;     
75
  unsigned char Lon_M;     
76
  unsigned char Lon_Sek1;          
77
  unsigned char Lon_Sek2;          
78
  unsigned int Distance;                // 9000 = 0m
79
  unsigned int Hoehe;           // 500 = 0m
80
  unsigned int Altitude;            // 500 = 0m
81
  unsigned int m_sec;               // 3000 = 0
82
  unsigned int m_3sec;              // 3000 = 0
83
  unsigned int m_10sec;             // 3000 = 0
84
  unsigned char NullByte;       // 0x00
85
  unsigned char NullByte1;      // 0x00
86
  unsigned char EndByte;                // 0x7D
87
} GPSPacket_t;
88
 
89
typedef struct
90
{
91
  unsigned char StartByte;      // 0x7B
92
  unsigned char Packet_ID;      // 0x00  
93
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
94
  char Text[8*21];
95
  unsigned char EndByte;                // 0x7D
96
} ASCIIPacket_t;
97
 
98
extern GPSPacket_t GPSPacket;
99
extern VarioPacket_t VarioPacket;
100
extern ASCIIPacket_t ASCIIPacket;
101
extern ElectricAirPacket_t ElectricAirPacket;
102
 
103
#define HOTT_VARIO_PACKET_ID    0x89
104
#define HOTT_GPS_PACKET_ID              0x8A
105
#define HOTT_ELECTRIC_AIR_PACKET_ID     0x8E
106
 
107
#endif