Rev 68 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
41 | ingob | 1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
||
1 | ingob | 3 | |
4 | |||
41 | ingob | 5 | #define VERSION_MAJOR 0 |
68 | holgerb | 6 | #define VERSION_MINOR 14 |
56 | holgerb | 7 | #define VERSION_PATCH 0 |
1 | ingob | 8 | |
41 | ingob | 9 | #define VERSION_SERIAL_MAJOR 10 |
10 | #define VERSION_SERIAL_MINOR 0 |
||
11 | |||
61 | holgerb | 12 | #define FC_SPI_COMPATIBLE 5 |
41 | ingob | 13 | #define MK3MAG_I2C_COMPATIBLE 2 |
1 | ingob | 14 | |
49 | ingob | 15 | // sends data on uart0 (without MK-OSD the MKGPS is connect there) |
50 | ingob | 16 | //#define SEND_MKOSD_DATA |
49 | ingob | 17 | |
41 | ingob | 18 | extern u32 TimerCompassUpdate; |
19 | extern u16 BeepTime; |
||
20 | extern u8 ClearMKFlags; |
||
21 | void Interrupt_Init(void); |
||
1 | ingob | 22 | |
41 | ingob | 23 | typedef struct |
24 | { |
||
25 | u8 ActiveSetting; |
||
26 | u8 User1; |
||
27 | u8 User2; |
||
28 | u8 User3; |
||
29 | u8 User4; |
||
30 | u8 User5; |
||
31 | u8 User6; |
||
32 | u8 User7; |
||
33 | u8 User8; |
||
34 | u8 NaviGpsModeControl; |
||
35 | u8 NaviGpsGain; |
||
36 | u8 NaviGpsP; |
||
37 | u8 NaviGpsI; |
||
38 | u8 NaviGpsD; |
||
56 | holgerb | 39 | u8 NaviGpsPLimit; |
40 | u8 NaviGpsILimit; |
||
41 | u8 NaviGpsDLimit; |
||
41 | ingob | 42 | u8 NaviGpsACC; |
43 | u8 NaviGpsMinSat; |
||
44 | u8 NaviStickThreshold; |
||
45 | u8 NaviOperatingRadius; |
||
46 | u8 NaviWindCorrection; |
||
47 | u8 NaviSpeedCompensation; |
||
48 | u8 LowVoltageWarning; |
||
49 | u8 NaviAngleLimitation; |
||
56 | holgerb | 50 | u8 NaviPH_LoginTime; |
41 | ingob | 51 | } __attribute__((packed)) Param_t; |
1 | ingob | 52 | |
41 | ingob | 53 | typedef struct |
54 | { |
||
55 | s8 StickNick; |
||
56 | s8 StickRoll; |
||
57 | s8 StickYaw; |
||
58 | s8 StickGas; |
||
59 | u8 Poti1; |
||
60 | u8 Poti2; |
||
61 | u8 Poti3; |
||
62 | u8 Poti4; |
||
63 | u8 RC_Quality; |
||
64 | u8 UBat; |
||
65 | // MK_Flags |
||
66 | #define MKFLAG_MOTOR_RUN 0x01 |
||
67 | #define MKFLAG_FLY 0x02 |
||
68 | #define MKFLAG_CALIBRATE 0x04 |
||
69 | #define MKFLAG_START 0x08 |
||
70 | #define MKFLAG_EMERGENCY_LANDING 0x10 |
||
71 | #define MKFLAG_RESERVE1 0x20 |
||
72 | #define MKFLAG_RESERVE2 0x40 |
||
73 | #define MKFLAG_RESERVE3 0x80 |
||
74 | u8 MKFlags; |
||
75 | } __attribute__((packed)) FC_t; |
||
1 | ingob | 76 | |
27 | holgerb | 77 | |
41 | ingob | 78 | extern Param_t Parameter; |
79 | extern FC_t FC; |
||
80 | extern s8 ErrorMSG[25]; |
||
81 | extern u32 ErrorCode; |
||
82 | extern u8 StopNavigation; |
||
83 | #endif // _MAIN_H |