mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 09:15:06 +00:00
Refactor obsolete comport instantiation method for DGE devices
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user