mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Mission: mark mission as changed upon mission clear
This commit is contained in:
parent
50fb56a74f
commit
c2d91a3bdb
@ -241,7 +241,7 @@ bool AP_Mission::clear()
|
||||
}
|
||||
|
||||
// remove all commands
|
||||
_cmd_total.set_and_save(0);
|
||||
truncate(0);
|
||||
|
||||
// clear index to commands
|
||||
_nav_cmd.index = AP_MISSION_CMD_INDEX_NONE;
|
||||
@ -259,6 +259,7 @@ void AP_Mission::truncate(uint16_t index)
|
||||
{
|
||||
if ((unsigned)_cmd_total > index) {
|
||||
_cmd_total.set_and_save(index);
|
||||
_last_change_time_ms = AP_HAL::millis();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user