Skip to content

Commit e849fbf

Browse files
committed
Merge branch 'master' of https://github.com/cortex-lab/Rigbox
AlyxPanel weighing button can now submit the weight from the current scales reading.
2 parents 6ebf03f + eabb884 commit e849fbf

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

+exp/SignalsExp.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,8 @@ function saveData(obj)
904904
contL = getOr(obj.Data.events, 'contrastLeftValues', NaN);
905905
contR = getOr(obj.Data.events, 'contrastRightValues', NaN);
906906
if ~any(isnan(contL))&&~any(isnan(contR))
907-
writeNPY(contL(:)*100, fullfile(expPath, 'cwStimOn.contrastLeft.npy'));
908-
writeNPY(contR(:)*100, fullfile(expPath, 'cwStimOn.contrastRight.npy'));
907+
writeNPY(contL(:), fullfile(expPath, 'cwStimOn.contrastLeft.npy'));
908+
writeNPY(contR(:), fullfile(expPath, 'cwStimOn.contrastRight.npy'));
909909
else
910910
warning('No ''contrastLeft'' and/or ''contrastRight'' events recorded, cannot register to Alyx')
911911
end

+srv/expServer.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,13 @@ function handleMessage(id, data, host)
261261
fid = fopen([name(1:end-3) 'json'], 'w');
262262
fprintf(fid, '%s', obj2json(rig));
263263
fclose(fid);
264+
if ~strcmp(dat.parseExpRef(expRef), 'default')
265+
try
266+
Alyx.registerFile([name(1:end-3) 'json']);
267+
catch ex
268+
warning(ex.identifier, 'Failed to register hardware info: %s', ex.message);
269+
end
270+
end
264271

265272
if rig.timeline.UseTimeline
266273
%stop the timeline system

0 commit comments

Comments
 (0)