Rev 1949 |
Rev 2009 |
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__))
#define MAX_ERR_NUMBER (26+1)
extern const char PROGMEM NC_ERROR_TEXT[MAX_ERR_NUMBER][17];
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 NC_Fills_HoTT_Telemety(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_GENERAL_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 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 char FuelPercent;
signed int FuelCapacity;
unsigned int Rpm;
unsigned int Altitude;
unsigned int m_sec; // 3000 = 0
unsigned char m_3sec; // 120 = 0
unsigned int Current; // 1 = 0.1A
unsigned int InputVoltage; // 66 = 6,6V
unsigned int Capacity; // 1 = 10mAh
unsigned char NullByte1; // 0x00
unsigned char NullByte2; // 0x00
unsigned char EndByte; // 0x7D
} HoTTGeneral_t;
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
signed int Altitude;
unsigned int Current; // 1 = 0.1A
unsigned int InputVoltage; // 66 = 6,6V
unsigned int Capacity; // 1 = 10mAh
unsigned int m_sec; // 30000 = 0
unsigned int m_3sec; // 120 = 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
signed int Altitude; // 500 = 0m
signed int MaxAltitude; // 500 = 0m
signed int MinAltitude; // 500 = 0m
unsigned int m_sec; // 30000 = 0
unsigned int m_3sec; // 30000 = 0
unsigned int m_10sec; //
unsigned char NullByte; // 0x00
unsigned char EndByte; // 0x7D
} VarioPacket_t;
typedef struct
{
unsigned char StartByte; //0 // 0x7C
unsigned char Packet_ID; //1 // 0x89 - Vario ID
unsigned char WarnBeep; //2 // Anzahl der Töne 0..36
unsigned char Heading; //3 // 1 = 2°
unsigned int Speed; //4+5 // in km/h
unsigned char Lat_North; //6
unsigned char Lat_G; //7
unsigned char Lat_M; //8
unsigned char Lat_Sek1; //9
unsigned char Lat_Sek2; //10
unsigned char Lon_East; //11
unsigned char Lon_G; //12
unsigned char Lon_M; //13
unsigned char Lon_Sek1; //14
unsigned char Lon_Sek2; //15
unsigned int Distance; //16+17 // 9000 = 0m
signed int Altitude; //18+19 // 500 = 0m
unsigned int m_sec; //20+21 // 3000 = 0
unsigned int m_3sec; // 120 = 0
unsigned int m_10sec; //
unsigned char NullByte; // 0x00
unsigned char NullByte1; // 0x00
unsigned char EndByte; // 0x7D
} GPSPacket_t;
typedef struct
{
unsigned char StartByte; // 0x7B
unsigned char Packet_ID; //
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;
extern HoTTGeneral_t HoTTGeneral;
#define HOTT_VARIO_PACKET_ID 0x89
#define HOTT_GPS_PACKET_ID 0x8A
#define HOTT_ELECTRIC_AIR_PACKET_ID 0x8E
#define HOTT_GENERAL_PACKET_ID 0x8D
#endif
#endif