diff --git a/src/AllenNeuralDynamics.Zaber/AllenNeuralDynamics.Zaber.csproj b/src/AllenNeuralDynamics.Zaber/AllenNeuralDynamics.Zaber.csproj
index b192a82..3ca057e 100644
--- a/src/AllenNeuralDynamics.Zaber/AllenNeuralDynamics.Zaber.csproj
+++ b/src/AllenNeuralDynamics.Zaber/AllenNeuralDynamics.Zaber.csproj
@@ -9,7 +9,7 @@
Bonsai Rx Zaber AllenNeuralDynamics
net472
strict
- 0.4.2
+ 0.5.0
diff --git a/src/AllenNeuralDynamics.Zaber/GenericCommand.cs b/src/AllenNeuralDynamics.Zaber/GenericCommand.cs
index 53205bc..10e72c2 100644
--- a/src/AllenNeuralDynamics.Zaber/GenericCommand.cs
+++ b/src/AllenNeuralDynamics.Zaber/GenericCommand.cs
@@ -23,7 +23,7 @@ public class GenericCommand : Combinator
/// Gets or sets the device to be controlled. Defaults to 0.
///
[Description("The axis index to be actuated.")]
- public int Device { get; set; } = 0;
+ public int? Device { get; set; }
///
/// Gets or sets the axis of the manipulator to be controlled.
diff --git a/src/AllenNeuralDynamics.Zaber/GenericCommandMultiResponse.cs b/src/AllenNeuralDynamics.Zaber/GenericCommandMultiResponse.cs
index 676f6ac..af226ed 100644
--- a/src/AllenNeuralDynamics.Zaber/GenericCommandMultiResponse.cs
+++ b/src/AllenNeuralDynamics.Zaber/GenericCommandMultiResponse.cs
@@ -24,7 +24,7 @@ public class GenericCommandMultiResponse : Combinator
/// Gets or sets the device to be controlled. Defaults to 0.
///
[Description("The axis index to be actuated.")]
- public int Device { get; set; } = 0;
+ public int? Device { get; set; }
///
/// Gets or sets the axis of the manipulator to be controlled.
diff --git a/src/AllenNeuralDynamics.Zaber/GenericCommandNoResponse.cs b/src/AllenNeuralDynamics.Zaber/GenericCommandNoResponse.cs
index 87749e9..a0a1fdc 100644
--- a/src/AllenNeuralDynamics.Zaber/GenericCommandNoResponse.cs
+++ b/src/AllenNeuralDynamics.Zaber/GenericCommandNoResponse.cs
@@ -24,7 +24,7 @@ public class GenericCommandNoResponse : Sink
/// Gets or sets the device to be controlled. Defaults to 0.
///
[Description("The axis index to be actuated.")]
- public int Device { get; set; } = 0;
+ public int? Device { get; set; }
///
/// Gets or sets the axis of the manipulator to be controlled.
diff --git a/src/AllenNeuralDynamics.Zaber/ZaberDevice.cs b/src/AllenNeuralDynamics.Zaber/ZaberDevice.cs
index c239a79..f8deede 100644
--- a/src/AllenNeuralDynamics.Zaber/ZaberDevice.cs
+++ b/src/AllenNeuralDynamics.Zaber/ZaberDevice.cs
@@ -89,8 +89,9 @@ public void Home(int? deviceIndex, int? axis)
public void GenericCommandNoResponse(int? deviceIndex, int? axis, string command)
{
- var device = devices[deviceIndex.HasValue ? deviceIndex.Value : 0];
- device.GenericCommandNoResponseAsync(command, axis.HasValue? axis.Value : 0);
+ comm.GenericCommandNoResponseAsync(command,
+ deviceIndex.HasValue ? deviceIndex.Value : 0,
+ axis.HasValue? axis.Value : 0);
}
public async Task GetPosition(int? deviceIndex, int axis, Units unit)
@@ -127,14 +128,18 @@ public async Task WaitUntilIdle(int? deviceIndex, int? axis)
public async Task GenericCommandMultiResponse(int? deviceIndex, int? axis, string command)
{
- var device = devices[deviceIndex.HasValue ? deviceIndex.Value : 0];
- return await device.GenericCommandMultiResponseAsync(command, axis.HasValue? axis.Value : 0);
+ return await comm.GenericCommandMultiResponseAsync(
+ command,
+ deviceIndex.HasValue ? deviceIndex.Value : 0,
+ axis.HasValue ? axis.Value : 0);
}
public async Task GenericCommand(int? deviceIndex, int? axis, string command)
{
- var device = devices[deviceIndex.HasValue ? deviceIndex.Value : 0];
- return await device.GenericCommandAsync(command, axis.HasValue ? axis.Value : 0);
+ return await comm.GenericCommandAsync(
+ command,
+ deviceIndex.HasValue ? deviceIndex.Value : 0,
+ axis.HasValue ? axis.Value : 0);
}
///