ni / ni/nidaqmx-python

add_ai_rosette_strain_gage_chan parameter rosette_meas_types has the wrong type

Open
#483 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
592
Forks
199
Avg merge
1d 16h
Merged PRs (30d)
10

Description

The current signature:

def add_ai_rosette_strain_gage_chan(
            self, physical_channel, rosette_type, gage_orientation,
            rosette_meas_types, name_to_assign_to_channel="", min_val=-0.001,
            max_val=0.001,
            strain_config=StrainGageBridgeType.QUARTER_BRIDGE_I,
            voltage_excit_source=ExcitationSource.INTERNAL,
            voltage_excit_val=2.5, gage_factor=2.0,
            nominal_gage_resistance=350.0, poisson_ratio=0.3,
            lead_wire_resistance=0.0):

The docstring says:

rosette_meas_types (List[int]): Specifies information about
   the rosette configuration and measurements.

The code matches the docstring and converts the measurement types to an int array:

rosette_meas_types = numpy.int32(rosette_meas_types)

The actual type should be List[nidaqmx.constants.StrainGageRosetteMeasurementType]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the add_ai_rosette_strain_gage_chan entry point and compare its signature, docstring, and the numpy.int32 conversion of rosette_meas_types. Update the parameter typing to use List[nidaqmx.constants.StrainGageRosetteMeasurementType] and verify that the documented and implemented types agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.