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

[BUG]: waitFor has been modified and the first input is now useless, not removing it because it will break things #179

Open
1 task done
marcobarilari opened this issue Mar 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@marcobarilari
Copy link
Collaborator

marcobarilari commented Mar 9, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Expected Behavior

no wait for trigger inside

Current Behavior

this is before where waitForTrigger was giving problems

function waitFor(cfg, timeToWait)
    %
    % Will either wait for a certain amount of time or a number of triggers.
    %
    % USAGE::
    %
    %   waitFor(cfg, timeToWait)
    %
    % (C) Copyright 2020 CPP_PTB developers
    if cfg.pacedByTriggers.do
        waitForTrigger( ...
                       cfg, ...
                       cfg.keyboard.responseBox, ...
                       cfg.pacedByTriggers.quietMode, ...
                       timeToWait);
    else
        WaitSecs(timeToWait);
    end

end

Error message

No response

Environment

- OS:
- Matlab:
- SPM:

Anything else?

No response

@marcobarilari marcobarilari added the bug Something isn't working label Mar 9, 2022
@Remi-Gau
Copy link
Contributor

Remi-Gau commented Mar 9, 2022

will look into this and I suspect we might be able to salvage this and revert that change but it might have to go along with some changes in the localizers code.

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Mar 9, 2022

Some thoughts...

Some refactoring to some of the defaults for MRI from the localizers into the CPP PTB defaults: if cfg.testingDevice == 'mri' then we should expect some default value for

cfg.mri.triggerKey = 't';
cfg.mri.triggerNb = 5;
cfg.mri.repetitionTime = 1.8;
cfg.suffix.acq = ''; % ???
cfg.pacedByTriggers.do = false;

When cfg.pacedByTriggers.do == true, also use cfg.timing.IBI and cfg.timing.ISI but make sure those values are integer >=0 by having some early checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants