Skip to content

Commit d8c3337

Browse files
committed
Instantiate member on first open
1 parent c370c58 commit d8c3337

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

OpenEphys.Onix1/ConfigurePortController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public ConfigurePortController()
2222
"Consult the device datasheet and documentation for allowable voltage ranges.")]
2323
[Category(ConfigurationCategory)]
2424
[TypeConverter(typeof(PortVoltageConverter))]
25-
public AutoPortVoltage PortVoltage { get; set; } = null;
25+
public AutoPortVoltage PortVoltage { get; set; } = new();
2626

2727
protected virtual bool CheckLinkState(DeviceContext device)
2828
{
@@ -62,7 +62,6 @@ public override IObservable<ContextTask> Process(IObservable<ContextTask> source
6262
void dispose() { device.WriteRegister(PortController.PORTVOLTAGE, 0); PortVoltage.Applied = null; }
6363
device.WriteRegister(PortController.ENABLE, 1);
6464

65-
//double voltage = portVoltage.Requested.GetValueOrDefault();
6665
bool serdesLock = false;
6766
if (portVoltage.Requested.HasValue)
6867
{

0 commit comments

Comments
 (0)