Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AI Bridge Default Argument Values #509

Merged

Conversation

charitylxy
Copy link
Collaborator

@charitylxy charitylxy commented Feb 21, 2024

What does this Pull Request accomplish?

This PR aims to address the issue brought up in #482

  • Currently, default value for forward_coeffs, reverse_coeffs, electrical_vals and physical_vals are set to None
  • Impacted functions are:
    • add_ai_force_bridge_polynomial_chan
    • add_ai_force_bridge_table_chan
    • add_ai_pressure_bridge_polynomial_chan
    • add_ai_pressure_bridge_table_chan
    • add_ai_torque_bridge_polynomial_chan
    • add_ai_torque_bridge_table_chan

Why should this Pull Request be merged?

This PR will address issue #482 and changes the default values of the respective parameter for the impacted functions, following the default value set in LabVIEW.

forward_coeffs=[0.0, 50.0], reverse_coeffs=[0.0, 0.02]

electrical_vals=[-2.0, 0.0, 2.0], physical_vals=[-100.0, 0.0, 100.0]

What testing has been done?

Regression tests modified to return default value for respective parameters:

PS C:\dev\nidaqmx-python> poetry run pytest -k test___task___add_ai_torque_bridge_polynomial_chan___sets_channel_attributes
======================================================================================== test session starts ========================================================================================
platform win32 -- Python 3.9.13, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1742 items / 1740 deselected / 2 selected

tests\component\_task_modules\channels\test_ai_channel.py .s                                                                                                                                   [100%]

=========================================================================== 1 passed, 1 skipped, 1740 deselected in 1.05s ===========================================================================
PS C:\dev\nidaqmx-python> poetry run pytest -k test___task___add_ai_torque_bridge_table_chan___sets_channel_attributes
======================================================================================== test session starts ========================================================================================
platform win32 -- Python 3.9.13, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1742 items / 1740 deselected / 2 selected

tests\component\_task_modules\channels\test_ai_channel.py .s                                                                                                                                   [100%]

=========================================================================== 1 passed, 1 skipped, 1740 deselected in 1.14s ===========================================================================
PS C:\dev\nidaqmx-python> poetry run pytest -k test___task___add_ai_pressure_bridge_polynomial_chan___sets_channel_attributes
======================================================================================== test session starts ========================================================================================
platform win32 -- Python 3.9.13, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1742 items / 1740 deselected / 2 selected

tests\component\_task_modules\channels\test_ai_channel.py .s                                                                                                                                   [100%]

=========================================================================== 1 passed, 1 skipped, 1740 deselected in 1.02s ===========================================================================
PS C:\dev\nidaqmx-python> poetry run pytest -k test___task___add_ai_pressure_bridge_table_chan___sets_channel_attributes     
======================================================================================== test session starts ========================================================================================
platform win32 -- Python 3.9.13, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1742 items / 1740 deselected / 2 selected

tests\component\_task_modules\channels\test_ai_channel.py .s                                                                                                                                   [100%]

=========================================================================== 1 passed, 1 skipped, 1740 deselected in 1.11s =========================================================================== 

@charitylxy charitylxy marked this pull request as ready for review February 21, 2024 09:50
@charitylxy charitylxy merged commit bb5ef01 into ni:master Feb 28, 2024
16 checks passed
@charitylxy charitylxy deleted the users/charitylxy/update-bridge-default branch March 7, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants