Skip to content

Commit

Permalink
Merge pull request #219 from open-ephys/issue-83
Browse files Browse the repository at this point in the history
Propogate boolean in Headstage64 stimulator triggers
  • Loading branch information
jonnew authored Aug 20, 2024
2 parents 3563597 + 3305365 commit fd861a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion OpenEphys.Onix1/Headstage64ElectricalStimulatorTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ public override IObservable<bool> Process(IObservable<bool> source)
{
var device = deviceInfo.GetDeviceContext(typeof(Headstage64ElectricalStimulator));
var triggerObserver = Observer.Create<bool>(
value => device.WriteRegister(Headstage64ElectricalStimulator.TRIGGER, value ? 1u : 0u),
value =>
{
device.WriteRegister(Headstage64ElectricalStimulator.TRIGGER, value ? 1u : 0u);
observer.OnNext(value);
},
observer.OnError,
observer.OnCompleted);

Expand Down
6 changes: 5 additions & 1 deletion OpenEphys.Onix1/Headstage64OpticalStimulatorTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ public override IObservable<bool> Process(IObservable<bool> source)
{
var device = deviceInfo.GetDeviceContext(typeof(Headstage64OpticalStimulator));
var triggerObserver = Observer.Create<bool>(
value => device.WriteRegister(Headstage64OpticalStimulator.TRIGGER, value ? 1u : 0u),
value =>
{
device.WriteRegister(Headstage64OpticalStimulator.TRIGGER, value ? 1u : 0u);
observer.OnNext(value);
},
observer.OnError,
observer.OnCompleted);

Expand Down

0 comments on commit fd861a0

Please sign in to comment.