Browse Source

Bug fix for issue 438.

The rate in a change alt command does not need to be signed.  The code will determine if the rate needs to be positive or negative
mission-4.1.18
Doug Weibel 13 years ago
parent
commit
44c66c2e8e
  1. 3
      ArduPlane/commands_logic.pde

3
ArduPlane/commands_logic.pde

@ -413,8 +413,9 @@ static void do_wait_delay() @@ -413,8 +413,9 @@ static void do_wait_delay()
static void do_change_alt()
{
condition_rate = next_nonnav_command.lat;
condition_rate = abs((int)next_nonnav_command.lat);
condition_value = next_nonnav_command.alt;
if(condition_value < current_loc.alt) condition_rate = -condition_rate;
target_altitude = current_loc.alt + (condition_rate / 10); // Divide by ten for 10Hz update
next_WP.alt = condition_value; // For future nav calculations
offset_altitude = 0; // For future nav calculations

Loading…
Cancel
Save