Subversion Repositories FlightCtrl

Rev

Rev 2403 | 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
 
2090 holgerb 6
#define SPEAK_ERR_CALIBARTION  1
7
#define SPEAK_ERR_RECEICER       2
8
#define SPEAK_ERR_DATABUS        3
9
#define SPEAK_ERR_NAVI           4
10
#define SPEAK_ERROR                      5
11
#define SPEAK_ERR_COMPASS        6
12
#define SPEAK_ERR_SENSOR         7
13
#define SPEAK_ERR_GPS            8
14
#define SPEAK_ERR_MOTOR          9
15
#define SPEAK_MAX_TEMPERAT  10
16
#define SPEAK_ALTI_REACHED  11
17
#define SPEAK_WP_REACHED    12
18
#define SPEAK_NEXT_WP       13
19
#define SPEAK_LANDING       14
20
#define SPEAK_GPS_FIX       15
21
#define SPEAK_UNDERVOLTAGE  16
22
#define SPEAK_GPS_HOLD      17
23
#define SPEAK_GPS_HOME      18
24
#define SPEAK_GPS_OFF       19
25
#define SPEAK_BEEP          20
26
#define SPEAK_MIKROKOPTER   21
27
#define SPEAK_CAPACITY      22
28
#define SPEAK_CF_OFF        23
29
#define SPEAK_CALIBRATE     24
30
#define SPEAK_MAX_RANGE     25
31
#define SPEAK_MAX_ALTITUD   26
32
 
33
#define SPEAK_MK_OFF            38
34
#define SPEAK_ALTITUDE_ON       39
35
#define SPEAK_ALTITUDE_OFF      40
36
#define SPEAK_CF_ON             46
37
#define SPEAK_SINKING           47
38
#define SPEAK_RISING            48
39
#define SPEAK_HOLDING           49
40
#define SPEAK_GPS_ON            50
41
#define SPEAK_FOLLWING          51
42
#define SPEAK_STARTING      52
43
 
2388 holgerb 44
#define MAX_ERR_NUMBER (32+1)
1930 holgerb 45
extern const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17];
2178 holgerb 46
extern unsigned char NaviData_WaypointIndex, NaviData_WaypointNumber, NaviData_TargetHoldTime;
47
extern unsigned int NaviData_TargetDistance;
2373 holgerb 48
extern unsigned char MaxBlTemperture;
49
extern unsigned char MinBlTemperture;
50
extern unsigned char HottestBl;
1930 holgerb 51
 
1917 holgerb 52
extern unsigned char HottKeyboard,HoTT_RequestedSensor;
53
extern unsigned char HottUpdate(unsigned char key);
2345 holgerb 54
extern unsigned char SpeakHoTT,ShowSettingNameTime;
2190 holgerb 55
extern unsigned char ToNC_SpeakHoTT;
1919 holgerb 56
extern volatile unsigned char *HoTT_DataPointer;
57
 
1917 holgerb 58
extern void CreateHoTT_Menu(void);
59
extern void LIBFC_HoTT_Putchar(char);
60
extern void LIBFC_HoTT_Putchar_INV(char); // print Invers
1920 holgerb 61
extern void LIBFC_HoTT_Putchar_BLINK(char);
1917 holgerb 62
extern void LIBFC_HoTT_SetPos(unsigned char);
63
extern void LIBFC_HoTT_Clear(void);
1949 holgerb 64
extern void NC_Fills_HoTT_Telemety(void);
1917 holgerb 65
extern void HoTT_Menu(void);
1919 holgerb 66
extern unsigned char HoTT_Telemety(unsigned char);
67
extern unsigned char HoTT_Waring(void);
1920 holgerb 68
extern volatile unsigned char HoTTBlink;
2182 ingob 69
extern void GetHottestBl(void);
1917 holgerb 70
 
71
typedef struct
72
{
73
  unsigned char StartByte;      // 0x7C
1944 holgerb 74
  unsigned char Packet_ID;      // HOTT_GENERAL_PACKET_ID       
2090 holgerb 75
  unsigned char WarnBeep;       // 3 Anzahl der Töne 0..36
76
  unsigned char SensorID;       // 4 0xD0
77
  unsigned char InverseStatus1; // 5  
78
  unsigned char InverseStatus2; // 6
79
  unsigned char VoltageCell1;   // 7 208 = 4,16V  (Voltage * 50 = Wert)
80
  unsigned char VoltageCell2;   // 8 209 = 4,18V
81
  unsigned char VoltageCell3;   // 9
82
  unsigned char VoltageCell4;   // 10
83
  unsigned char VoltageCell5;   // 11
84
  unsigned char VoltageCell6;   // 12
85
  unsigned int  Battery1;               // 13+14 51  = 5,1V
86
  unsigned int  Battery2;               // 15+16 51  = 5,1V
87
  unsigned char Temperature1;   // 17 44 = 24°C, 0 = -20°C
88
  unsigned char Temperature2;   // 18 44 = 24°C, 0 = -20°C
89
  unsigned char FuelPercent;    // 19
90
    signed int  FuelCapacity;   // 20+21
91
  unsigned int  Rpm;                    // 22+23
92
    signed int  Altitude;               // 24+25
93
  unsigned int  m_sec;              // 26+27 3000 = 0
94
  unsigned char m_3sec;             // 28 120 = 0
95
  unsigned int  Current;                // 29+30 1 = 0.1A
96
  unsigned int  InputVoltage;   // 31+32 66  = 6,6V
97
  unsigned int  Capacity;               // 33+34 1  = 10mAh
98
  unsigned int  Speed;                  // 35+36
99
  unsigned char LowestCellVoltage;      // 37
100
  unsigned char LowestCellNumber;       // 38
101
  unsigned int  Rpm2;                           // 39+40
102
  unsigned char ErrorNumber;            // 41
103
  unsigned char Pressure;           // 42  in 0,1bar 20=2,0bar
104
  unsigned char Version;            // 43
1943 holgerb 105
  unsigned char EndByte;                // 0x7D
106
} HoTTGeneral_t;
107
 
108
typedef struct
109
{
110
  unsigned char StartByte;      // 0x7C
111
  unsigned char Packet_ID;      // HOTT_ELECTRIC_AIR_PACKET_ID  
112
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
2090 holgerb 113
  unsigned char SensorID;       // 4 0xE0
114
  unsigned char InverseStatus1; // 5  
115
  unsigned char InverseStatus2; // 6
116
  unsigned char VoltageCell1;   // 7 208 = 4,16V  (Voltage * 50 = Wert)
1943 holgerb 117
  unsigned char VoltageCell2;   // 209 = 4,18V
118
  unsigned char VoltageCell3;   // 
119
  unsigned char VoltageCell4;   // 
120
  unsigned char VoltageCell5;   // 
121
  unsigned char VoltageCell6;   // 
1917 holgerb 122
  unsigned char VoltageCell7;   // 
123
  unsigned char VoltageCell8;   // 
124
  unsigned char VoltageCell9;   // 
125
  unsigned char VoltageCell10;  // 
126
  unsigned char VoltageCell11;  // 
127
  unsigned char VoltageCell12;  // 
128
  unsigned char VoltageCell13;  // 
2090 holgerb 129
  unsigned char VoltageCell14;  // 20 
130
  unsigned int  Battery1;               // 21+22 51  = 5,1V
131
  unsigned int  Battery2;               // 23+24 51  = 5,1V
132
  unsigned char Temperature1;   // 25 44 = 24°C, 0 = -20°C
133
  unsigned char Temperature2;   // 26 44 = 24°C, 0 = -20°C
134
    signed int  Altitude;               // 27+28
135
  unsigned int  Current;                // 29+30 1 = 0.1A
136
  unsigned int  InputVoltage;   // 31+32 66  = 6,6V
137
  unsigned int  Capacity;               // 33+34 1  = 10mAh
138
  unsigned int  m_sec;              // 35+36 30000 = 0
139
  unsigned char m_3sec;             // 37 120 = 0
140
  unsigned int  Rpm;                    // 38+39
141
  unsigned char FlightTimeMinutes; // 40
142
  unsigned char FlightTimeSeconds; // 41
143
  unsigned char Speed;                  // 42  1=2km 
144
  unsigned char Version;                // 43 0x00
1917 holgerb 145
  unsigned char EndByte;                // 0x7D
146
} ElectricAirPacket_t;
147
 
1943 holgerb 148
 
1917 holgerb 149
typedef struct
150
{
151
  unsigned char StartByte;      // 0x7C
152
  unsigned char Packet_ID;      // 0x89  - Vario ID 
2090 holgerb 153
  unsigned char WarnBeep;   //3         // Anzahl der Töne 0..36
154
  unsigned char SensorID;        // 0x90
155
  unsigned char InverseStatus;  
156
    signed int Altitude;        //6+7    // 500 = 0m
157
    signed int MaxAltitude;     //8+9    // 500 = 0m
158
        signed int MinAltitude; //10+11   // 500 = 0m
159
  unsigned int m_sec;           //12+13    // 3000 = 0
160
  unsigned int  m_3sec;         //14+15    
161
  unsigned int  m_10sec;        //26+17
162
  char              Text[21];   //18-38
163
  char              FreeCharacters[3]; // 39-41
164
  unsigned char NullByte;   // 42 0x00
165
  unsigned char Version;        // 43
166
  unsigned char EndByte;        // 0x7D
1917 holgerb 167
} VarioPacket_t;
168
 
169
typedef struct
170
{
1940 holgerb 171
  unsigned char StartByte;  //0         // 0x7C
2090 holgerb 172
  unsigned char Packet_ID;  //1         // 0x8A  - GPS ID 
1940 holgerb 173
  unsigned char WarnBeep;   //2         // Anzahl der Töne 0..36
2090 holgerb 174
  unsigned char SensorID;       // 4 0xA0
175
  unsigned char InverseStatus1; // 5  
176
  unsigned char InverseStatus2; // 6
177
  unsigned char Heading;        //7     // 1 = 2°
178
  unsigned int Speed;           //8+9   // in km/h
179
  unsigned char Lat_North;      //10    
180
  unsigned char Lat_G;      //11
181
  unsigned char Lat_M;      //12
182
  unsigned char Lat_Sek1;       //13    
183
  unsigned char Lat_Sek2;       //14    
184
  unsigned char Lon_East;       //15    
185
  unsigned char Lon_G;      //16
186
  unsigned char Lon_M;      //17
187
  unsigned char Lon_Sek1;       //18    
188
  unsigned char Lon_Sek2;       //19    
189
  unsigned int Distance;        //20+21    // 9000 = 0m
190
    signed int Altitude;        //22+23    // 500 = 0m
191
  unsigned int m_sec;           //24+25    // 3000 = 0
192
  unsigned char m_3sec;         //26 120 = 0
193
  unsigned char NumOfSats;      //27
194
  unsigned char SatFix;     //28
195
  unsigned char HomeDirection; // 29
196
  unsigned char AngleX;           // 30 
197
  unsigned char AngleY;       // 31
198
  unsigned char AngleZ;       // 32
199
    signed int GyroX;         //33+34
200
    signed int GyroY;         //35+36
201
    signed int GyroZ;         //37+38
202
  unsigned char Vibration;    // 39
203
  char              FreeCharacters[3]; // 40-42
204
  unsigned char Version;        // 43
1917 holgerb 205
  unsigned char EndByte;                // 0x7D
206
} GPSPacket_t;
207
 
208
typedef struct
209
{
210
  unsigned char StartByte;      // 0x7B
1937 holgerb 211
  unsigned char Packet_ID;      // 
1917 holgerb 212
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
213
  char Text[8*21];
214
  unsigned char EndByte;                // 0x7D
215
} ASCIIPacket_t;
216
 
1937 holgerb 217
 
1940 holgerb 218
 
1917 holgerb 219
extern GPSPacket_t GPSPacket;
220
extern VarioPacket_t VarioPacket;
221
extern ASCIIPacket_t ASCIIPacket;
222
extern ElectricAirPacket_t ElectricAirPacket;
1943 holgerb 223
extern HoTTGeneral_t HoTTGeneral;
1917 holgerb 224
 
1943 holgerb 225
#define HOTT_VARIO_PACKET_ID            0x89
226
#define HOTT_GPS_PACKET_ID                      0x8A
1917 holgerb 227
#define HOTT_ELECTRIC_AIR_PACKET_ID     0x8E
1943 holgerb 228
#define HOTT_GENERAL_PACKET_ID          0x8D
2377 holgerb 229
#define JETI_GPS_PACKET_ID1                     0x01
230
#define JETI_GPS_PACKET_ID2                     0x02
1917 holgerb 231
 
232
#endif 
1925 holgerb 233
#endif
234