Skip to content

Commit

Permalink
DroneCAN: ignore device name and hw version
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Dec 18, 2024
1 parent b543427 commit bcca100
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ExtLibs/DroneCAN/DroneCAN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,12 +1129,14 @@ public void Update(byte nodeid, string devicename, double hwversion, string firm
var gnires = msg as DroneCAN.uavcan_protocol_GetNodeInfo_res;
Console.WriteLine(frame.SourceNode + " " + "GetNodeInfo: seen '{0}' from {1}",
ASCIIEncoding.ASCII.GetString(gnires.name).TrimEnd('\0'), frame.SourceNode);
if (devicename == ASCIIEncoding.ASCII.GetString(gnires.name).TrimEnd('\0') ||
// ignore devicename, managed by the device itself
if (true || devicename == ASCIIEncoding.ASCII.GetString(gnires.name).TrimEnd('\0') ||
devicename == ASCIIEncoding.ASCII.GetString(gnires.name).TrimEnd('\0') + "-BL" || gnires.name_len == 0)
{
if (firmware_crc != gnires.software_version.image_crc || firmware_crc == ulong.MaxValue)
{
if (hwversion ==
// ignore hw version
if (true || hwversion ==
double.Parse(gnires.hardware_version.major + "." + gnires.hardware_version.minor,
CultureInfo.InvariantCulture) || hwversion == 0)
{
Expand Down

0 comments on commit bcca100

Please sign in to comment.