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

plot2d: use current samples time instead of time #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saarnold
Copy link
Contributor

The time method in replay returns the base_time (start time) of the stream instead of the time of the last sample. Either the documentation or the retuned value are wrong here.

Using the current_time fixes the issue for the plot2d widget.

@doudou
Copy link
Member

doudou commented Mar 20, 2015

The time method in replay returns the base_time (start time) of the stream instead of the time of the last sample. Either the documentation or the retuned value are wrong here.

I vote that the code is wrong in Replay. Makes no sense for a method called #time to return the start of the stream.

@D-Alex
Copy link
Member

D-Alex commented Mar 21, 2015

The method is defined two times. Therefore, the last one wins which is (the other one is indeed wrong) :

#Returns the time of the current sample
def time
    return @stream.time    
end

This method should give you exactly the same value as current_time as long as no one has defined a default_timestamp or a timestamp.

@goldhoorn
Copy link
Contributor

and the Solution?

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.

4 participants