Fix set_trigger_channel_properties function (API break)#185
Open
jcafhe wants to merge 1 commit into
Open
Conversation
Collaborator
|
Hi @jcafhe we'll look over this and get it approved/implemented this week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I'm creating a pull request here because it seems the issue tracker isn't available for this repo. Please feel free to remove this PR if you think this is inapropriate.
Issue
We are actually working with a ps3417E and the recommended
psopsaAPI. We need to trigger on a falling edge either on channel A or channel B. As described in the programmer's guide, we have called two times theset_trigger_channel_conditions()function (OR behaviour), thenset_trigger_channel_directions()function, and finally theset_trigger_channel_properties()function.Unfortunatly the latter is not alligned with the programmer's guide and only allows the user to configure the properties of a single channel. We tried to call this function twice - once for channel A and once for channel B - but it seems to just write/overwrite the same internal states. In fact, when calling any
run_xxxfunction, an error is raised indicating that the conditions were set correctly but the properties were not.Pseudo code example:
Proposal
The current pull request changes the function signature and allows the user to set properties for multiple channels in one call. Thus, the user is able to use conditions with multiple channels. The downside is that it breaks the current pyPicoSDK API.
Example: