@@ -34,13 +34,23 @@ function VerifyCOMGUI(BpodSystem)
3434
3535 % Multi setup - ask user which machine to import from.
3636 prompt = {
37- sprintf(' The Bpod COM port (%s ) does not match the ' , BpodLib .utils .getCurrentCOM(BpodSystem ));
37+ sprintf(' The Bpod COM port (%s ) does not match' , BpodLib .utils .getCurrentCOM(BpodSystem ));
3838 sprintf(' liquid calibration file'' s COM port (%s ).' , LiquidCal .metadata .COM );
3939 ' Please select which COM to copy in the liquid' ;
4040 ' calibration file from:'
4141 };
4242 ignoreOption = ' I will remember to recalibrate. (ignore)' ;
43- options = [{ignoreOption }, availableMachines ' ];
43+ machineNames = [{ignoreOption }, availableMachines ' ];
44+ options = machineNames ;
45+
46+ % Replace thisMachineName with '(current machine)' in the list
47+ [~ , thisMachineName ] = fileparts(BpodLib .path .getPath(' config' , BpodSystem ))
48+ for i = 1 : length(options )
49+ if strcmp(options{i }, thisMachineName )
50+ options{i } = sprintf(' %s (use existing file)' , thisMachineName );
51+ break
52+ end
53+ end
4454
4555 [selectionIdx , ok ] = listdlg(' PromptString' , prompt , ...
4656 ' SelectionMode' , ' single' , ...
@@ -51,7 +61,7 @@ function VerifyCOMGUI(BpodSystem)
5161 return
5262 end
5363
54- selectedMachine = options {selectionIdx };
64+ selectedMachine = machineNames {selectionIdx };
5565 if strcmp(selectedMachine , ignoreOption )
5666 return
5767 end
0 commit comments