arm_auth: use ack reception timestamp to compute authorization timeout

This commit is contained in:
Nicolas MARTIN
2020-09-14 15:11:19 +02:00
committed by Beat Küng
parent e89c21155a
commit 6579544fca
@@ -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: