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