Skip to content

Commit 269269f

Browse files
committed
-BpodLib: Renamed path to calibration folder from 'liquidcalibration' to 'calibration'
1 parent abdf837 commit 269269f

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

Functions/+BpodLib/+BpodObject/+setup/updatePathAndSettings.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function updatePathAndSettings(BpodSystem, varargin)
101101
end
102102

103103
%% -- Calibration Files
104-
calFolder = BpodLib.path.getPath('liquidcalibration', BpodSystem, 'LocalDir', LocalDir);
104+
calFolder = BpodLib.path.getPath('calibration', BpodSystem, 'LocalDir', LocalDir);
105105

106106
if ~isfile(fullfile(Path.SettingsDir, 'LiquidCalibration.json')) && ~BpodLib.path.compatibility.isLegacySettings(Path.LocalDir)
107107
fileNames = {'LiquidCalibration.json', 'SoundCalibration.mat', 'Readme.txt'};

Functions/+BpodLib/+calibration/+liquid/+io/load.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
LocalDir = BpodLib.path.getPath('local', BpodSystem, 'LocalDir', p.Results.LocalDir);
5757

58-
calibrationFolderpath = BpodLib.path.getPath('liquidcalibration', BpodSystem, 'LocalDir', LocalDir);
58+
calibrationFolderpath = BpodLib.path.getPath('calibration', BpodSystem, 'LocalDir', LocalDir);
5959
legacyPath = fullfile(LocalDir, 'Calibration Files/LiquidCalibration.mat');
6060
expectedFilepath = fullfile(calibrationFolderpath, filename);
6161

@@ -67,7 +67,7 @@
6767
if isLegacy
6868
warning('BpodLib:LiquidCalibrationLoad:LegacyAndJSON', 'Returning LiquidCalibration.json but LiquidCalibration.mat exists, LiquidCalibration.mat should not exist in folder Calibration Files/')
6969
end
70-
singleSetupPath = fullfile(BpodLib.path.getPath('liquidcalibration', BpodSystem, 'LocalDir', LocalDir, 'setup', 'single'), 'LiquidCalibration.json');
70+
singleSetupPath = fullfile(BpodLib.path.getPath('calibration', BpodSystem, 'LocalDir', LocalDir, 'setup', 'single'), 'LiquidCalibration.json');
7171
if isMulti && isfile(singleSetupPath)
7272
warning('BpodLib:LiquidCalibrationLoad:MultiAndSingle', 'Bpod detected this is a computer that may have multiple state machines plugged in but found a single-setup liquid calibration file.')
7373
end

Functions/+BpodLib/+calibration/+liquid/+io/save.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function save(saveData, varargin)
5555
% Determine the save location of the calibration file
5656
if isempty(p.Results.filepath)
5757
assert(~isempty(p.Results.type), "Either 'filepath' or 'type' must be specified")
58-
calibrationFolderpath = BpodLib.path.getPath('liquidcalibration', BpodSystem);
58+
calibrationFolderpath = BpodLib.path.getPath('calibration', BpodSystem);
5959
switch lower(p.Results.type)
6060
case 'statemachine'
6161
filename = 'LiquidCalibration.json';

Functions/+BpodLib/+calibration/+liquid/+portarray/launchCalibrator.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function launchCalibrator(BpodSystem)
2626
along with this program. If not, see <http://www.gnu.org/licenses/>.
2727
%}
2828

29-
savePath = fullfile(BpodLib.path.getPath('liquidcalibration', BpodSystem),...
29+
savePath = fullfile(BpodLib.path.getPath('calibration', BpodSystem),...
3030
'LiquidCalibration-PortArrays.json');
3131
if isempty(BpodSystem.CalibrationTables.PortArrays)
3232
error('BpodLib:portarraylaunchCalibrator:NoData',...

Functions/+BpodLib/+calibration/+liquid/launchLiquidCalibrationUI.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function launchLiquidCalibrationUI(varargin)
2222
end
2323
end
2424

25-
savepath = fullfile(BpodLib.path.getPath('liquidcalibration', BpodSystem), 'LiquidCalibration.json');
25+
savepath = fullfile(BpodLib.path.getPath('calibration', BpodSystem), 'LiquidCalibration.json');
2626
BpodLib.calibration.liquid.LiquidCalibratorUI(BpodSystem.CalibrationTables.LiquidCal,...
2727
'BpodSystem', BpodSystem, 'savepath', savepath, 'source', 'statemachine', 'target', 'FSM_Onboard');
2828

Functions/+BpodLib/+path/getPath.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%
55
% Examples
66
% --------
7-
% path = getPath('liquidcalibration', BpodSystem, 'setuptype', 'single')
7+
% path = getPath('calibration', BpodSystem, 'setuptype', 'single')
88
% path = getPath('config', 'LocalDir', LocalDirPath, 'setuptype', 'multi', 'com', 'COM3')
99
%
1010
% Arguments
@@ -13,7 +13,7 @@
1313
% The target path to retrieve, can be one of the following:
1414
% - 'config': Path to the config folder
1515
% - 'local': Path to the local directory
16-
% - 'liquidcalibration': Path to the liquid calibration files
16+
% - 'calibration': Path to the calibration files
1717
% - 'root': Path to the Bpod root directory
1818
% - 'settings': Path to the settings folder
1919
% BpodSystem : BpodObject or struct
@@ -113,7 +113,7 @@
113113
else
114114
path = BpodSystem.Path.LocalDir;
115115
end
116-
case 'liquidcalibration'
116+
case 'calibration'
117117
if BpodLib.path.compatibility.isLegacySettings(BpodLib.path.getPath('local', varargin{:}))
118118
path = fullfile(BpodLib.path.getPath('local', p.Results.BpodSystem), 'Calibration Files');
119119
return

Functions/+BpodLib/+path/verifyPathing.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
verified = true;
5050
results = cell(1, 1);
5151

52-
liquidcalibrationPath = BpodLib.path.getPath('liquidcalibration', BpodSystem);
52+
liquidcalibrationPath = BpodLib.path.getPath('calibration', BpodSystem);
5353
if ~isfolder(liquidcalibrationPath)
5454
verified = false;
5555
results{1} = liquidcalibrationPath;

Functions/Calibration/Sound/SoundCalibrationManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function calibrate_Callback(hObject, eventdata, handles)
264264
BpodSystem.PluginObjects.SoundServer = PsychToolboxAudio;
265265
end
266266

267-
[FileName, PathName] = uiputfile(fullfile(BpodLib.path.getPath('liquidcalibration', BpodSystem), 'SoundCalibration.mat'), 'Save Sound Calibration File');
267+
[FileName, PathName] = uiputfile(fullfile(BpodLib.path.getPath('calibration', BpodSystem), 'SoundCalibration.mat'), 'Save Sound Calibration File');
268268

269269
handles.filename = fullfile(PathName,FileName);
270270

Functions/Calibration/Sound/TestSoundManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function file_Callback(hObject, eventdata, handles)
207207
% hObject handle to file (see GCBO)
208208
% eventdata reserved - to be defined in a future version of MATLAB
209209
% handles structure with handles and user data (see GUIDATA)
210-
[FileName, PathName] = uigetfile(BpodLib.path.getPath('liquidcalibration', BpodSystem));
210+
[FileName, PathName] = uigetfile(BpodLib.path.getPath('calibration', BpodSystem));
211211
if FileName ~= 0
212212
handles.calfile = fullfile(PathName,FileName);
213213
set(handles.filename_edit, 'String', handles.calfile);

Tests/BpodLib/BpodObject/setup/test_SettingsAndFiles.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function test_freshMultiSetup(testCase)
4646
testCase.verifyTrue(isfolder(settingsPath), 'Multi setup folder was not created.')
4747

4848
% Check if the calibration files were created
49-
calibrationFolderpath = BpodLib.path.getPath('liquidcalibration', BpodSystem, 'setuptype', 'multi');
49+
calibrationFolderpath = BpodLib.path.getPath('calibration', BpodSystem, 'setuptype', 'multi');
5050
testCase.verifyTrue(isfolder(calibrationFolderpath), 'Calibration folder was not created.')
5151

5252
% Check that the settings files have been updated correctly
@@ -77,8 +77,8 @@ function test_newMultiSetup(testCase)
7777
testCase.verifyTrue(numel(filelist) == 0, 'Settings folder should be empty of files after creating a new multi setup.');
7878

7979
% Test iquidcalibration paths are set correctly
80-
testCase.verifyTrue(strcmp(BpodLib.path.getPath('liquidcalibration', BpodSystem), fullfile(testCase.TestData.LocalDir, 'Config/Machine-COM13')), 'Liquid calibration path should be set to the new multi setup location.');
81-
testCase.verifyTrue(strcmp(BpodLib.path.getPath('liquidcalibration', NewBpodSystem), fullfile(testCase.TestData.LocalDir, 'Config/Machine-COM5')), 'Liquid calibration path should be set to the new multi setup location.');
80+
testCase.verifyTrue(strcmp(BpodLib.path.getPath('calibration', BpodSystem), fullfile(testCase.TestData.LocalDir, 'Config/Machine-COM13')), 'Liquid calibration path should be set to the new multi setup location.');
81+
testCase.verifyTrue(strcmp(BpodLib.path.getPath('calibration', NewBpodSystem), fullfile(testCase.TestData.LocalDir, 'Config/Machine-COM5')), 'Liquid calibration path should be set to the new multi setup location.');
8282

8383
% Test settings files are moved
8484
testCase.verifyTrue(isfile(fullfile(BpodLib.path.getPath('settings',NewBpodSystem), 'SyncConfig.mat')), 'Settings files should have been created.')

0 commit comments

Comments
 (0)