Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1919 → Rev 1920

/trunk/hottmenu.c
4,14 → 4,18
#include "spi.h"
#include "capacity.h"
 
#define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printf(format, args...) { _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printfxy(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar, PSTR(format) , ## args);}
#define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);}
#define HoTT_printfxy_BLINK(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_BLINK, PSTR(format) , ## args);}
 
#define HoTT_printfxy_INV(x,y,format, args...) { LIBFC_HoTT_SetPos(y * 21 + x); _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);}
#define HoTT_printf_INV(format, args...) { _printf_P(&LIBFC_HoTT_Putchar_INV, PSTR(format) , ## args);}
 
#define VOICE_MINIMALE_EINGANSSPANNUNG 16
#define VOICE_BEEP 5
#define HoTT_GRAD 96
#define HoTT_LINKS 123
#define HoTT_RECHTS 124
#define HoTT_OBEN 125
#define HoTT_UNTEN 126
 
 
//---------------------------------------------------------------
71,21 → 75,26
case 0:
HoTT_printfxy(0,0,"%2i.%1iV ",UBat/10, UBat%10);
if(FC_StatusFlags & FC_STATUS_LOWBAT) HoTT_printfxy_INV(6,0,"!!",UBat/10, UBat%10);
HoTT_printfxy(8,0,"%4imAh %2i:%02i",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60);
HoTT_printfxy(6,0,"%4imAh %2i:%02i ",Capacity.UsedCapacity,FlugSekunden/60,FlugSekunden%60);
break;
case 1:
HoTT_printfxy(0,1,"DIR:%3d%c",(int)(ErsatzKompass / GIER_GRAD_FAKTOR), 0x60);
HoTT_printfxy(0,1,"DIR:%3d%c",(int)(ErsatzKompass / GIER_GRAD_FAKTOR), HoTT_GRAD);
if(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)
HoTT_printfxy_INV(10,1,"ALT:%4im %c", (int16_t)(HoehenWert/100),VarioCharacter)
else HoTT_printfxy(10,1,"ALT: ---- ", (int16_t)(HoehenWert/100),VarioCharacter);
{
if(HoehenReglerAktiv) HoTT_printfxy_INV(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
else HoTT_printfxy(10,1,"ALT:%4im", (int16_t)(HoehenWert/100))
}
else HoTT_printfxy(10,1,"ALT:---- ");
HoTT_printfxy(20,1,"%c",VarioCharacter);
break;
case 2:
HoTT_printfxy(0,2,"I=%3i.%1iA %4iW ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower);
HoTT_printfxy(0,2,"I=%3i.%1iA%4iW ",Capacity.ActualCurrent/10, Capacity.ActualCurrent%10,Capacity.ActualPower);
break;
case 3:
if(NaviDataOkay)
{
HoTT_printfxy(0,3,"Home:%3dm %3d%c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, 0x60);
HoTT_printfxy(0,3,"Home:%3dm %3d%c %c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, HoTT_GRAD, NC_GPS_ModeCharacter);
if(FC_StatusFlags2 & FC_STATUS2_CAREFREE) HoTT_printfxy(17,3,"CF") else HoTT_printfxy(17,3," ");
}
else
{
105,7 → 114,7
case SATFIX_2D:
case SATFIX_NONE:
default:
HoTT_printfxy(16,4,"NOFIX");
HoTT_printfxy_INV(16,4,"NOFIX");
break;
}
if(GPSInfo.Flags & FLAG_DIFFSOLN)
119,20 → 128,21
}
break;
case 5:
HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC ", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,0x60);
HoTT_printfxy(0,5,"%3i %3i %3i %3i%cC ", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature,HoTT_GRAD);
break;
case 6:
if(RequiredMotors == 4) Hott_ClearLine(6);
else
if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,0x60)
if(RequiredMotors == 6) HoTT_printfxy(0,6,"%3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature,HoTT_GRAD)
else
if(RequiredMotors > 6) HoTT_printfxy(0,6,"%3i %3i %3i %3i%cC ", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature,0x6D);
//HoTT_printfxy(0,6,"%2x:%c %c %c %c %c %c %c %c ",Parameter_UserParam1,Parameter_UserParam1,Parameter_UserParam1+1,Parameter_UserParam1+2,Parameter_UserParam1+3,Parameter_UserParam1+4,Parameter_UserParam1+5,Parameter_UserParam1+6 ,Parameter_UserParam1+7 ,Parameter_UserParam1+8);
//HoTT_printfxy(15,6,"%KEY:%02x",HottKeyboard);
//if(HoTTBlink) HoTT_printfxy_INV(10,6,"BLINK");
break;
case 7: if(NC_ErrorCode) {Hott_ClearLine(7); HoTT_printfxy_INV(3,7,"ERROR: %2d ",NC_ErrorCode);}
case 7: if(NC_ErrorCode) {Hott_ClearLine(7); HoTT_printfxy_BLINK(3,7,"ERROR: %2d ",NC_ErrorCode);}
else HoTT_printfxy(0,7," www.MikroKopter.de ");
break;
 
case 8: ASCIIPacket.WarnBeep = HoTT_Waring();
// ASCIIPacket.WarnBeep = Parameter_UserParam1;
case 9:
/trunk/hottmenu.h
9,11 → 9,13
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
{
/trunk/jetimenu.c
18,7 → 18,6
// -----------------------------------------------------------
// the menu functions
// -----------------------------------------------------------
 
void Menu_Status(uint8_t key)
{ //0123456789ABCDEF
JetiBox_printfxy(0,0,"%2i.%1iV",UBat/10, UBat%10);
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/spi.c
24,6 → 24,7
unsigned char SPI_CommandSequence[] = {SPI_FCCMD_STICK, SPI_FCCMD_USER, SPI_FCCMD_PARAMETER1, SPI_FCCMD_STICK, SPI_FCCMD_MISC, SPI_FCCMD_VERSION, SPI_FCCMD_STICK, SPI_FCCMD_SERVOS, SPI_FCCMD_ACCU};
unsigned char SPI_CommandCounter = 0;
unsigned char NC_ErrorCode = 0;
unsigned char NC_GPS_ModeCharacter = ' ';
signed int POI_KameraNick = 0; // in 0,1°
vector16_t MagVec = {0,0,0};
 
326,8 → 327,9
NC_Version.Compatible = FromNaviCtrl.Param.Byte[3];
NC_Version.Hardware = FromNaviCtrl.Param.Byte[4];
DebugOut.Status[0] |= FromNaviCtrl.Param.Byte[5];
NC_ErrorCode = FromNaviCtrl.Param.Byte[6];
DebugOut.Status[1] = (DebugOut.Status[1] & (0x01|0x02)) | (FromNaviCtrl.Param.Byte[6] & (0x04 | 0x08));
NC_ErrorCode = FromNaviCtrl.Param.Byte[7];
NC_GPS_ModeCharacter = FromNaviCtrl.Param.Byte[8];
break;
 
case SPI_NCCMD_GPSINFO:
/trunk/spi.h
176,6 → 176,7
extern void UpdateSPI_Buffer(void);
extern void SPI_TransmitByte(void);
extern signed int POI_KameraNick;
extern unsigned char NC_GPS_ModeCharacter;
extern vector16_t MagVec;
#else