Rev 952 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 952 | Rev 953 | ||
---|---|---|---|
Line 627... | Line 627... | ||
627 | SetNeutral(); |
627 | SetNeutral(); |
628 | Beep(GetActiveParamSet()); |
628 | Beep(GetActiveParamSet()); |
629 | } |
629 | } |
630 | else |
630 | else |
631 | { |
631 | { |
632 | if((ParamSet.GlobalConfig & CFG_COMPASS_ACTIVE)) |
632 | if(ParamSet.GlobalConfig & (CFG_COMPASS_ACTIVE|CFG_GPS_ACTIVE)) |
633 | { |
633 | { |
634 | // if roll stick is centered and nick stick is down |
634 | // if roll stick is centered and nick stick is down |
635 | if (abs(PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]) < 20 && PPM_in[ParamSet.ChannelAssignment[CH_NICK]] < -70) |
635 | if (abs(PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]) < 20 && PPM_in[ParamSet.ChannelAssignment[CH_NICK]] < -70) |
636 | { |
636 | { |
637 | // nick/roll joystick |
637 | // nick/roll joystick |
Line 1130... | Line 1130... | ||
1130 | 1130 | ||
1131 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1131 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1132 | // Compass |
1132 | // Compass |
1133 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1133 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1134 | // compass code is used if Compass option is selected |
1134 | // compass code is used if Compass option is selected |
1135 | if((ParamSet.GlobalConfig & CFG_COMPASS_ACTIVE)) |
1135 | if(ParamSet.GlobalConfig & (CFG_COMPASS_ACTIVE|CFG_GPS_ACTIVE)) |
1136 | { |
1136 | { |
Line 1137... | Line 1137... | ||
1137 | int16_t w, v, r,correction, error; |
1137 | int16_t w, v, r,correction, error; |
1138 | 1138 | ||
Line 1200... | Line 1200... | ||
1200 | BadCompassHeading = 500; |
1200 | BadCompassHeading = 500; |
1201 | } |
1201 | } |
1202 | } |
1202 | } |
1203 | } |
1203 | } |
Line 1204... | Line 1204... | ||
1204 | 1204 | ||
1205 | #if defined (USE_KILLAGREG) || defined (USE_MK3MAG) |
1205 | #if (defined (USE_KILLAGREG) || defined (USE_MK3MAG)) |
1206 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1206 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1207 | // GPS |
1207 | // GPS |
1208 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1208 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1209 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |
1209 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |