Subversion Repositories FlightCtrl

Rev

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

Rev 2056 Rev 2058
Line 44... Line 44...
44
        // stop motors but stay in emergency flight.
44
        // stop motors but stay in emergency flight.
45
        MKFlags &= ~(MKFLAG_MOTOR_RUN);
45
        MKFlags &= ~(MKFLAG_MOTOR_RUN);
46
      }
46
      }
47
    }
47
    }
Line 48... Line 48...
48
 
48
 
49
    // In either case, use e. throttle.
49
    // In either case, use e. throttle and neutral controls. TODO: If there is supposed to be a navi come-home, this should affect RC control only and not navi.
-
 
50
    PRTY[CONTROL_THROTTLE] = staticParams.emergencyThrottle; // Set emergency throttle
50
    PRTY[CONTROL_THROTTLE] = staticParams.emergencyThrottle; // Set emergency throttle
51
    PRTY[CONTROL_PITCH] = PRTY[CONTROL_ROLL] = PRTY[CONTROL_YAW] = 0;
51
  } else {
52
  } else {
52
    // Signal is OK.
53
    // Signal is OK.
53
    if (MKFlags & MKFLAG_EMERGENCY_FLIGHT) {
54
    if (MKFlags & MKFLAG_EMERGENCY_FLIGHT) {
54
      MKFlags &= ~MKFLAG_EMERGENCY_FLIGHT; // Clear flag for emergency landing
55
      MKFlags &= ~MKFLAG_EMERGENCY_FLIGHT; // Clear flag for emergency landing