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

Reset the RDS parser when the frequency is changed #81

Open
wants to merge 1 commit into
base: maint-3.10
Choose a base branch
from

Conversation

argilo
Copy link

@argilo argilo commented Oct 19, 2024

When tuning from one station to the next, the displayed station name and radiotext will often be a mixture of data from the old & new frequencies. To solve this problem, we can call the RDS Parser's reset() method when the frequency is changed.

@@ -42,6 +42,6 @@ templates:
imports: import rds
make: rds.parser(${log}, ${debug}, ${pty_locale})
callbacks:
- reset(${reset})
- 'reset() # ${reset}'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's necessary to include ${reset} here; otherwise GRC will never invoke the callback. I have made it a comment so that it is not passed into reset(). Here is the generated code:

self.rds_parser_0.reset() # self.freq

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.

1 participant