Skip to content

Commit

Permalink
Rename LinkController variable to PortControl
Browse files Browse the repository at this point in the history
- PortController was prefereable but clashed with the static class
  PortController, requiring its namespace prefix to be used to
  disinguish it.
  • Loading branch information
jonnew committed Aug 20, 2024
1 parent 44c3e52 commit 54e635b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions OpenEphys.Onix1/ConfigureHeadstage64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace OpenEphys.Onix1
public class ConfigureHeadstage64 : MultiDeviceFactory
{
PortName port;
readonly ConfigureHeadstage64PortController LinkController = new();
readonly ConfigureHeadstage64PortController PortControl = new();

/// <summary>
/// Initializes a new instance of the <see cref="ConfigureHeadstage64"/> class.
Expand All @@ -35,7 +35,7 @@ public ConfigureHeadstage64()
// The FMC port voltage can only go down to 3.3V, which means that its very hard to find the true lowest voltage
// for a lock and then add a large offset to that. Fixing this requires a hardware change.
Port = PortName.PortA;
LinkController.HubConfiguration = HubConfiguration.Standard;
PortControl.HubConfiguration = HubConfiguration.Standard;
}

/// <summary>
Expand Down Expand Up @@ -92,7 +92,7 @@ public PortName Port
{
port = value;
var offset = (uint)port << 8;
LinkController.DeviceAddress = (uint)port;
PortControl.DeviceAddress = (uint)port;
Rhd2164.DeviceAddress = offset + 0;
Bno055.DeviceAddress = offset + 1;
TS4231.DeviceAddress = offset + 2;
Expand Down Expand Up @@ -122,13 +122,13 @@ public PortName Port
"Supplying higher voltages may result in damage to the headstage.")]
public double? PortVoltage
{
get => LinkController.PortVoltage;
set => LinkController.PortVoltage = value;
get => PortControl.PortVoltage;
set => PortControl.PortVoltage = value;
}

internal override IEnumerable<IDeviceConfiguration> GetDevices()
{
yield return LinkController;
yield return PortControl;
yield return Rhd2164;
yield return Bno055;
yield return TS4231;
Expand Down
12 changes: 6 additions & 6 deletions OpenEphys.Onix1/ConfigureNeuropixelsV1eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ namespace OpenEphys.Onix1
public class ConfigureNeuropixelsV1eHeadstage : MultiDeviceFactory
{
PortName port;
readonly ConfigureNeuropixelsV1ePortController LinkController = new();
readonly ConfigureNeuropixelsV1ePortController PortControl = new();

/// <summary>
/// Initialize a new instance of a <see cref="ConfigureNeuropixelsV1eHeadstage"/> class.
/// </summary>
public ConfigureNeuropixelsV1eHeadstage()
{
Port = PortName.PortA;
LinkController.HubConfiguration = HubConfiguration.Passthrough;
PortControl.HubConfiguration = HubConfiguration.Passthrough;
}

/// <summary>
Expand Down Expand Up @@ -52,7 +52,7 @@ public PortName Port
{
port = value;
var offset = (uint)port << 8;
LinkController.DeviceAddress = (uint)port;
PortControl.DeviceAddress = (uint)port;
NeuropixelsV1e.DeviceAddress = offset + 0;
Bno055.DeviceAddress = offset + 1;
}
Expand All @@ -72,13 +72,13 @@ public PortName Port
"for proper operation. Higher voltages can damage the headstage.")]
public double? PortVoltage
{
get => LinkController.PortVoltage;
set => LinkController.PortVoltage = value;
get => PortControl.PortVoltage;
set => PortControl.PortVoltage = value;
}

internal override IEnumerable<IDeviceConfiguration> GetDevices()
{
yield return LinkController;
yield return PortControl;
yield return NeuropixelsV1e;
yield return Bno055;
}
Expand Down
12 changes: 6 additions & 6 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eBetaHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ namespace OpenEphys.Onix1
public class ConfigureNeuropixelsV2eBetaHeadstage : MultiDeviceFactory
{
PortName port;
readonly ConfigureNeuropixelsV2ePortController LinkController = new();
readonly ConfigureNeuropixelsV2ePortController PortControl = new();

/// <summary>
/// Initialize a new instance of a <see cref="ConfigureNeuropixelsV2eBetaHeadstage"/> class.
/// </summary>
public ConfigureNeuropixelsV2eBetaHeadstage()
{
Port = PortName.PortA;
LinkController.HubConfiguration = HubConfiguration.Passthrough;
PortControl.HubConfiguration = HubConfiguration.Passthrough;
}

/// <summary>
Expand Down Expand Up @@ -51,7 +51,7 @@ public PortName Port
{
port = value;
var offset = (uint)port << 8;
LinkController.DeviceAddress = (uint)port;
PortControl.DeviceAddress = (uint)port;
NeuropixelsV2eBeta.DeviceAddress = offset + 0;
Bno055.DeviceAddress = offset + 1;
}
Expand All @@ -71,13 +71,13 @@ public PortName Port
"for proper operation. Higher voltages can damage the headstage.")]
public double? PortVoltage
{
get => LinkController.PortVoltage;
set => LinkController.PortVoltage = value;
get => PortControl.PortVoltage;
set => PortControl.PortVoltage = value;
}

internal override IEnumerable<IDeviceConfiguration> GetDevices()
{
yield return LinkController;
yield return PortControl;
yield return NeuropixelsV2eBeta;
yield return Bno055;
}
Expand Down
12 changes: 6 additions & 6 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ namespace OpenEphys.Onix1
public class ConfigureNeuropixelsV2eHeadstage : MultiDeviceFactory
{
PortName port;
readonly ConfigureNeuropixelsV2ePortController LinkController = new();
readonly ConfigureNeuropixelsV2ePortController PortControl = new();

/// <summary>
/// Initialize a new instance of a <see cref="ConfigureNeuropixelsV2e"/> class.
/// </summary>
public ConfigureNeuropixelsV2eHeadstage()
{
Port = PortName.PortA;
LinkController.HubConfiguration = HubConfiguration.Passthrough;
PortControl.HubConfiguration = HubConfiguration.Passthrough;
}

/// <summary>
Expand Down Expand Up @@ -51,7 +51,7 @@ public PortName Port
{
port = value;
var offset = (uint)port << 8;
LinkController.DeviceAddress = (uint)port;
PortControl.DeviceAddress = (uint)port;
NeuropixelsV2e.DeviceAddress = offset + 0;
Bno055.DeviceAddress = offset + 1;
}
Expand All @@ -71,13 +71,13 @@ public PortName Port
"for proper operation. Higher voltages can damage the headstage.")]
public double? PortVoltage
{
get => LinkController.PortVoltage;
set => LinkController.PortVoltage = value;
get => PortControl.PortVoltage;
set => PortControl.PortVoltage = value;
}

internal override IEnumerable<IDeviceConfiguration> GetDevices()
{
yield return LinkController;
yield return PortControl;
yield return NeuropixelsV2e;
yield return Bno055;
}
Expand Down

0 comments on commit 54e635b

Please sign in to comment.