From 53cb45bb3c56866752458e4ada4ad29934e0f88a Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Mon, 18 Nov 2024 14:15:21 +1100 Subject: [PATCH] CurrentState: add AIRSPEED message --- ExtLibs/ArduPilot/CurrentState.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ExtLibs/ArduPilot/CurrentState.cs b/ExtLibs/ArduPilot/CurrentState.cs index 16eec0d3ed..3fb2792786 100644 --- a/ExtLibs/ArduPilot/CurrentState.cs +++ b/ExtLibs/ArduPilot/CurrentState.cs @@ -4051,10 +4051,23 @@ private void Parent_OnPacketReceived(object sender, MAVLink.MAVLinkMessage mavLi ahrs2_lng = ahrs2.lng / 1e7; } break; + case (uint)MAVLink.MAVLINK_MSG_ID.AIRSPEED: + { + var airspeedp = mavLinkMessage.ToStructure(); + + if(airspeedp.id == 0) + { + airspeed = airspeedp.airspeed; + airspeed1_temp = (float)(airspeedp.temperature / 100.0); + } + } + break; case (uint)MAVLink.MAVLINK_MSG_ID.CAN_FRAME: case (uint)MAVLink.MAVLINK_MSG_ID.CANFD_FRAME: case (uint)MAVLink.MAVLINK_MSG_ID.FILE_TRANSFER_PROTOCOL: case (uint)MAVLink.MAVLINK_MSG_ID.LOG_DATA: + case (uint)MAVLink.MAVLINK_MSG_ID.DEVICE_OP_WRITE_REPLY: + case (uint)MAVLink.MAVLINK_MSG_ID.TIMESYNC: break; default: {