Skip to content

Commit

Permalink
Carbonix_Plugin: fix firmware version warning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Feb 12, 2025
1 parent d0ed0e0 commit bed931f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/Carbonix/Carbonix_Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ public override bool Loop()
}

// Warn user about unofficial firmware
if (is_connected && !is_armed && !has_warned_firmware && last_firmware_version != Host.comPort?.MAV?.VersionString)
if (is_connected && !is_armed && !has_warned_firmware &&
last_firmware_version != "" &&
last_firmware_version != Host.comPort?.MAV?.VersionString)
{
last_firmware_version = Host.comPort?.MAV?.VersionString;
if (!Regex.IsMatch(last_firmware_version, @"^CxPilot-\d+\.\d+\.\d+(\s+\([a-z0-9]+\))?$", RegexOptions.IgnoreCase))
Expand Down

0 comments on commit bed931f

Please sign in to comment.