diff --git a/Daqifi.Desktop/Device/AbstractStreamingDevice.cs b/Daqifi.Desktop/Device/AbstractStreamingDevice.cs index b70c44e3..bfdcb816 100644 --- a/Daqifi.Desktop/Device/AbstractStreamingDevice.cs +++ b/Daqifi.Desktop/Device/AbstractStreamingDevice.cs @@ -200,7 +200,7 @@ private void HandleStreamingMessageReceived(object sender, MessageEventArgs e) } // Loop through channels for this device - foreach (var channel in DataChannels.Where(c => c.IsActive && c.Direction == ChannelDirection.Input)) + foreach (var channel in DataChannels.Where(c => c.IsActive)) { try { @@ -216,8 +216,11 @@ private void HandleStreamingMessageReceived(object sender, MessageEventArgs e) bit = (digitalData2 & (1 << digitalCount % 8)) != 0; } - // Assign the sample for the digital channel - channel.ActiveSample = new DataSample(this, channel, messageTimestamp, Convert.ToInt32(bit)); + // Assign the sample for the digital input channel + if (channel.Direction == ChannelDirection.Input) + { + channel.ActiveSample = new DataSample(this, channel, messageTimestamp, Convert.ToInt32(bit)); + } digitalCount++; } else if (channel.Type == ChannelType.Analog && hasAnalogData) diff --git a/Daqifi.Desktop/View/Flyouts/ChannelsFlyout.xaml b/Daqifi.Desktop/View/Flyouts/ChannelsFlyout.xaml index f0f6395e..3c297306 100644 --- a/Daqifi.Desktop/View/Flyouts/ChannelsFlyout.xaml +++ b/Daqifi.Desktop/View/Flyouts/ChannelsFlyout.xaml @@ -87,7 +87,7 @@ - +