Check manual home set when setting during arming

This commit is contained in:
sanderux
2017-12-20 10:19:07 +01:00
committed by Sander Smeets
parent 964cb486a9
commit a8c26265b5
+2 -1
View File
@@ -971,7 +971,8 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
/* update home position on arming if at least 500 ms from commander start spent to avoid setting home on in-air restart */
if (cmd_arms && (arming_res == TRANSITION_CHANGED) &&
(hrt_absolute_time() > (commander_boot_timestamp + INAIR_RESTART_HOLDOFF_INTERVAL))) {
(hrt_absolute_time() > (commander_boot_timestamp + INAIR_RESTART_HOLDOFF_INTERVAL)) &&
!home->manual_home) {
commander_set_home_position(*home_pub, *home, *local_pos, *global_pos, *attitude, false);
}