From 6579544fca2ecce4d56644c116372841c36e8e0c Mon Sep 17 00:00:00 2001 From: Nicolas MARTIN Date: Mon, 14 Sep 2020 15:11:19 +0200 Subject: [PATCH] arm_auth: use ack reception timestamp to compute authorization timeout --- .../commander/Arming/ArmAuthorization/ArmAuthorization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/Arming/ArmAuthorization/ArmAuthorization.cpp b/src/modules/commander/Arming/ArmAuthorization/ArmAuthorization.cpp index 6ea371cfb3..631fa7f29b 100644 --- a/src/modules/commander/Arming/ArmAuthorization/ArmAuthorization.cpp +++ b/src/modules/commander/Arming/ArmAuthorization/ArmAuthorization.cpp @@ -230,7 +230,7 @@ void arm_auth_update(hrt_abstime now, bool param_update) "Arm auth: Authorized for the next %u seconds", command_ack.result_param2); state = ARM_AUTH_MISSION_APPROVED; - auth_timeout = now + (command_ack.result_param2 * 1000000); + auth_timeout = command_ack.timestamp + (command_ack.result_param2 * 1000000); return; case vehicle_command_ack_s::VEHICLE_RESULT_TEMPORARILY_REJECTED: