Subversion Repositories FlightCtrl

Rev

Rev 1921 | Rev 1930 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _HOTTMENU_H
#define _HOTTMENU_H

#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))

extern unsigned char HottKeyboard,HoTT_RequestedSensor;
extern unsigned char HottUpdate(unsigned char key);

extern volatile unsigned char *HoTT_DataPointer;

extern void CreateHoTT_Menu(void);
extern void LIBFC_HoTT_Putchar(char);
extern void LIBFC_HoTT_Putchar_INV(char); // print Invers
extern void LIBFC_HoTT_Putchar_BLINK(char);
extern void LIBFC_HoTT_SetPos(unsigned char);
extern void LIBFC_HoTT_Clear(void);
extern void HoTT_Menu(void);
extern unsigned char HoTT_Telemety(unsigned char);
extern unsigned char HoTT_Waring(void);
extern volatile unsigned char HoTTBlink;

typedef struct
{
  unsigned char StartByte;      // 0x7C
  unsigned char Packet_ID;      // HOTT_ELECTRIC_AIR_PACKET_ID 
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
  unsigned char VoltageCell1;   // 208 = 4,16V  (Voltage * 50 = Wert)
  unsigned char VoltageCell2;   // 209 = 4,18V
  unsigned char VoltageCell3;   //
  unsigned char VoltageCell4;   //
  unsigned char VoltageCell5;   //
  unsigned char VoltageCell6;   //
  unsigned char VoltageCell7;   //
  unsigned char VoltageCell8;   //
  unsigned char VoltageCell9;   //
  unsigned char VoltageCell10;  //
  unsigned char VoltageCell11;  //
  unsigned char VoltageCell12;  //
  unsigned char VoltageCell13;  //
  unsigned char VoltageCell14;  //
  unsigned int  Battery1;               // 51  = 5,1V
  unsigned int  Battery2;               // 51  = 5,1V
  unsigned char Temperature1;   // 44 = 24°C, 0 = -20°C
  unsigned char Temperature2;   // 44 = 24°C, 0 = -20°C
  unsigned int  Altitude;      
  unsigned int  Current;                // 1 = 0.1A
  unsigned int  InputVoltage;   // 66  = 6,6V
  unsigned int  Capacity;               // 1  = 10mAh
  unsigned int  m_sec;              // 3000 = 0
  unsigned int  m_3sec;             // 3000 = 0
  unsigned char NullByte1;      // 0x00
  unsigned char NullByte2;      // 0x00
  unsigned char EndByte;                // 0x7D
} ElectricAirPacket_t;

typedef struct
{
  unsigned char StartByte;      // 0x7C
  unsigned char Packet_ID;      // 0x89  - Vario ID
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
  unsigned int Altitude;            // 500 = 0m
  unsigned int MaxAltitude;         // 500 = 0m
  unsigned int MinAltitude;         // 500 = 0m
  unsigned int m_sec;               // 3000 = 0
  unsigned int m_3sec;              // 3000 = 0
  unsigned int m_10sec;             // 3000 = 0
  unsigned char NullByte;       // 0x00
  unsigned char EndByte;                // 0x7D
} VarioPacket_t;

typedef struct
{
  unsigned char StartByte;      // 0x7C
  unsigned char Packet_ID;      // 0x89  - Vario ID
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
  unsigned char Heading;                // 1 = 2°
  unsigned int Speed;               // in km/h
  unsigned char Lat_North;         
  unsigned char Lat_G;     
  unsigned char Lat_M;     
  unsigned char Lat_Sek1;          
  unsigned char Lat_Sek2;          
  unsigned char Lon_East;          
  unsigned char Lon_G;     
  unsigned char Lon_M;     
  unsigned char Lon_Sek1;          
  unsigned char Lon_Sek2;          
  unsigned int Distance;                // 9000 = 0m
  unsigned int Altitude;            // 500 = 0m
  unsigned int m_sec;               // 3000 = 0
  unsigned int m_3sec;              // 3000 = 0
  unsigned int m_10sec;             // 3000 = 0
  unsigned char NullByte;       // 0x00
  unsigned char NullByte1;      // 0x00
  unsigned char EndByte;                // 0x7D
} GPSPacket_t;

typedef struct
{
  unsigned char StartByte;      // 0x7B
  unsigned char Packet_ID;      // 0x00  
  unsigned char WarnBeep;       // Anzahl der Töne 0..36
  char Text[8*21];
  unsigned char EndByte;                // 0x7D
} ASCIIPacket_t;

extern GPSPacket_t GPSPacket;
extern VarioPacket_t VarioPacket;
extern ASCIIPacket_t ASCIIPacket;
extern ElectricAirPacket_t ElectricAirPacket;

#define HOTT_VARIO_PACKET_ID    0x89
#define HOTT_GPS_PACKET_ID              0x8A
#define HOTT_ELECTRIC_AIR_PACKET_ID     0x8E

#endif
#endif