Skip to content

How to end trial after timeout #3223

Discussion options

You must be logged in to vote

Nope. I added a post_trial_gap to the trialProperties object and the stimulus disappears after two seconds, indicating that the trial_duration works. Also, I have tried to add break after line 209, which is after timeline.push(actualRandom), and the practice session ended after two seconds, as expected. But now I have finally taken a more careful look at the code, I know what the problem is. Take the practice block for example:

timeline.push(actualRandom);
insertRepetition(randomRepeat(actualRandom));

The problem is the second line: insertRepetition:

function insertRepetition(element) {
    for (let i = 0; i < 10; i++) {
        timeline.push(element);
    }
}

This is easy enough to under…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@jodeleeuw
Comment options

@pablobernabeu
Comment options

Comment options

You must be logged in to vote
5 replies
@pablobernabeu
Comment options

@Shaobin-Jiang
Comment options

@pablobernabeu
Comment options

@Shaobin-Jiang
Comment options

Answer selected by pablobernabeu
@pablobernabeu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants