mirror of https://github.com/ArduPilot/ardupilot
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'
This commit is contained in:
parent
090068bee4
commit
11835508a7
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue