Skip to content

Fix setting start_time having no effect in Python bindings #665

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

Closed
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: 2 additions & 0 deletions host/python/uhd/usrp/multi_usrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def _start_stream(streamer):
if not stream_cmd.stream_now:
if start_time is not None:
stream_cmd.time_spec = start_time
stream_cmd.stream_now = False
Copy link
Contributor

@mbr0wn mbr0wn Dec 4, 2023

Choose a reason for hiding this comment

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

This line is not necessary (see the if clause 3 lines above, it's a requirement for coming here in the first place).

else:
stream_cmd.time_spec = lib.types.time_spec(
super(MultiUSRP, self).get_time_now().get_real_secs() + 0.05)
Expand Down Expand Up @@ -183,6 +184,7 @@ def _config_streamer(streamer):
metadata = lib.types.tx_metadata()
if start_time is not None:
metadata.time_spec = start_time
metadata.has_time_spec = True
while send_samps < max_samps:
real_samps = min(proto_len, max_samps-send_samps)
if real_samps < proto_len:
Expand Down