Skip to content

Commit c5e7ab0

Browse files
authored
Merge pull request #40 from austin2118ace/cal_fix
Fix crash on emulator load
2 parents 269269f + 0eac025 commit c5e7ab0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Bpod.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ function Bpod(varargin)
109109
end
110110
end
111111
end
112-
BpodLib.calibration.liquid.io.report(BpodSystem.CalibrationTables.LiquidCal)
113-
BpodLib.path.verifyPathing(BpodSystem);
114112

115113
function emulator_setup(varargin)
116114
% Runs setup with emulator mode flag set to 'true'.
@@ -129,6 +127,9 @@ function emulator_setup(varargin)
129127
BpodSystem.Status.Initialized = true;
130128
evalin('base', 'global BpodSystem')
131129

130+
BpodLib.calibration.liquid.io.report(BpodSystem.CalibrationTables.LiquidCal)
131+
BpodLib.path.verifyPathing(BpodSystem);
132+
132133
function emulator_dialog
133134
% Launches a GUI indicating that hardware connection has failed.
134135
% Prompts the user to start emulator mode or close the program.

Functions/+BpodLib/+utils/getCurrentCOM.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
along with this program. If not, see <http://www.gnu.org/licenses/>.
3535
%}
3636

37-
if isempty(BpodSystem.SerialPort)
37+
if ~isfield(BpodSystem, 'SerialPort')
3838
comport = 'EMU';
3939
else
4040
comport = BpodSystem.SerialPort.PortName;

0 commit comments

Comments
 (0)