Skip to content

Commit 250d9a8

Browse files
committed
mh linter fixes
1 parent 6d73c93 commit 250d9a8

File tree

5 files changed

+34
-32
lines changed

5 files changed

+34
-32
lines changed

computeFOV.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
% FOV = computeFOV(cfg)
33
% computes the number of degrees of visual angle in the whole field of view
44
%
5-
5+
66
FOV = 2 * (180 * (atan(cfg.monitorWidth / (2 * cfg.screenDistance)) / pi));
77

8-
end
8+
end

dev/miss_hit.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
line_length: 120
2+
suppress_rule: "copyright_notice"
3+
suppress_rule: "naming_functions"

initPTB.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
%
1919

2020
checkPtbVersion();
21-
21+
2222
pth = fileparts(mfilename('fullpath'));
2323
addpath(fullfile(pth, 'subfun'));
2424

@@ -77,7 +77,6 @@
7777
WaitSecs(0.1);
7878
GetSecs;
7979

80-
8180
end
8281

8382
function initDebug(cfg)
@@ -167,10 +166,12 @@ function initDebug(cfg)
167166
function cfg = openWindow(cfg)
168167

169168
if cfg.debug.smallWin
170-
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background, ...
169+
[cfg.screen.win, cfg.screen.winRect] = ...
170+
Screen('OpenWindow', cfg.screen.idx, cfg.color.background, ...
171171
[0, 0, 480, 270]);
172172
else
173-
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
173+
[cfg.screen.win, cfg.screen.winRect] = ...
174+
Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
174175
end
175176

176177
% Enable alpha-blending, set it to a blend equation useable for linear

setDefaultsPTB.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
function cfg = setDefaultsPTB(cfg)
22
% cfg = setDefaultsPTB(cfg)
3-
%
3+
%
44
% Set some defaults values if none have been set before.
5-
5+
66
if nargin < 1
77
cfg = struct;
88
end

tests/test_setDefaultsPTB.m

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
function test_setDefaultsPTB()
2-
2+
33
%% test basic cfg creation
4-
4+
55
% test data
66
expectedCFG = returnExpectedCFG();
7-
7+
88
% test
99
cfg = setDefaultsPTB;
10-
testSubFields(expectedCFG, cfg)
11-
10+
testSubFields(expectedCFG, cfg);
11+
1212
%% test that values are not overwritten
13-
14-
clear cfg
15-
13+
14+
clear cfg;
15+
1616
% test data
1717
expectedCFG = returnExpectedCFG();
1818
expectedCFG.screen.monitorWidth = 36;
19-
19+
2020
% set up
2121
cfg.screen.monitorWidth = 36;
22-
22+
2323
% test
2424
cfg = setDefaultsPTB(cfg);
25-
testSubFields(expectedCFG, cfg)
26-
25+
testSubFields(expectedCFG, cfg);
26+
2727
%% test with audio init
28-
29-
clear cfg
30-
28+
29+
clear cfg;
30+
3131
% test data
3232
expectedCFG = returnExpectedCFG();
3333
expectedCFG.audio = struct( ...
@@ -39,20 +39,18 @@ function test_setDefaultsPTB()
3939
'repeat', 1, ...
4040
'startCue', 0, ...
4141
'waitForDevice', 1);
42-
42+
4343
% set up
4444
cfg.audio.do = 1;
45-
45+
4646
% test
4747
cfg = setDefaultsPTB(cfg);
48-
testSubFields(expectedCFG, cfg)
49-
50-
51-
end
48+
testSubFields(expectedCFG, cfg);
5249

50+
end
5351

5452
function expectedCFG = returnExpectedCFG()
55-
53+
5654
expectedCFG = struct( ...
5755
'testingDevice', 'pc', ...
5856
'debug', struct('do', true, 'transpWin', true, 'smallWin', true), ...
@@ -62,12 +60,12 @@ function test_setDefaultsPTB()
6260
'screen', struct( ...
6361
'monitorWidth', 42, ...
6462
'monitorDistance', 134));
65-
63+
6664
expectedCFG.keyboard.keyboard = [];
6765
expectedCFG.keyboard.responseBox = [];
6866
expectedCFG.keyboard.responseKey = {};
6967
expectedCFG.keyboard.escapeKey = 'ESCAPE';
70-
68+
7169
end
7270

7371
function testSubFields(expectedStructure, cfg)

0 commit comments

Comments
 (0)