Skip to content

Commit fe23c61

Browse files
committed
Fix datatype.
1 parent d36c155 commit fe23c61

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

toolbox/src/bossdevice.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,19 @@ function stop(obj)
392392
function set.isArmed(obj, isArmed)
393393
if isArmed
394394
assert(~obj.isGeneratorRunning, 'Cannot arm target while generator is running.');
395-
setparam(obj, 'GEN', 'enabled', 1);
395+
setparam(obj, 'GEN', 'enabled', true);
396396
setparam(obj, 'TRG', 'enabled', 1);
397397
if ~obj.isRunning
398398
disp('bossdevice is armed and ready to start.');
399399
end
400400
else
401-
setparam(obj, 'GEN', 'enabled', 0);
401+
setparam(obj, 'GEN', 'enabled', false);
402402
setparam(obj, 'TRG', 'enabled', 0);
403403
end
404404
end
405405

406406
function isArmed = get.isArmed(obj)
407-
if (getparam(obj, 'GEN', 'enabled') == 1 && getparam(obj, 'TRG', 'enabled') == 1)
407+
if (getparam(obj, 'GEN', 'enabled') == true && getparam(obj, 'TRG', 'enabled') == 1)
408408
isArmed = true;
409409
else
410410
isArmed = false;
@@ -444,9 +444,9 @@ function sendPulse(obj, port, width, marker)
444444
marker = port;
445445
end
446446

447-
setparam(obj, 'GEN', 'enabled', 0);
447+
setparam(obj, 'GEN', 'enabled', false);
448448
setparam(obj, 'TRG', 'enabled', 0);
449-
setparam(obj, 'GEN', 'manualtrigger', 0);
449+
setparam(obj, 'GEN', 'manualtrigger', false);
450450

451451
obj.configure_generator_sequence([0 width port marker]); % 0 seconds after the trigger and during 0.001 seconds, trigger port 1 and send marker 1
452452

@@ -457,11 +457,11 @@ function sendPulse(obj, port, width, marker)
457457
end
458458

459459
function manualTrigger(obj)
460-
setparam(obj, 'GEN', 'enabled', 1);
460+
setparam(obj, 'GEN', 'enabled', true);
461461
setparam(obj, 'TRG', 'enabled', 0);
462462

463-
setparam(obj, 'GEN', 'manualtrigger', 1);
464-
setparam(obj, 'GEN', 'manualtrigger', 0);
463+
setparam(obj, 'GEN', 'manualtrigger', true);
464+
setparam(obj, 'GEN', 'manualtrigger', false);
465465

466466
disp('Triggering sequence...');
467467

0 commit comments

Comments
 (0)