Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 43 → Rev 44

/tags/V0.12i/main.h
0,0 → 1,76
#ifndef _MAIN_H
#define _MAIN_H
 
 
#define VERSION_MAJOR 0
#define VERSION_MINOR 12
#define VERSION_PATCH 8
 
#define VERSION_SERIAL_MAJOR 10
#define VERSION_SERIAL_MINOR 0
#define FC_SPI_COMPATIBLE 3
#define MK3MAG_I2C_COMPATIBLE 2
 
extern u32 TimerCompassUpdate;
extern u16 BeepTime;
extern u8 ClearMKFlags;
void Interrupt_Init(void);
 
typedef struct
{
u8 ActiveSetting;
u8 User1;
u8 User2;
u8 User3;
u8 User4;
u8 User5;
u8 User6;
u8 User7;
u8 User8;
u8 NaviGpsModeControl;
u8 NaviGpsGain;
u8 NaviGpsP;
u8 NaviGpsI;
u8 NaviGpsD;
u8 NaviGpsACC;
u8 NaviGpsMinSat;
u8 NaviStickThreshold;
u8 NaviOperatingRadius;
u8 NaviWindCorrection;
u8 NaviSpeedCompensation;
u8 LowVoltageWarning;
u8 NaviAngleLimitation;
} __attribute__((packed)) Param_t;
 
typedef struct
{
s8 StickNick;
s8 StickRoll;
s8 StickYaw;
s8 StickGas;
u8 Poti1;
u8 Poti2;
u8 Poti3;
u8 Poti4;
u8 RC_Quality;
u8 UBat;
// MK_Flags
#define MKFLAG_MOTOR_RUN 0x01
#define MKFLAG_FLY 0x02
#define MKFLAG_CALIBRATE 0x04
#define MKFLAG_START 0x08
#define MKFLAG_EMERGENCY_LANDING 0x10
#define MKFLAG_RESERVE1 0x20
#define MKFLAG_RESERVE2 0x40
#define MKFLAG_RESERVE3 0x80
u8 MKFlags;
} __attribute__((packed)) FC_t;
 
 
extern Param_t Parameter;
extern FC_t FC;
extern s8 ErrorMSG[25];
extern u32 ErrorCode;
extern u8 StopNavigation;
#endif // _MAIN_H