-
Notifications
You must be signed in to change notification settings - Fork 88
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
Disable nifgen get_fir_filter_coefficients() #891
Conversation
Is not like the rest of the ivi-dance functions Not worth torqueing the code generator around to support this one use case
docs/nifgen/class.rst
Outdated
|
||
.. py:class:: Session(self, resource_name, channel_name=None, reset_device=False, options={}) | ||
|
||
============== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is all this noise in the diff? Something about line endings got messed up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure. Looking into it but I don't see anything obvious
docs/nifgen/class.rst
Outdated
|
||
| Returns the FIR filter coefficients used by the onboard signal | ||
processing block. These coefficients are determined by NI-FGEN and | ||
based on the FIR filter type and corresponding property (Alpha, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have control over this text now, we could type the actual property name so they get linked).
@@ -105,8 +105,6 @@ def __init__(self): | |||
self._defaults['GetExtCalRecommendedInterval']['Months'] = None | |||
self._defaults['GetFIRFilterCoefficients'] = {} | |||
self._defaults['GetFIRFilterCoefficients']['return'] = 0 | |||
self._defaults['GetFIRFilterCoefficients']['numberOfCoefficientsRead'] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this mocks the C function, why did it change at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I cleaned up (I.e. removed) the overrides we had in functions_addon. So directions changed.
coeff_array = [1, 0, -1] | ||
coeff_array = [0 for i in range(95)] | ||
coeff_array[0] = -1.0 | ||
coeff_array[2] = 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should error because the device expected symmetrical coefficients.
I think you need to also enable OSP so that the OSP configuration gets validated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test disabled since OSP disabled, can't check this.
Disabled function since OSP
Do we have an issue about adding OSP to NI-FGEN? |
@@ -0,0 +1,42 @@ | |||
<%page args="function, config, method_template, indent"/>\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you keeping these on purpose because they may be useful in the future?
I'm not sure what the proper way of handling this sort of thing is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am keeping this on purpose. I mentioned that in the PR description. I don't want to lose this knowledge since it isn't obvious how this needs to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just seems like dead code so there's a risk of it being removed in the future too.
How about removing it but in the issue recording the last commit that contained it to show a solution?
I think we should leverage the Git repo, rather than have dead code in master. |
We have to keep the branch around if we want to be able to reference the commit hash. Once we delete the branch, that deleted all the commits as well.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Marcos <notifications@github.com>
Sent: Thursday, June 7, 2018 8:47:09 PM
To: ni/nimi-python
Cc: Mark Silva; Author
Subject: Re: [ni/nimi-python] Disable nifgen get_fir_filter_coefficients() (#891)
Comments addressed?
I think we should leverage the Git repo, rather than have dead code in master.
This can be done by having a branch with the files (I don't like this idea) or simply documenting in the related issues, even in the test comment, the Git ID where the fix existed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ni_nimi-2Dpython_pull_891-23issuecomment-2D395619678&d=DwMFaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=oQTngAhgD6lgydjZGyMY1uYA3Zxdr2P5nC7-XoWqcUc&m=IPlQcJHNqMWc5pZNL5F_K6aRAz9BOj2K5HvGLyJxt3A&s=dx3zS0umz2tHSdgwv0CHYPdJjiHjmGev2mrkOxiQAYg&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AK86-5F-2Dc0vbvP-5FKpxH7vh1qHoml6EdrqRks5t6dedgaJpZM4UbptI&d=DwMFaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=oQTngAhgD6lgydjZGyMY1uYA3Zxdr2P5nC7-XoWqcUc&m=IPlQcJHNqMWc5pZNL5F_K6aRAz9BOj2K5HvGLyJxt3A&s=q2HwFifoZraChX6XE47Ul2AelgQochgMDC8DHW5Eeug&e=>.
|
What if we commit to master, then remove? |
Add more comments about how these are not used until OSP is supported |
* Remove templates that are no longer required * Per #891 OSP functions should not be public * Use ivi-dance-with-a-twist in case ever made public * Update generated files * Update CHANGELOG.md
What does this Pull Request accomplish?
get_fir_filter_coefficients()
because it only applies for OSP and OSP is not included in the Python API yet in generalFixed nifgenget_fir_filter_coefficients()
Create specific implementation instead of relying on code generatorNot really ivi-dance because the size is returned in an out parameter instead of the return value (error)Not worth trying to make the code generator support this use case for this one functionDon't use code generator for documentationList issues fixed by this Pull Request below, if any.
What testing has been done?