Subversion Repositories FlightCtrl

Rev

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