Subversion Repositories Projects

Compare Revisions

Regard whitespace Rev 488 → Rev 489

/C-OSD/trunk/main.c
69,17 → 69,39
volatile uint8_t seconds_since_last_data = 0;
 
// store stats description in progmem to save space
char stats_item_0[] PROGMEM = "max Altitude:";
char stats_item_1[] PROGMEM = "max Speed :";
char stats_item_2[] PROGMEM = "max Distance:";
char stats_item_3[] PROGMEM = "min voltage :";
char stats_item_4[] PROGMEM = "max time :";
char stats_item_5[] PROGMEM = "longitude :";
char stats_item_6[] PROGMEM = "latitude :";
char stats_item_7[] PROGMEM = "max current :";
char* stats_item_pointers[] PROGMEM = {stats_item_0, stats_item_1, stats_item_2,
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[] 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};
 
#if !(FCONLY)
//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};
#endif
 
#endif // ends !(ALLCHARSDEBUG|(WRITECHARS != -1))
 
// general PAL|NTSC distingiusch stuff
113,8 → 135,7
/**
* timer kicks in every 1000uS ^= 1ms
*/
ISR(TIMER0_OVF_vect) {
OCR0 = 15; // preload
ISR(TIMER0_COMP_vect) {
if (!timer--) {
uptime++;
timer = 999;
213,10 → 234,16
usart1_init();
 
// set up timer
TCCR0 |= (1 << CS00) | (1 << CS01); // timer0 prescaler 64
OCR0 = 15; // preload
TIMSK |= (1 << TOIE0); // enable overflow timer0
// CTC, Prescaler /64
TCCR0 = (1 << WGM01) | (0 << WGM00) | (0 << CS02) | (1 << CS01) | (1 << CS00);
 
TCNT0 = 0;
OCR0 = 250;
 
// enable timer output compare interrupt
TIMSK &= ~(1 << TOIE0);
TIMSK |= (1 << OCIE0);
 
// SPI setup
DDRD |= (1 << PD2); // PD2 output (INT0)
SpiMasterInit();
266,9 → 293,6
 
// flags from last round to check for changes
uint8_t old_MKFlags = 0;
 
char* directions[8] = {"NE", "E ", "SE", "S ", "SW", "W ", "NW", "N "};
//char arrowdir[8] = {218, 217, 224, 223, 222, 221, 220, 219};
#endif
 
while (1) {