From 5c7185b9c7e496185a409b93b132ec050c29831a Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Fri, 20 Sep 2024 09:46:03 +1000 Subject: [PATCH] MAVLinkInterface: add timestamp decoding --- ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs index 3187974fd3..a1afc18261 100644 --- a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs +++ b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs @@ -5005,6 +5005,9 @@ public async Task readPacketAsync() return MAVLinkMessage.Invalid; } } + + var timestamp = new DateTime(2015, 1, 1).AddMilliseconds(message.sigTimestamp / 100.0); + var delta = DateTime.UtcNow - timestamp; } // packet is now verified