Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion +hw/devices.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
%% Basic initialisation
fn = fullfile(paths.rigConfig, 'hardware.mat');
if ~file.exists(fn)
rig = [];
warning(['hardware config not found for hostname ', hostname]);
rig = [];
return
end
rig = load(fn);
Expand Down
6 changes: 6 additions & 0 deletions +srv/expServer.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ function expServer(useTimelineOverride, bgColour)
% get rig hardware
try
rig = hw.devices;
if isempty(rig)
error('rigbox:srv:expServer:noHardwareConfig', ['No hardware config '...
'info found for this rig. Cannot find this rig''s ''hardware.mat'' '...
'file, or hardware config set-up script. Unable to launch '...
'expServer.']);
end
catch ME
fun.applyForce({
@() communicator.close(),...
Expand Down
7 changes: 7 additions & 0 deletions cortexlab/+git/update.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ function update(scheduled)
% TODO Find quicker way to check for changes
% See also DAT.PATHS

% Check that paths are set up
assert(~isempty(which('dat.paths')), ...
'rigbox:git:update:copyPaths',...
['Error: ''dat.paths'' file not found. Please ensure that a '...
'''dat.paths'' file exists for your setup. A template can be found at '...
'''docs/setup/paths_template''.'])

% If not given as input argument, use 'updateSchedule' in 'dat.paths'. If
% not found, set 'scheduled' to 0.
if nargin < 1; scheduled = getOr(dat.paths, 'updateSchedule', 0); end
Expand Down