Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 495 → Rev 497

/C-OSD/trunk/main.h
18,6 → 18,9
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
#include <avr/pgmspace.h>
#include "mk-data-structs.h"
 
/* ##########################################################################
* Debugging and general purpose definitions
* ##########################################################################*/
42,16 → 45,8
#ifndef FCONLY
#define FCONLY 0 // set to 1 if you do NOT have a NaviCtrl and the OSD is
#endif // connected to the FC directly
 
#ifndef OSD_FCMODE // set up which FCMODE to display if doing batch generating
#define OSD_FCMODE "osd_fcmode_default.c" // default is a nice standard
#endif
 
#ifndef OSD_NCMODE // set up which NCMODE to display if doing batch generating
#define OSD_NCMODE "osd_ncmode_default.c" // default is a nice standard
#endif
 
#define HUD 1 // set to 0 to disable HUD by default
#define HUD 1 // set to 0 to disable HUD by default
#define ARTHORIZON 0 // set to 1 to enable roll&nick artificial horizon by default
#define BIGVARIO 0 // set to 1 to enable the big vario bar on right side
#define STATS 1 // set to 1 to enable statistics during motor off by default
112,3 → 107,61
extern int16_t ampere, max_ampere;
extern int32_t ampere_wasted;
 
/* ##########################################################################
* struct for displaymodes
* ##########################################################################*/
typedef struct {
int (*dfun)(void); // function pointer
char *desc; // description text
} displaymode_t;
 
const displaymode_t ncdisplaymodes[2];
const displaymode_t fcdisplaymodes[1];
 
int (*osd_ncmode)(void);
int (*osd_fcmode)(void);
 
/* ##########################################################################
* vars used by other parts as well
* ##########################################################################*/
volatile uint16_t setsReceived;
 
volatile NaviData_t naviData;
volatile DebugOut_t debugData;
 
// cache old vars for blinking attribute, checkup is faster than full
// attribute write each time
volatile uint8_t last_UBat;
volatile uint8_t last_RC_Quality;
 
// 16bit should be enough, normal LiPos don't last that long
volatile uint16_t uptime;
volatile uint16_t timer;
 
// remember last time data was received
volatile uint8_t seconds_since_last_data;
 
// general PAL|NTSC distingiusch stuff
uint8_t top_line;
uint8_t bottom_line;
 
// battery voltages
uint8_t min_voltage;
uint8_t max_voltage;
 
// Flags
uint8_t COSD_FLAGS, COSD_FLAGS2, COSD_DISPLAYMODE;
 
// stats for after flight
int16_t max_Altimeter;
uint8_t min_UBat;
 
uint16_t max_GroundSpeed;
int16_t max_Distance;
uint16_t max_FlyingTime;
 
// flags from last round to check for changes
uint8_t old_MKFlags;
 
const char *directions[8];
const char* stats_item_pointers[8];