Browse Source

Copter: correct compilation when CIRCLE mode is disabled

zr-v5.1
Peter Barker 4 years ago committed by Peter Barker
parent
commit
4136397810
  1. 2
      ArduCopter/autoyaw.cpp
  2. 2
      ArduCopter/sensors.cpp

2
ArduCopter/autoyaw.cpp

@ -202,9 +202,11 @@ float Mode::AutoYaw::yaw() @@ -202,9 +202,11 @@ float Mode::AutoYaw::yaw()
return copter.initial_armed_bearing;
case AUTO_YAW_CIRCLE:
#if MODE_CIRCLE_ENABLED
if (copter.circle_nav->is_active()) {
return copter.circle_nav->get_yaw();
}
#endif
// return the current attitude target
return wrap_360_cd(copter.attitude_control->get_att_target_euler_cd().z);

2
ArduCopter/sensors.cpp

@ -94,7 +94,9 @@ void Copter::read_rangefinder(void) @@ -94,7 +94,9 @@ void Copter::read_rangefinder(void)
if (rf_orient == ROTATION_PITCH_270) {
if (rangefinder_state.alt_healthy || timed_out) {
wp_nav->set_rangefinder_alt(rangefinder_state.enabled, rangefinder_state.alt_healthy, rangefinder_state.alt_cm_filt.get());
#if MODE_CIRCLE_ENABLED
circle_nav->set_rangefinder_alt(rangefinder_state.enabled && wp_nav->rangefinder_used(), rangefinder_state.alt_healthy, rangefinder_state.alt_cm_filt.get());
#endif
}
}
}

Loading…
Cancel
Save