Type: Feature
Priority: High
Epic: Enhanced Resolution & Range Support
Description
Update the analog sample scaling algorithm to support any resolution (not just 12-bit) based on device-reported capabilities.
Acceptance Criteria
Current vs Updated Formula
Current (fixed 12-bit):
return analogValue / channel.Resolution * channel.PortRange * channel.CalibrationMValue *
channel.InternalScaleMValue + channel.CalibrationBValue;
Updated (variable resolution):
// Resolution = 2^bits, e.g., 262144 for 18-bit
return analogValue / channel.Resolution * channel.PortRange * channel.CalibrationMValue *
channel.InternalScaleMValue + channel.CalibrationBValue;
Files to Modify
Daqifi.Desktop/Device/AbstractStreamingDevice.cs (ScaleAnalogSample method)
Value
Correctly scales 18-bit data from Nyquist 3 and maintains accuracy for future higher-resolution devices
Testing Requirements
- Test 12-bit scaling (Nyquist 1 compatibility)
- Test 18-bit scaling (Nyquist 3)
- Test edge cases (8-bit, 24-bit)
- Verify scaling accuracy with known test values
Type: Feature
Priority: High
Epic: Enhanced Resolution & Range Support
Description
Update the analog sample scaling algorithm to support any resolution (not just 12-bit) based on device-reported capabilities.
Acceptance Criteria
ScaleAnalogSample()method to use channel's actual resolutionCurrent vs Updated Formula
Current (fixed 12-bit):
Updated (variable resolution):
Files to Modify
Daqifi.Desktop/Device/AbstractStreamingDevice.cs(ScaleAnalogSample method)Value
Correctly scales 18-bit data from Nyquist 3 and maintains accuracy for future higher-resolution devices
Testing Requirements