Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix coax and single copter firmware type setting #2680

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public static GMapMarker getMAVMarker(MAVState MAV)
return (new GMapMarkerAntennaTracker(portlocation, MAV.cs.yaw,
MAV.cs.target_bearing){ Tag = MAV});
}
else if (MAV.aptype == MAVLink.MAV_TYPE.COAXIAL)
{
return (new GMapMarkerSingle(portlocation, MAV.cs.yaw,
MAV.cs.groundcourse, MAV.cs.nav_bearing, MAV.sysid)
{ Tag = MAV });
}
else if (MAV.cs.firmware == Firmwares.ArduCopter2 || MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR)
{
if (MAV.param.ContainsKey("AVD_W_DIST_XY") && MAV.param.ContainsKey("AVD_F_DIST_XY"))
Expand All @@ -88,11 +94,6 @@ public static GMapMarker getMAVMarker(MAVState MAV)
Tag = MAV
});
}
else if (MAV.aptype == MAVLink.MAV_TYPE.COAXIAL)
{
return (new GMapMarkerSingle(portlocation, MAV.cs.yaw,
MAV.cs.groundcourse, MAV.cs.nav_bearing, MAV.sysid){ Tag = MAV});
}
else
{
// unknown type
Expand Down
4 changes: 3 additions & 1 deletion ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6297,7 +6297,9 @@ public void setAPType(byte sysid, byte compid)
case MAV_TYPE.ANTENNA_TRACKER:
MAVlist[sysid, compid].cs.firmware = Firmwares.ArduTracker;
break;

case MAV_TYPE.COAXIAL:
MAVlist[sysid, compid].cs.firmware = Firmwares.ArduCopter2;
break;
default:
MAVlist[sysid, compid].cs.firmware = Firmwares.Other;
log.Error(MAVlist[sysid, compid].aptype + " not registered as valid type");
Expand Down