Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2181 → Rev 2182

/trunk/hottmenu.h
50,6 → 50,7
extern unsigned char HottUpdate(unsigned char key);
extern unsigned char SpeakHoTT;
extern volatile unsigned char *HoTT_DataPointer;
extern unsigned char MaxBlTempertaure;
 
extern void CreateHoTT_Menu(void);
extern void LIBFC_HoTT_Putchar(char);
62,6 → 63,7
extern unsigned char HoTT_Telemety(unsigned char);
extern unsigned char HoTT_Waring(void);
extern volatile unsigned char HoTTBlink;
extern void GetHottestBl(void);
 
typedef struct
{
/trunk/jeti_ex.c
0,0 → 1,59
#include "libfc.h"
#include "printf_P.h"
#include "main.h"
#include "spi.h"
#include "capacity.h"
#include "jeti_ex.h"
#include "hottmenu.h"
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
 
 
 
JetiExPacket_t JetiExData[JETI_EX_PARAMETER_COUNT + 1] = // Parameter count + DeviceName (ID0)
{
// Label[10] unit[3], data type, Data , position of decimal point
// "1234567890", "123",
{ "-= M K =- " , " ", 1, 0 , 0 }, // first one is device name // datatype 1 = -8192...8192
{ "Spannung " , "V ", 1, 0 , 1 }, // ID 1
{ "Strom " , "A ", 1, 0 , 1 }, // ID 2
{ "Kapazitaet" , "mAh", 1, 0 , 2 }, // ID 3
{ "Hoehe " , "m ", 1, 0 , 0 }, // ID 4
{ "Kompass " , "° ", 1, 0 , 0 }, // ID 5
{ "Sateliten " , " ", 1, 0 , 0 }, // ID 6
{ "Geschwind." , "m/s", 1, 0 , 0 }, // ID 7
{ "Entfernung" , "m ", 1, 0 , 0 }, // ID 8
{ "Home-Richt" , "° ", 1, 0 , 0 }, // ID 9
{ "max.Temp. " , "°C ", 1, 0 , 0 }, // ID 10
{ "Magnetfeld" , "% ", 1, 0 , 0 }, // ID 11
{ "Vario " , " ", 1, 0 , 0 }, // ID 12
{ "Errorcode " , " ", 1, 0 , 0 }, // ID 13
{ "frei " , " ", 1 0 , 3 }, // ID 14
{ "frei " , " ", 1 0 , 3 }, // ID 15
};
 
 
// --------------------------------------------------------------------------------------------------
void JetiEX_Update(void)
{
GetHottestBl();
JetiExData[1].Value = UBat;
JetiExData[2].Value = Capacity.ActualCurrent;
JetiExData[3].Value = Capacity.UsedCapacity / 10;
JetiExData[4].Value = HoehenWert / 100;
JetiExData[5].Value = KompassValue;
JetiExData[6].Value = GPSInfo.NumOfSats;
JetiExData[7].Value = GPSInfo.Speed;
JetiExData[8].Value = GPSInfo.HomeDistance / 10;
JetiExData[9].Value = GPSInfo.HomeBearing;
JetiExData[10].Value = MaxBlTempertaure;
JetiExData[11].Value = EarthMagneticField;
JetiExData[12].Value = 0;
JetiExData[13].Value = NC_ErrorCode;
 
}
#endif
/trunk/jeti_ex.h
0,0 → 1,39
#ifndef _JETI_EX_H
#define _JETI_EX_H
 
 
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
 
 
// define here how many Jeti EX parameters should be transmitted (max. = 15)
//
#define JETI_EX_PARAMETER_COUNT 15
//
// -------------------------------------------------------------------------
 
 
 
 
typedef struct
{
char Label[10];
char Unit[3];
unsigned char DataType;
long Value;
unsigned char DecimalPointPos;
} JetiExPacket_t;
extern JetiExPacket_t JetiExData[];
extern void JetiEX_Update(void);
 
 
 
#if (JETI_EX_PARAMETER_COUNT > 15)
#error "ERROR: Too many Jeti EX parameters (max. allowed 15)"
#endif
 
#endif
#endif //_JETI_EX_H
/trunk/jetimenu.c
219,6 → 219,7
{
#if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP)
static uint8_t item = 0, last_item = 0; // the menu item
static uint8_t updateDelay = 1;
 
// navigate within the menu by key action
last_item = item;
245,9 → 246,13
// to avoid jumping over to items
if(item != last_item) key = JETIBOX_KEY_UNDEF;
 
LIBFC_JetiBox_Clear();
//execute menu item handler
((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key);
if (updateDelay++ & 0x01)
{
 
LIBFC_JetiBox_Clear();
//execute menu item handler
((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key);
}
#endif
return (0);
}