mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Refactor obsolete comport instantiation method for DGE devices
This commit is contained in:
parent
4c5b60bddb
commit
d11e0db14a
3 changed files with 39 additions and 71 deletions
|
|
@ -27,7 +27,16 @@ namespace PepperDash.Essentials.Core
|
|||
{
|
||||
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
|
||||
|
||||
CommPort = CommFactory.CreateCommForDevice(config);
|
||||
var commPort = CommFactory.CreateCommForDevice(config);
|
||||
|
||||
//Fixing decision to require '-comPorts' in delcaration for DGE in order to get a device with comports included
|
||||
if (commPort == null)
|
||||
{
|
||||
config.Key = config.Key + "-comPorts";
|
||||
commPort = CommFactory.CreateCommForDevice(config);
|
||||
}
|
||||
|
||||
CommPort = commPort;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue