Skip to content

Commit 615ae0c

Browse files
authored
Merge pull request #48 from CerenB/master
small addition
2 parents 9de4030 + 570c717 commit 615ae0c

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ and give access back to the keyboards.
129129

130130
### getResponse
131131

132-
It is wrapper function to use `KbQueue` which is definitely what you should used to collect responses.
132+
It is wrapper function to use `KbQueue` which is definitely what you should use to collect responses.
133133

134134
You can easily collect responses while running some other code at the same time.
135135

@@ -173,11 +173,18 @@ This will handle the Eye Tracker (EyeLink set up) and can be called to initializ
173173

174174
Use that to stop your script and only restart when the space bar is pressed.
175175

176+
177+
### waitForTrigger
178+
179+
Counts a certain number of triggers coming from the mri/scanner before returning.
180+
Requires number of triggers to wait for.
181+
182+
176183
## Annexes
177184

178185
### Experiment template [ WIP ]
179186

180-
### `devSandobox.m` stand-alone
187+
### devSandbox (stand-alone)
181188

182189
This script is a stand-alone function that can be useful as a sandbox to develop the PTB audio/visual stimulation of your experiment. No input/output required.
183190

demos/CPP_waitForTriggerDemo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cd ..;
22

3-
cfg.device = 'Scanner';
3+
cfg.testingDevice = 'mri';
44

55
cfg.numTriggers = 4;
66

getResponse.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
% - init: to initialise the queue
1616
% - start: to start listening to keypresses
1717
% - check: checks all the key presses events since 'start', or since last
18-
% 'check' or 'flush' (whichever was the most recent)
18+
% 'check' or 'flush' (whichever was the most recent)
19+
% -- can check for demand to abort if the escapeKey is listed in the
20+
% Keys of interest.
21+
% -- can only check for demands to abort when getResponse('check') is called:
22+
% so there will be a delay between the key press and the experiment stopping
23+
% -- abort errors send specific signals that allow the catch to get
24+
% them and allows us to "close" nicely
1925
% - flush: empties the queue of events in case you want to restart from a clean
20-
% queue
26+
% queue
2127
% - stop: stops listening to key presses
2228
%
2329
% - getOnlyPress: if set to true the function will only return the key presses and

0 commit comments

Comments
 (0)