Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1196 → Rev 1197

/C-OSD/trunk/main.c
60,8 → 60,11
* ##########################################################################*/
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
 
#if FCONLY
volatile str_DebugOut debugData;
#else
volatile NaviData_t naviData;
volatile str_DebugOut debugData;
#endif
 
// cache old vars for blinking attribute, checkup is faster than full
// attribute write each time
106,39 → 109,10
// flags from last round to check for changes
uint8_t old_MKFlags = 0;
 
// store stats description in progmem to save space
const char stats_item_0[] PROGMEM = "max Altitude:";
const char stats_item_1[] PROGMEM = "max Speed :";
const char stats_item_2[] PROGMEM = "max Distance:";
const char stats_item_3[] PROGMEM = "min Voltage :";
const char stats_item_4[] PROGMEM = "max Time:";
const char stats_item_5[] PROGMEM = "longitude :";
const char stats_item_6[] PROGMEM = "latitude:";
const char stats_item_7[] PROGMEM = "max current :";
const char *stats_item_pointers[8] PROGMEM = {stats_item_0, stats_item_1, stats_item_2,
stats_item_3, stats_item_4, stats_item_5, stats_item_6, stats_item_7};
 
//char* directions[8] = {"NE", "E ", "SE", "S ", "SW", "W ", "NW", "N "};
char* directions[8] = {"NE", "E ", "SE", "S ", "SW", "W ", "NW", "N "};
//char arrowdir[8] = {218, 217, 224, 223, 222, 221, 220, 219};
const char str_NE[] PROGMEM = "NE";
const char str_E[] PROGMEM = "E ";
const char str_SE[] PROGMEM = "SE";
const char str_S[] PROGMEM = "S ";
const char str_SW[] PROGMEM = "SW";
const char str_W[] PROGMEM = "W ";
const char str_NW[] PROGMEM = "NW";
const char str_N[] PROGMEM = "N ";
const char *directions[8] PROGMEM = {
str_NE,
str_E,
str_SE,
str_S,
str_SW,
str_W,
str_NW,
str_N
};
 
 
/* ##########################################################################
* Different display mode function pointers
* ##########################################################################*/
403,6 → 377,12
Decode64();
naviData = *((NaviData_t*)pRxData);
 
#ifdef SHIFTBYminus45
naviData.AngleNick = (int8_t)(((int16_t)naviData.AngleRoll + (int16_t)naviData.AngleNick) / 2);
naviData.AngleRoll = (int8_t)(((int16_t)naviData.AngleRoll - (int16_t)naviData.AngleNick) / 2);
naviData.CompassHeading = (naviData.CompassHeading + (360 - 45)) % 360;
#endif
 
// init on first data retrival, distinguished by last battery :)
if (last_UBat == 255) {
if (naviData.UBat > 40) {