Skip to content

Commit

Permalink
Default to first available COM port
Browse files Browse the repository at this point in the history
I believe the intent of this line is to default to an available COM port, but as written I don't think it functions.

Adding the index at least selects the first COM list found to be available.

This also serves to fill the dropdown with a possible option. When empty (as it would be upon opening previously) I found the empty dropdown easy to overlook.
  • Loading branch information
Ruthalas authored and blackspherefollower committed Jul 21, 2020
1 parent fcfb158 commit 2c9f26c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NogasmChart/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public MainWindow()

MenuFileSave.IsEnabled = false;

ComPort.SelectedItem = SerialPort.GetPortNames();
ComPort.SelectedItem = SerialPort.GetPortNames()[0];

// ToDo: Make this selectable
_analyser = new NogasmMotorDirectAnalyser();
Expand Down

0 comments on commit 2c9f26c

Please sign in to comment.