Skip to content

Commit ed66c73

Browse files
committed
Merge remote-tracking branch 'cpp-lln-lab/master'
2 parents dfcd574 + 69e251e commit ed66c73

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
- stage: "Tests and linter"
2828
name: "Unit Tests" # names the first job
2929
script: octave $OCTFLAGS --eval "results = runTests; assert(all(~[results.Failed]))"
30-
- script: cd .. && mh_style.py `pwd`
30+
- script: cd .. && mh_style `pwd`
3131
name: "miss_hit linter" # names the second job

checkDependencies.m renamed to checkPtbVersion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function checkDependencies()
1+
function checkPtbVersion()
22
% Checks that the right dependencies are installed.
33

44
printCredits();

eyeTracker.m

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
% SET UP TRACKER CONFIGURATION
7373
% Setting the proper recording resolution, proper calibration type,
7474
% as well as the data file content;
75-
% Eyelink('command', 'add_file_preamble_text ''Recorded by EyelinkToolbox demo-experiment''');
75+
% Eyelink('command', 'add_file_preamble_text ''Recorded by
76+
%EyelinkToolbox demo-experiment''');
7677

7778
% This command is crucial to map the gaze positions from the tracker to
7879
% screen pixel positions to determine fixation
@@ -89,7 +90,7 @@
8990
Eyelink('command', 'generate_default_targets = YES');
9091
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
9192

92-
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
93+
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
9394
% % CUSTOM CALIBRATION
9495
% % (SET MANUALLY THE DOTS COORDINATES, HERE FOR 6 DOTS)
9596
% Eyelink('command', 'calibration_type = HV5');
@@ -101,7 +102,8 @@
101102
% [width, height]=Screen('WindowSize', screenNumber);
102103
% Eyelink('command','calibration_samples = 6');
103104
% Eyelink('command','calibration_sequence = 0,1,2,3,4,5');
104-
% Eyelink('command','calibration_targets = %d,%d %d,%d %d,%d %d,%d %d,%d',...
105+
% Eyelink('command','calibration_targets = ...
106+
% %d,%d %d,%d %d,%d %d,%d %d,%d',...
105107
% 640,512, ... %width/2,height/2
106108
% 640,102, ... %width/2,height*0.1
107109
% 640,614, ... %width/2,height*0.6
@@ -110,13 +112,14 @@
110112
%
111113
% Eyelink('command','validation_samples = 5');
112114
% Eyelink('command','validation_sequence = 0,1,2,3,4,5');
113-
% Eyelink('command','validation_targets = %d,%d %d,%d %d,%d %d,%d %d,%d',...
115+
% Eyelink('command','validation_targets = ...
116+
% %d,%d %d,%d %d,%d %d,%d %d,%d',...
114117
% 640,512, ... %width/2,height/2
115118
% 640,102, ... %width/2,height*0.1
116119
% 640,614, ... %width/2,height*0.6
117120
% 128,341, ... %width*0.1,height*1/3
118121
% 1152,341 ); %width-width*0.1,height*1/3
119-
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
122+
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
120123

121124
% % set parser (conservative saccade thresholds)
122125
% Eyelink('command', 'saccade_velocity_threshold = 35');
@@ -199,12 +202,15 @@
199202
% download data file
200203
try
201204
fprintf('Receiving data file ''%s''\n', edfFileName);
202-
status = Eyelink('ReceiveFile', '', [expParameters.outputDir, filesep, 'eyetracker', filesep, edfFileName]);
205+
status = Eyelink('ReceiveFile', '', ...
206+
[expParameters.outputDir, filesep, 'eyetracker', filesep, edfFileName]);
203207
if status > 0
204208
fprintf('ReceiveFile status %d\n', status);
205209
end
206-
if 2 == exist([expParameters.outputDir, filesep, 'eyetracker', filesep, edfFileName], 'file')
207-
fprintf('Data file ''%s'' can be found in ''%s''\n', edfFileName, [expParameters.outputDir, filesep, 'eyetracker', filesep]);
210+
if 2 == exist([expParameters.outputDir, filesep, 'eyetracker', ...
211+
filesep, edfFileName], 'file')
212+
fprintf('Data file ''%s'' can be found in ''%s''\n', edfFileName, ...
213+
[expParameters.outputDir, filesep, 'eyetracker', filesep]);
208214
end
209215
catch
210216
fprintf('Problem receiving data file ''%s''\n', edfFileName);

initPTB.m

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
% TO DO
4242
% - We might want to add a couple of IF in case the experiment does not use audio for example.
4343

44-
checkDependencies();
44+
checkPtbVersion();
4545

4646
% For octave: to avoid displaying messenging one screen at a time
4747
more off;
@@ -51,12 +51,10 @@
5151

5252
cfg = setDefaultsPTB(cfg);
5353

54-
initDebug(cfg);
55-
56-
%% Keyboard
5754
initKeyboard;
55+
initDebug(cfg);
5856

59-
%% Mouse
57+
% Mouse
6058
HideCursor;
6159

6260
%% Audio
@@ -72,9 +70,9 @@
7270
% window size info
7371
[cfg.winWidth, cfg.winHeight] = WindowSize(cfg.win);
7472

75-
if strcmpi(cfg.stimPosition, 'mri')
76-
cfg.winRect(1, 4) = cfg.winRect(1, 4) * 2 / 3;
77-
end
73+
% if strcmpi(cfg.stimPosition, 'mri')
74+
% cfg.winRect(1, 4) = cfg.winRect(1, 4) * 2 / 3;
75+
% end
7876

7977
% Get the Center of the Screen
8078
cfg.center = [cfg.winRect(3), cfg.winRect(4)] / 2;
@@ -118,7 +116,7 @@ function initDebug(cfg)
118116

119117
Screen('Preference', 'SkipSyncTests', 2);
120118
Screen('Preference', 'Verbosity', 0);
121-
Screen('Preferences', 'SuppressAllWarnings', 2);
119+
Screen('Preference', 'SuppressAllWarnings', 1);
122120

123121
fprintf('\n\n\n\n');
124122
fprintf('########################################\n');
@@ -218,8 +216,8 @@ function initDebug(cfg)
218216

219217
function initText(cfg)
220218

221-
Screen('TextFont', cfg.win, cfg.text.Font);
222-
Screen('TextSize', cfg.win, cfg.text.Size);
223-
Screen('TextStyle', cfg.win, cfg.text.Style);
219+
Screen('TextFont', cfg.win, cfg.text.font);
220+
Screen('TextSize', cfg.win, cfg.text.size);
221+
Screen('TextStyle', cfg.win, cfg.text.style);
224222

225223
end

0 commit comments

Comments
 (0)