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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/rds_rx.grc
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ blocks:
maxoutbuf: '0'
minoutbuf: '0'
pty_locale: '0'
reset: '0'
reset: freq
states:
bus_sink: false
bus_source: false
Expand Down
2 changes: 1 addition & 1 deletion grc/rds_parser.block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


file_format: 1