Skip to content

Commit 3305365

Browse files
committed
Propogate boolean in Headstage64 stimulator triggers
- These operators were not acting as sinks because they were not propogating their observable sequence - Fixes #83
1 parent 7ac700f commit 3305365

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

OpenEphys.Onix1/Headstage64ElectricalStimulatorTrigger.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ public override IObservable<bool> Process(IObservable<bool> source)
208208
{
209209
var device = deviceInfo.GetDeviceContext(typeof(Headstage64ElectricalStimulator));
210210
var triggerObserver = Observer.Create<bool>(
211-
value => device.WriteRegister(Headstage64ElectricalStimulator.TRIGGER, value ? 1u : 0u),
211+
value =>
212+
{
213+
device.WriteRegister(Headstage64ElectricalStimulator.TRIGGER, value ? 1u : 0u);
214+
observer.OnNext(value);
215+
},
212216
observer.OnError,
213217
observer.OnCompleted);
214218

OpenEphys.Onix1/Headstage64OpticalStimulatorTrigger.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ public override IObservable<bool> Process(IObservable<bool> source)
202202
{
203203
var device = deviceInfo.GetDeviceContext(typeof(Headstage64OpticalStimulator));
204204
var triggerObserver = Observer.Create<bool>(
205-
value => device.WriteRegister(Headstage64OpticalStimulator.TRIGGER, value ? 1u : 0u),
205+
value =>
206+
{
207+
device.WriteRegister(Headstage64OpticalStimulator.TRIGGER, value ? 1u : 0u);
208+
observer.OnNext(value);
209+
},
206210
observer.OnError,
207211
observer.OnCompleted);
208212

0 commit comments

Comments
 (0)