Rev 254 | Rev 256 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 254 | Rev 255 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | #define VERSION_PATCH 0 |
10 | #define VERSION_PATCH 0 |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | #define VERSION_SERIAL_MAJOR 11 |
12 | #define VERSION_SERIAL_MAJOR 11 |
Line 13... | Line 13... | ||
13 | #define VERSION_SERIAL_MINOR 0 |
13 | #define VERSION_SERIAL_MINOR 0 |
14 | 14 | ||
Line 15... | Line 15... | ||
15 | #define FC_SPI_COMPATIBLE 14 |
15 | #define FC_SPI_COMPATIBLE 15 |
16 | #define MK3MAG_I2C_COMPATIBLE 3 |
- | |
17 | - | ||
18 | // FC FLAGS |
16 | #define MK3MAG_I2C_COMPATIBLE 3 |
19 | // tbd: Trennen in Error Flags und Status Flags!!! |
17 | |
20 | // aufnehmen. |
18 | // FC STATUS FLAGS |
21 | #define FCFLAG_MOTOR_RUN 0x01 |
19 | #define FC_STATUS_MOTOR_RUN 0x01 |
22 | #define FCFLAG_FLY 0x02 |
20 | #define FC_STATUS_FLY 0x02 |
23 | #define FCFLAG_CALIBRATE 0x04 |
21 | #define FC_STATUS_CALIBRATE 0x04 |
24 | #define FCFLAG_START 0x08 |
22 | #define FC_STATUS_START 0x08 |
25 | #define FCFLAG_EMERGENCY_LANDING 0x10 |
23 | #define FC_STATUS_EMERGENCY_LANDING 0x10 |
- | 24 | #define FC_STATUS_LOWBAT 0x20 |
|
- | 25 | #define FC_STATUS_RES1 0x40 |
|
- | 26 | #define FC_STATUS_RES2 0x80 |
|
- | 27 | ||
- | 28 | // FC ERRORS FLAGS |
|
- | 29 | #define FC_ERROR0_GYRO_NICK 0x01 |
|
- | 30 | #define FC_ERROR0_GYRO_ROLL 0x02 |
|
- | 31 | #define FC_ERROR0_GYRO_YAW 0x04 |
|
- | 32 | #define FC_ERROR0_ACC_NICK 0x08 |
|
- | 33 | #define FC_ERROR0_ACC_ROLL 0x10 |
|
- | 34 | #define FC_ERROR0_ACC_TOP 0x20 |
|
- | 35 | #define FC_ERROR0_PRESSURE 0x40 |
|
- | 36 | #define FC_ERROR0_CAREFREE 0x80 |
|
- | 37 | ||
- | 38 | #define FC_ERROR1_I2C 0x01 |
|
- | 39 | #define FC_ERROR1_BL_MISSING 0x02 |
|
- | 40 | #define FC_ERROR1_SPI_RX 0x04 |
|
- | 41 | #define FC_ERROR1_PPM 0x08 |
|
- | 42 | #define FC_ERROR1_MIXER 0x10 |
|
Line 26... | Line 43... | ||
26 | #define FCFLAG_LOWBAT 0x20 |
43 | #define FC_ERROR1_RES1 0x20 |
27 | #define FCFLAG_SPI_RX_ERR 0x40 |
44 | #define FC_ERROR1_RES2 0x40 |
28 | #define FCFLAG_I2CERR 0x80 |
45 | #define FC_ERROR1_RES3 0x80 |
29 | 46 | ||
Line 42... | Line 59... | ||
42 | #define LIMIT_MIN_MAX(value, min, max) {if(value <= min) value = min; else if(value >= max) value = max;} |
59 | #define LIMIT_MIN_MAX(value, min, max) {if(value <= min) value = min; else if(value >= max) value = max;} |
Line 43... | Line 60... | ||
43 | 60 | ||
44 | extern u8 BoardRelease; |
61 | extern u8 BoardRelease; |
45 | extern u16 BeepTime; |
62 | extern u16 BeepTime; |
46 | extern u8 NCFlags; |
63 | extern u8 NCFlags; |
47 | extern u8 ClearFCFlags; |
64 | extern u8 ClearFCStatusFlags; |
48 | void Interrupt_Init(void); |
65 | void Interrupt_Init(void); |
Line 49... | Line 66... | ||
49 | extern s16 GeoMagDec; |
66 | extern s16 GeoMagDec; |
Line 93... | Line 110... | ||
93 | u8 RC_Quality; |
110 | u8 RC_Quality; |
94 | u8 RC_RSSI; |
111 | u8 RC_RSSI; |
95 | u8 BAT_Voltage; |
112 | u8 BAT_Voltage; |
96 | u16 BAT_Current; |
113 | u16 BAT_Current; |
97 | u16 BAT_UsedCapacity; |
114 | u16 BAT_UsedCapacity; |
98 | u8 Flags; |
115 | u8 StatusFlags; |
- | 116 | u8 Error[5]; |
|
99 | } __attribute__((packed)) FC_t; |
117 | } __attribute__((packed)) FC_t; |
Line 100... | Line 118... | ||
100 | 118 | ||
101 | 119 |