-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #329 from patrickmcquay/parameter-id-duplication-l…
…oading-fix Parameter id duplication loading fix
- Loading branch information
Showing
10 changed files
with
90 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,9 +154,10 @@ private void FillPortList() | |
this.serialPortList.Items.Add(portInfo); | ||
} | ||
|
||
// This is useful for testing without an actual PCM. | ||
// You'll need to uncomment a line in FillSerialDeviceList as well as this one. | ||
// this.serialPortList.Items.Add(MockPort.PortName); | ||
// This is useful for testing without an actual PCM. | ||
#if DEBUG | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
patrickmcquay
Contributor
|
||
this.serialPortList.Items.Add(MockPort.PortName); | ||
#endif | ||
} | ||
|
||
/// <summary> | ||
|
@@ -171,8 +172,9 @@ private void FillSerialDeviceList() | |
this.serialDeviceList.Items.Add(OBDXProDevice.DeviceType); | ||
|
||
// This is useful for testing without an actual PCM. | ||
// You'll need to uncomment a line in FillPortList as well as this one. | ||
// this.serialDeviceList.Items.Add(MockDevice.DeviceType); | ||
#if DEBUG | ||
this.serialDeviceList.Items.Add(MockDevice.DeviceType); | ||
#endif | ||
} | ||
|
||
/// <summary> | ||
|
@@ -249,6 +251,13 @@ private void j2534RadioButton_CheckedChanged(object sender, EventArgs e) | |
/// </summary> | ||
private void serialPortList_SelectedIndexChanged(object sender, EventArgs e) | ||
{ | ||
//mock port isnt a SerialPortInfo | ||
if (this.serialPortList.SelectedItem is String) | ||
{ | ||
this.SerialPort = this.serialPortList.SelectedItem as String; | ||
return; | ||
} | ||
|
||
this.SerialPort = (this.serialPortList.SelectedItem as SerialPortInfo)?.PortName; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, I have not had the ability to test this request, I do not believe the directive constant DEBUG can be used!
PCMHammer is released as DEBUG, thus this would be enabled all the time.
I do not believe this to be the correct state of MockPort for normal use.
I would recommend MOCKPORT.