Rev 943 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 943 | Rev 957 | ||
---|---|---|---|
Line 168... | Line 168... | ||
168 | { |
168 | { |
169 | if(MKFlags & MKFLAG_MOTOR_RUN) return; //auf keinen Fall bei laufenden Motoren! |
169 | if(MKFlags & MKFLAG_MOTOR_RUN) return; //auf keinen Fall bei laufenden Motoren! |
170 | BeepTime = 100; // 0.1 second |
170 | BeepTime = 100; // 0.1 second |
171 | Delay_ms(250); // blocks 250 ms as pause to next beep, |
171 | Delay_ms(250); // blocks 250 ms as pause to next beep, |
172 | // this will block the flight control loop, |
172 | // this will block the flight control loop, |
173 | // therefore do not use this funktion if motors are running |
173 | // therefore do not use this function if motors are running |
174 | } |
174 | } |
175 | } |
175 | } |
Line 176... | Line 176... | ||
176 | 176 | ||
177 | /************************************************************************/ |
177 | /************************************************************************/ |
Line 641... | Line 641... | ||
641 | SetNeutral(); |
641 | SetNeutral(); |
642 | Beep(GetActiveParamSet()); |
642 | Beep(GetActiveParamSet()); |
643 | } |
643 | } |
644 | else |
644 | else |
645 | { |
645 | { |
646 | if((ParamSet.GlobalConfig & CFG_COMPASS_ACTIVE)) |
646 | if(ParamSet.GlobalConfig & (CFG_COMPASS_ACTIVE|CFG_GPS_ACTIVE)) |
647 | { |
647 | { |
648 | // if roll stick is centered and nick stick is down |
648 | // if roll stick is centered and nick stick is down |
649 | if (abs(PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]) < 20 && PPM_in[ParamSet.ChannelAssignment[CH_NICK]] < -70) |
649 | if (abs(PPM_in[ParamSet.ChannelAssignment[CH_ROLL]]) < 20 && PPM_in[ParamSet.ChannelAssignment[CH_NICK]] < -70) |
650 | { |
650 | { |
651 | // nick/roll joystick |
651 | // nick/roll joystick |
Line 1144... | Line 1144... | ||
1144 | 1144 | ||
1145 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1145 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1146 | // Compass |
1146 | // Compass |
1147 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1147 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1148 | // compass code is used if Compass option is selected |
1148 | // compass code is used if Compass option is selected |
1149 | if((ParamSet.GlobalConfig & CFG_COMPASS_ACTIVE)) |
1149 | if(ParamSet.GlobalConfig & (CFG_COMPASS_ACTIVE|CFG_GPS_ACTIVE)) |
1150 | { |
1150 | { |
Line 1151... | Line 1151... | ||
1151 | int16_t w, v, r,correction, error; |
1151 | int16_t w, v, r,correction, error; |
1152 | 1152 | ||
Line 1214... | Line 1214... | ||
1214 | BadCompassHeading = 500; |
1214 | BadCompassHeading = 500; |
1215 | } |
1215 | } |
1216 | } |
1216 | } |
1217 | } |
1217 | } |
Line 1218... | Line 1218... | ||
1218 | 1218 | ||
1219 | #if defined (USE_KILLAGREG) || defined (USE_MK3MAG) |
1219 | #if (defined (USE_KILLAGREG) || defined (USE_MK3MAG)) |
1220 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1220 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1221 | // GPS |
1221 | // GPS |
1222 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1222 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1223 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |
1223 | if(ParamSet.GlobalConfig & CFG_GPS_ACTIVE) |