From 11835508a77ec6640580a90b4ab0ab392886896a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 14 Feb 2012 15:20:44 +1100 Subject: [PATCH] when setting airspeed and groundspeed in a mission, don't save to EEPROM If you include airspeed, throttle or groundspeed changes in a mission then those should not be saved to EEPROM, as otherwise if you restart and re-fly the mission you will be starting with different parameters to the ones you used for the first flight. This is particularly important for setting the target airspeed when coming in for a landing. You typically set a low target, but if you fly again the next day I think it would be a real surprise to find that your loiter airspeed has then changed to the value from the landing part of your last mission. This one can be argued either way, but I think that not saving these changes is the more conservative choice, and better fits the 'principal of least surprise' --- ArduPlane/commands_logic.pde | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduPlane/commands_logic.pde b/ArduPlane/commands_logic.pde index 0dff0191d4..c3a53ed7b9 100644 --- a/ArduPlane/commands_logic.pde +++ b/ArduPlane/commands_logic.pde @@ -489,15 +489,15 @@ static void do_change_speed() { case 0: // Airspeed if(next_nonnav_command.alt > 0) - g.airspeed_cruise.set_and_save(next_nonnav_command.alt * 100); + g.airspeed_cruise.set(next_nonnav_command.alt * 100); break; case 1: // Ground speed - g.min_gndspeed.set_and_save(next_nonnav_command.alt * 100); + g.min_gndspeed.set(next_nonnav_command.alt * 100); break; } if(next_nonnav_command.lat > 0) - g.throttle_cruise.set_and_save(next_nonnav_command.lat); + g.throttle_cruise.set(next_nonnav_command.lat); } static void do_set_home()