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

Fix Impulse Generator Menu #501

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Fix Impulse Generator Menu #501

merged 1 commit into from
Jul 31, 2024

Conversation

cristina-suteu
Copy link
Contributor

@cristina-suteu cristina-suteu commented Jul 30, 2024

PR Description

iio_device_get_trigger will return 0 on success, but if there is no device assigned to the trigger, the trigger pointer will be NULL. since the impulse generator menu sets the trigger, the condition if (ret == 0 && trigger) will not be satisfied. this resulted in the impulse generator menu being grayed out. Now, we will only check that the return value is 0, to see if our device needs a trigger, which will be configured in the menu. The renaming of the bool variable to needs_trigger is to avoid confusion.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have followed the coding standards and guidelines
  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have checked in CI output that no new warnings/errors got introduced
  • I have updated documentation accordingly (GitHub Pages, READMEs, etc)

iio_device_get_trigger will return 0 on success, but if there is no device
assigned to the trigger, the trigger pointer will be NULL.
since the impulse generator menu sets the trigger, the condition will not
be satisfied. this resulted in the impulse generator menu being grayed out.
Now, we will only check that the return value is 0. The renaming of the
bool variable is to avoid confusion.

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
@cristina-suteu cristina-suteu merged commit fbd5aa5 into main Jul 31, 2024
10 checks passed
@cristina-suteu cristina-suteu deleted the fix-impulse-generator branch July 31, 2024 05:01
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