Subversion Repositories NaviCtrl

Rev

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

Rev 781 Rev 788
Line 12... Line 12...
12
//#define DEBUG 0
12
//#define DEBUG 0
13
//-----------------------
13
//-----------------------
Line 14... Line 14...
14
 
14
 
15
#define VERSION_MAJOR   2
15
#define VERSION_MAJOR   2
16
#define VERSION_MINOR   15
16
#define VERSION_MINOR   15
17
#define VERSION_PATCH   6
17
#define VERSION_PATCH   8
18
// 0 = A
18
// 0 = A
19
// 1 = B
19
// 1 = B
20
// 2 = C
20
// 2 = C
21
// 3 = D
21
// 3 = D
Line 71... Line 71...
71
#define FC_STATUS3_REDUNDANCE_ERROR                     0x04
71
#define FC_STATUS3_REDUNDANCE_ERROR                     0x04
72
#define FC_STATUS3_REDUNDANCE_TEST                      0x08
72
#define FC_STATUS3_REDUNDANCE_TEST                      0x08
73
#define FC_STATUS3_NOT_CALIBRATED                       0x10
73
#define FC_STATUS3_NOT_CALIBRATED                       0x10
74
#define FC_STATUS3_MOTORS_STOPPED_BY_RC         0x20
74
#define FC_STATUS3_MOTORS_STOPPED_BY_RC         0x20
Line -... Line 75...
-
 
75
 
-
 
76
 
-
 
77
// xxx.OSDStatusFlags   (multiple data sets)    -> this is the definition in the OSD data structure 
-
 
78
#define OSD_FLAG_CAREFREE                       0x01
-
 
79
#define OSD_FLAG_ALTITUDE_CONTROL               0x02
-
 
80
#define OSD_FLAG_CALIBRATE                              0x04
-
 
81
#define OSD_FLAG_OUT1_ACTIVE                            0x08
-
 
82
#define OSD_FLAG_OUT2_ACTIVE                            0x10
-
 
83
#define OSD_FLAG_LOWBAT                                 0x20
-
 
84
#define OSD_FLAG_VARIO_TRIM_UP                  0x40
-
 
85
#define OSD_FLAG_VARIO_TRIM_DOWN                0x80
-
 
86
 
-
 
87
// NaviData_Flags.OSDStatusFlags2 (Index:11)    -> this is the definition in the OSD data structure 
-
 
88
#define OSD2_FLAG_MOTOR_RUN                             0x01
-
 
89
#define OSD2_FLAG_FLY                                   0x02
-
 
90
#define OSD2_FLAG_RC_FAILSAVE_ACTIVE        0x04
-
 
91
#define OSD2_FLAG_START                                 0x08
-
 
92
#define OSD2_FLAG_EMERGENCY_LANDING             0x10
-
 
93
#define OSD2_FLAG_WAIT_FOR_TAKEOFF              0x20   // Motor Running, but still on the ground
-
 
94
#define OSD2_FLAG_AUTO_STARTING                 0x40
-
 
95
#define OSD2_FLAG_AUTO_LANDING                  0x80
-
 
96
 
-
 
97
 
75
 
98
// the OSD-Flags are built from the FC status flags. They are combined into new bytes to increse the efficiency in the data protocol
76
#define OSD_FLAG_MASK1 (0x04 + 0x20 + 0x40 + 0x80)
99
#define OSD_FLAG_MASK1 (0x04 + 0x20 + 0x40 + 0x80)
Line -... Line 100...
-
 
100
#define OSD_FLAG_MASK2 (0x01 + 0x02 + 0x08 + 0x10)
-
 
101
 
-
 
102
// NC calculates
-
 
103
//OSDStatusFlags = (FC.StatusFlags & OSD_FLAG_MASK1) | (FC.StatusFlags2 & OSD_FLAG_MASK2);
-
 
104
//OSDStatusFlags2 = (FC.StatusFlags & ~OSD_FLAG_MASK1) | (FC.StatusFlags2 & ~OSD_FLAG_MASK2);
-
 
105
 
-
 
106
//calculate Back:
-
 
107
//FC.StatusFlags = (OSDStatusFlags & OSD_FLAG_MASK1) | (OSDStatusFlags2 & ~OSD_FLAG_MASK1);
-
 
108
//FC.StatusFlags2 = (OSDStatusFlags & OSD_FLAG_MASK2) | (OSDStatusFlags2 & ~OSD_FLAG_MASK2);
77
#define OSD_FLAG_MASK2 (0x01 + 0x02 + 0x08 + 0x10)
109
 
78
 
110
 
79
// .NCFlags
111
// .NCFlags
80
#define NC_FLAG_FREE                    0x01
112
#define NC_FLAG_FREE                    0x01
81
#define NC_FLAG_PH                              0x02
113
#define NC_FLAG_PH                              0x02