Subversion Repositories Projects

Rev

Rev 677 | Rev 728 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 677 Rev 685
Line 38... Line 38...
38
#include "buttons.h"
38
#include "buttons.h"
39
#include "ppm.h"
39
#include "ppm.h"
40
#include "osd_ncmode_default.h"
40
#include "osd_ncmode_default.h"
41
#include "osd_ncmode_minimal.h"
41
#include "osd_ncmode_minimal.h"
42
#include "osd_fcmode_default.h"
42
#include "osd_fcmode_default.h"
-
 
43
#include "osd_fcmode_jopl.h"
Line 43... Line 44...
43
 
44
 
44
#if WRITECHARS != -1
45
#if WRITECHARS != -1
45
#include "characters.h"
46
#include "characters.h"
Line 66... Line 67...
66
volatile uint8_t last_RC_Quality = 255;
67
volatile uint8_t last_RC_Quality = 255;
Line 67... Line 68...
67
 
68
 
68
// 16bit should be enough, normal LiPos don't last that long
69
// 16bit should be enough, normal LiPos don't last that long
69
volatile uint16_t uptime = 0;
70
volatile uint16_t uptime = 0;
-
 
71
volatile uint16_t timer = 0;
Line 70... Line 72...
70
volatile uint16_t timer = 0;
72
volatile uint16_t flytime_fc = 0;
71
 
73
 
Line 72... Line 74...
72
// remember last time data was received
74
// remember last time data was received
Line 130... Line 132...
130
/* ##########################################################################
132
/* ##########################################################################
131
 * Different display mode function pointers
133
 * Different display mode function pointers
132
 * ##########################################################################*/
134
 * ##########################################################################*/
133
const char str_1[] PROGMEM  = "default";
135
const char str_1[] PROGMEM  = "default";
134
const char str_2[] PROGMEM  = "minimal";
136
const char str_2[] PROGMEM  = "minimal";
-
 
137
const char str_3[] PROGMEM  = "   jopl";
Line 135... Line 138...
135
 
138
 
136
const displaymode_t ncdisplaymodes[] PROGMEM = {
139
const displaymode_t ncdisplaymodes[] PROGMEM = {
137
   { osd_ncmode_default, (char *)str_1 },
140
   { osd_ncmode_default, (char *)str_1 },
138
   { osd_ncmode_minimal, (char *)str_2 }
141
   { osd_ncmode_minimal, (char *)str_2 }
Line 139... Line 142...
139
};
142
};
140
 
143
 
-
 
144
const displaymode_t fcdisplaymodes[] PROGMEM = {
141
const displaymode_t fcdisplaymodes[] PROGMEM = {
145
   { osd_fcmode_default, (char *)str_1 },
Line 142... Line 146...
142
   { osd_fcmode_default, (char *)str_1 },
146
   { osd_fcmode_jopl, (char *)str_3 }
143
};
147
};
144
 
148
 
Line 169... Line 173...
169
 * timer kicks in every 1000uS ^= 1ms
173
 * timer kicks in every 1000uS ^= 1ms
170
 */
174
 */
171
ISR(TIMER0_COMP_vect) {
175
ISR(TIMER0_COMP_vect) {
172
    if (!timer--) {
176
    if (!timer--) {
173
        uptime++;
177
        uptime++;
-
 
178
 
-
 
179
                #if FCONLY
-
 
180
                if (debugData.Analog[12]>10) {
-
 
181
                        flytime_fc++;
-
 
182
                }
-
 
183
                #endif
-
 
184
 
174
        timer = 999;
185
        timer = 999;
175
        seconds_since_last_data++;
186
        seconds_since_last_data++;
176
    }
187
    }
177
    // in case there is still some spi data to send do it now
188
    // in case there is still some spi data to send do it now
178
        // delay to give the slave some time to compute values
189
        // delay to give the slave some time to compute values
Line 317... Line 328...
317
    // we are ready
328
    // we are ready
318
    LED3_ON
329
    LED3_ON
Line 319... Line 330...
319
 
330
 
320
#if ALLCHARSDEBUG | (WRITECHARS != -1)
331
#if ALLCHARSDEBUG | (WRITECHARS != -1)
321
        clear();
332
        clear();
322
        write_all_chars();
333
        write_all_chars();
323
        LED1_ON
334
        LED1_ON
324
        LED2_ON
335
        LED2_ON
325
        LED3_ON
336
        LED3_ON
326
        LED4_ON
337
        LED4_ON
Line 327... Line 338...
327
#else
338
#else
328
 
339