diff --git a/Daqifi.Desktop.Test/Device/AbstractStreamingDeviceTests.cs b/Daqifi.Desktop.Test/Device/AbstractStreamingDeviceTests.cs index 8ce2bdb3..7d23c52c 100644 --- a/Daqifi.Desktop.Test/Device/AbstractStreamingDeviceTests.cs +++ b/Daqifi.Desktop.Test/Device/AbstractStreamingDeviceTests.cs @@ -586,8 +586,8 @@ public void StartSdCardLogging_UsesCombinedAnalogMaskAndConfiguresDigitalPortsOn "Core handles this via the channelMask parameter."); CollectionAssert.Contains( device.SentCommands, - $"core:{ScpiMessageProducer.EnableAdcChannels("10101").Data}", - "Core should receive a single combined binary analog mask for the active SD logging channels."); + $"core:{ScpiMessageProducer.EnableAdcChannels("21").Data}", + "Core should receive a decimal channel mask for the active SD logging channels."); } [TestMethod] diff --git a/Daqifi.Desktop/Device/AbstractStreamingDevice.cs b/Daqifi.Desktop/Device/AbstractStreamingDevice.cs index dcfefa45..50dad990 100644 --- a/Daqifi.Desktop/Device/AbstractStreamingDevice.cs +++ b/Daqifi.Desktop/Device/AbstractStreamingDevice.cs @@ -473,7 +473,7 @@ public void StartSdCardLogging() // The Core package resumes StartSdCardLoggingAsync continuations on the caller's // synchronization context. Running it on the thread pool prevents UI deadlocks. - var channelMaskString = Convert.ToString((long)analogChannelMask, 2); + var channelMaskString = analogChannelMask.ToString(CultureInfo.InvariantCulture); Task.Run(() => coreDevice.StartSdCardLoggingAsync(channelMask: channelMaskString, format: SdCardLogFormat)).GetAwaiter().GetResult(); IsLoggingToSdCard = coreDevice.IsLoggingToSdCard;