Skip to content

Commit 08ffaef

Browse files
authored
Merge pull request #59 from CerenB/ceren_README_add
readme submodule update
2 parents 73580bb + cbeadc1 commit 08ffaef

File tree

2 files changed

+42
-18
lines changed

2 files changed

+42
-18
lines changed

README.md

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,37 @@ cd CPP_PTB
7373
matlab -nojvm -nosplash -r "addpath(fullfile(pwd))"
7474
```
7575

76-
To get the latest commit you then need to update the submodule with the information
76+
To get the latest commit you then need to update the submodule with the information
7777
on its remote repository and then merge those locally.
7878
```bash
7979
git submodule update --remote --merge
8080
```
8181

82-
Remember that updates to submodules need to be commited as well.
82+
Remember that updates to submodules need to be committed as well.
8383

84+
#### Example for submodule usage
85+
86+
So say you want to clone a repo that has some nested submodules, then you would type this to get the content of all the submodules at once (here with my experiment repo):
87+
``` bash
88+
git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
89+
```
90+
This would be the way to do it "by hand"
91+
92+
```bash
93+
# clone the repo
94+
git clone https://github.com/user_name/yourExperiment.git
95+
96+
# go into the directory
97+
cd yourExperiment
98+
99+
# initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS)
100+
git submodule init
101+
git submodule update
102+
103+
# get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
104+
git submodule foreach --recursive 'git submodule init'
105+
git submodule foreach --recursive 'git submodule update'
106+
```
84107
**TO DO**
85108
<!-- Submodules
86109
pros: in principle, downloading the experiment you have the whole package plus the benefit to stay updated and use version control of this dependency. Can probably handle a use case in which one uses different version on different projects (e.g. older and newer projects).
@@ -146,9 +169,9 @@ cfg.debug.transpWin = true;
146169
cfg.debug.smallWin = true;
147170
148171
% cfg.text
149-
cfg.text.font
150-
cfg.text.size
151-
cfg.text.style
172+
cfg.text.font
173+
cfg.text.size
174+
cfg.text.style
152175
153176
% cfg.color
154177
cfg.color.background
@@ -157,15 +180,15 @@ cfg.color.background
157180
cfg.screen.monitorWidth
158181
cfg.screen.monitorDistance
159182
cfg.screen.idx
160-
cfg.screen.win
161-
cfg.screen.winRect
162-
cfg.screen.winWidth
163-
cfg.screen.winHeight
164-
cfg.screen.center
183+
cfg.screen.win
184+
cfg.screen.winRect
185+
cfg.screen.winWidth
186+
cfg.screen.winHeight
187+
cfg.screen.center
165188
cfg.screen.FOV
166-
cfg.screen.ppd
167-
cfg.screen.ifi
168-
cfg.screen.monRefresh
189+
cfg.screen.ppd
190+
cfg.screen.ifi
191+
cfg.screen.monRefresh
169192
170193
% cfg.audio
171194
cfg.audio.do
@@ -177,7 +200,7 @@ cfg.audio.fs
177200
cfg.audio.channels
178201
cfg.audio.initVolume
179202
cfg.audio.pushSize
180-
cfg.audio.requestOffsetTime
203+
cfg.audio.requestOffsetTime
181204
cfg.audio.reqsSampleOffset
182205
183206
% cfg.mri
@@ -220,8 +243,8 @@ It is wrapper function to use `KbQueue` which is definitely what you should use
220243

221244
You can easily collect responses while running some other code at the same time.
222245

223-
It will only take responses from one device which can simply be the "main keyboard"
224-
(the default device that PTB will find) or another keyboard connected to the computer
246+
It will only take responses from one device which can simply be the "main keyboard"
247+
(the default device that PTB will find) or another keyboard connected to the computer
225248
or the response box that the participant is using.
226249

227250
You can use it in a way so that it only takes responses from certain keys and ignore others (like
@@ -233,7 +256,7 @@ In brief, there are several actions you can execute with this function.
233256

234257
- init: initialize the buffer for key presses on a given device (you can also specify the keys of interest that should be listened to).
235258
- start: start listening to the key presses (carefully insert into your script - where do you want to start buffering the responses).
236-
- check: till that point, it will check the buffer for all key presses.
259+
- check: till that point, it will check the buffer for all key presses.
237260
- It only reports presses on the keys of interest mentioned at initialization.
238261
- It **can** also check for presses on the escape key and abort if the escape key is part of the keys of interest.
239262
- flush: Empties the buffer of key presses in case you want to discard any previous key presses.

waitForTrigger.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function waitForTrigger(cfg, deviceNumber)
2727

2828
if strcmpi(cfg.testingDevice, 'mri')
2929

30-
msg = 'Waiting for trigger...';
30+
msg = ['Experiment starting in ', ...
31+
num2str(cfg.mri.triggerNb - triggerCounter), '...'];
3132
talkToMe(cfg, msg);
3233

3334
while triggerCounter < cfg.mri.triggerNb

0 commit comments

Comments
 (0)