Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Daqifi.Desktop/Device/AbstractStreamingDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Daqifi.Desktop/View/Flyouts/ChannelsFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Controls:ToggleSwitch Grid.Row="0" IsOn="{Binding SelectedChannel.IsDigitalOn, Mode=TwoWay}" OffContent="On" OnContent="Off" HorizontalAlignment="Center"/>
<Controls:ToggleSwitch Grid.Row="0" IsOn="{Binding SelectedChannel.IsDigitalOn, Mode=TwoWay}" OffContent="Off" OnContent="On" HorizontalAlignment="Center"/>
</Grid>
</GroupBox>
</Grid>
Expand Down