discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] gr-uhd patch


From: Juha Vierinen
Subject: [Discuss-gnuradio] gr-uhd patch
Date: Sat, 11 Jun 2011 17:05:57 +0300

Here is a patch that allows a user to define when the stream start
command is issued. I use this to precisely time the beginning of the
stream. The current implementation issues the stream start command 0.1
seconds after start() is called, which is not that deterministic.

I'm not sure this is optimal, but here is how I use it in python:

t = time.time()
while t < op.starttime - 3:
    t = time.time()
    time.sleep(0.1)
## Latch devices onto PPS, reset clock to 0.0. This takes two seconds.
self.uhd_usrp_source_0.set_time_unknown_pps(uhd.time_spec(0.0))
## Tell the uhd block to issue stream command 1 second after receiving PPS
self.uhd_usrp_source_0.set_stream_start_time(1.0)

Sorry, I messed up a bit with the patch, so there are a few unnecessary diffs.

juha

Attachment: stream_start.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]