Subversion Repositories FlightCtrl

Rev

Rev 2286 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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