Bug 39 - All loaded sigrok-dumps .sr files are loaded with wrong samplerate
Summary: All loaded sigrok-dumps .sr files are loaded with wrong samplerate
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Data display (show other bugs)
Version: unreleased development snapshot
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 00:16 CET by Joel Holdsworth
Modified: 2013-01-29 11:04 CET (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Holdsworth 2013-01-16 00:16:56 CET
All loaded sigrok-dumps .sr files are loaded with wrong samplerate. The samplerate seems to be stuck at 1Hz.
Comment 1 Joel Holdsworth 2013-01-16 00:28:33 CET
[23:20] <jhol> biot: if sr_datafeed_meta_logic no longer contains the samplerate, where do I get this data when I load a file
[23:20] <jhol> if you recall I switched it to take a value from the GUI
[23:20] <jhol> but that can't work with loaded files
[23:21] <biot> jhol: did you see this? http://sigrok.org/wiki/29c3#Samplerate:_meta_or_DI.3F
[23:21] <jhol> I may have glanced at it
[23:22] <biot> those are rough notes from the 29c3 meeting about it
[23:22] <biot> but basically your question re samplerate in analog, like it was in logic, led to us concluding that we needed to get this right
[23:23] <jhol> yes - so I happily shifted it to read from the capture config setting, but this is wrong when loading files
[23:23] <biot> basically sr_datafeed_meta_* become sr_datafeed_meta, which contains a GSList
[23:23] <jhol> sounds good
[23:24] <biot> that GSList is a series of structs with things the driver can pass up to the frontend
[23:24] <biot> so not restricted to samplerate, but actually anything that the frontend might set or request
[23:24] <biot> if it should change at some point, for example the user twiddles some knob on the front panel, the driver can "push" this
[23:25] <biot> by sending a meta packet with that info
[23:25] <biot> having said that, the drivers will use the meta packet + list when something changed
[23:25] <jhol> ok - that sounds ok, what 's the timescale on implementing this?
[23:26] <biot> i.e. the meta packet won't be sent at all at the start of an acquisition anymore
[23:26] --> lisandro- has joined this channel (~lisandro@dumbledore.com.ar).
[23:26] <biot> if you need to know the samplerate, you need to ask it (well, you'll set it anyway)
[23:27] <jhol> biot: I'd rather it there was just one way to always know
[23:27] <biot> jhol: I'm working on it as we speak, quite a bit of it done already
[23:27] <jhol> so always start with meta
[23:27] <jhol> I need to go
[23:27] <biot> but...
[23:27] <biot> ok well, you know half the story
[23:27] <biot> come back another time for the second half, but don't draw conclusions yet