Skip to content

fix: ScpiMessageProducer docs incorrectly describe EnableAdcChannels as binary string #158

@tylerkron

Description

@tylerkron

Description

The ScpiMessageProducer.EnableAdcChannels() XML documentation and all related docs/tests describe the channel mask parameter as a "binary string" (e.g., "0001010100"), but the Nyquist firmware parses it as a decimal integer via strtoul(str, &endptr, 10) (base 10).

Affected Files

  • src/Daqifi.Core/Communication/Producers/ScpiMessageProducer.cs — XML docs on EnableAdcChannels() show binary examples
  • README.md — example uses EnableAdcChannels("0000000011")
  • docs/DEVICE_INTERFACES.md — multiple examples use binary strings
  • src/Daqifi.Core.Tests/Communication/Producers/ScpiMessageProducerTests.cs — test asserts "0001010100" as expected value

Expected Behavior

Docs and tests should use decimal integer strings:

  • Enable channels 0 and 1: EnableAdcChannels("3") (not "0000000011")
  • Enable channels 2, 4, 6: EnableAdcChannels("84") (not "0001010100")

Firmware Reference

daqifi-nyquist-firmware/firmware/src/services/SCPI/SCPIADC.cSCPI_ADCChanEnableSet calls SCPI_ParamInt32() which uses strtoul(str, &endptr, 10).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions