Skip to content
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
3 changes: 2 additions & 1 deletion ExtLibs/Comms/MissionPlanner.Comms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<Compile Remove="System.IO.Ports\**" />
<EmbeddedResource Remove="System.IO.Ports\**" />
<None Remove="System.IO.Ports\**" />
<Compile Remove="CommsWinUSB.cs" Condition="'$(OS)' != 'Windows_NT'" />
</ItemGroup>

<ItemGroup>
Expand All @@ -44,7 +45,7 @@

<ItemGroup>
<ProjectReference Include="..\Interfaces\Interfaces.csproj" />
<ProjectReference Include="..\WinUSBNet\Nefarius.Drivers.WinUSB.csproj" />
<ProjectReference Include="..\WinUSBNet\Nefarius.Drivers.WinUSB.csproj" Condition="'$(OS)' == 'Windows_NT'" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions MainV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3601,14 +3601,18 @@ protected override void OnLoad(EventArgs e)
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
MissionPlanner.Comms.CommsBLE.SerialPort_GetCustomPorts();

#if !LIB
MissionPlanner.Comms.CommsWinUSB.SerialPort_GetCustomPorts();
#endif
}
catch { }

// add the custom port creator
CustomPortList.Add(new Regex("BLE_.*"), (s1, s2) => { return new CommsBLE() { PortName = s1, BaudRate = int.Parse(s2) }; });

#if !LIB
CustomPortList.Add(new Regex("WINUSB_VID_.*"), (s1, s2) => { return new CommsWinUSB() { PortName = s1, BaudRate = int.Parse(s2) }; });
#endif

this.ResumeLayout();

Expand Down
Loading