Skip to content

Commit

Permalink
CurrentState: add AIRSPEED message
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Nov 18, 2024
1 parent 2e493f7 commit 53cb45b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ExtLibs/ArduPilot/CurrentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<MAVLink.mavlink_airspeed_t>();

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:
{
Expand Down

0 comments on commit 53cb45b

Please sign in to comment.