Subversion Repositories FlightCtrl

Rev

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