moves Port registration for controller ports to ConfigureComPort

...and renames method to RegisterAndConfigureComPort
This commit is contained in:
Andrew Welker
2020-04-28 08:54:38 -06:00
parent 1acc018a81
commit 671d506b45

View File

@@ -47,6 +47,12 @@ namespace PepperDash.Essentials.Core
Spec = spec; Spec = spec;
//IsConnected = new BoolFeedback(CommonBoolCue.IsConnected, () => true); //IsConnected = new BoolFeedback(CommonBoolCue.IsConnected, () => true);
ConfigureComPort();
}
private void ConfigureComPort()
{
if (Port.Parent is CrestronControlSystem) if (Port.Parent is CrestronControlSystem)
{ {
@@ -58,11 +64,7 @@ namespace PepperDash.Essentials.Core
return; // false return; // false
} }
} }
ConfigureComPort();
}
private void ConfigureComPort()
{
var specResult = Port.SetComPortSpec(Spec); var specResult = Port.SetComPortSpec(Spec);
if (specResult != 0) if (specResult != 0)
{ {