diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 518780e367..8f2c9c0a6b 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1969,7 +1969,7 @@ void update_throttle_mode(void) case THROTTLE_AUTO: // auto pilot altitude controller with target altitude held in next_WP.alt if(motors.auto_armed() == true) { - get_throttle_althold_with_slew(wp_nav.get_target_alt(), g.auto_velocity_z_min, g.auto_velocity_z_max); + get_throttle_althold_with_slew(wp_nav.get_destination_alt(), g.auto_velocity_z_min, g.auto_velocity_z_max); } break; diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 1bca767626..a74bd8f1f5 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -550,7 +550,7 @@ static void Log_Write_Control_Tuning() throttle_in : g.rc_3.control_in, sonar_alt : sonar_alt, baro_alt : baro_alt, - next_wp_alt : wp_nav.get_target_alt(), + next_wp_alt : wp_nav.get_destination_alt(), nav_throttle : nav_throttle, angle_boost : angle_boost, climb_rate : climb_rate, diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index 9304cf7df3..8712233181 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -190,19 +190,19 @@ static bool check_missed_wp() static void force_new_altitude(float new_alt) { // update new target altitude - wp_nav.set_target_alt(new_alt); + wp_nav.set_destination_alt(new_alt); set_alt_change(REACHED_ALT); } static void set_new_altitude(float new_alt) { // if no change exit immediately - if(new_alt == wp_nav.get_target_alt()) { + if(new_alt == wp_nav.get_destination_alt()) { return; } // update new target altitude - wp_nav.set_target_alt(new_alt); + wp_nav.set_destination_alt(new_alt); if(new_alt > (current_loc.alt + 80)) { // we are below, going up @@ -223,12 +223,12 @@ static void verify_altitude() { if(alt_change_flag == ASCENDING) { // we are below, going up - if(current_loc.alt > wp_nav.get_target_alt() - 50) { + if(current_loc.alt > wp_nav.get_destination_alt() - 50) { set_alt_change(REACHED_ALT); } }else if (alt_change_flag == DESCENDING) { // we are above, going down - if(current_loc.alt <= wp_nav.get_target_alt() + 50){ + if(current_loc.alt <= wp_nav.get_destination_alt() + 50){ set_alt_change(REACHED_ALT); } }