Skip to content

Commit 9df009b

Browse files
committed
Prevent double UI box for fresh setup
1 parent f482853 commit 9df009b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ function updatePathAndSettings(BpodSystem, varargin)
103103
%% -- Calibration Files
104104
calFolder = BpodLib.path.getPath('calibration', BpodSystem, 'LocalDir', LocalDir);
105105

106-
if ~isfile(fullfile(Path.SettingsDir, 'LiquidCalibration.json')) && ~BpodLib.path.compatibility.isLegacySettings(Path.LocalDir)
106+
freshSetup = ~isfile(fullfile(Path.SettingsDir, 'LiquidCalibration.json')) && ~BpodLib.path.compatibility.isLegacySettings(Path.LocalDir);
107+
if freshSetup
107108
fileNames = {'LiquidCalibration.json', 'SoundCalibration.mat', 'Readme.txt'};
108109
for idx = 1:numel(fileNames)
109110
fileName = fileNames{idx};
@@ -119,6 +120,7 @@ function updatePathAndSettings(BpodSystem, varargin)
119120
BpodSystem.CalibrationTables.LiquidCal = BpodLib.calibration.liquid.io.load('BpodSystem', BpodSystem, 'LocalDir', LocalDir, 'type', 'statemachine');
120121
if strcmp(BpodLib.calibration.liquid.utils.checkCOM(BpodSystem), 'no')
121122
if p.Results.verbose
123+
% if fresh setup skip because UI already said to check out the thing.
122124
BpodLib.calibration.liquid.ui.VerifyCOMGUI(BpodSystem);
123125
end
124126
end

0 commit comments

Comments
 (0)