You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Functions/Modules/Analog Input/BpodAnalogIn.m
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -893,24 +893,24 @@ function scope(obj)
893
893
end
894
894
895
895
function scope_StartStop(obj, varargin)
896
-
% scope_StartStop() toggles data acquisition by the scope()
897
-
% GUI. It is called by a start button on the GUI, but it can also be
898
-
% called from a user protocol file to start analog data logging with
899
-
% online monitoring.
896
+
% scope_StartStop This function toggles data acquisition when using the oscilloscope functionality of the AnalogIn module.
897
+
% The function is called by the start button on the oscilloscope GUI, but can also be called from a
898
+
% user protocol to start recording data with online monitoring via the GUI.
899
+
900
+
% :param update_frequency: Update frequency, in seconds (s), for the oscilloscope GUI during data acquisition, defaults to 0.05 (50 ms)
901
+
% :type update_frequency: float, optional
902
+
900
903
901
904
% Default GUI update time is 0.05s
902
905
default_update_time =0.05;
903
-
oscope_time=0;
906
+
update_frequency=0;
904
907
905
908
ip =inputParser;
906
909
valid_update_time = @(time) isfloat(time) && isscalar(time) && (time>0); % Update time must be a float, scalar, and greater than zero
907
-
valid_obj = @(x) isa(x, 'BpodAnalogIn'); % Have to also check obj is an instance of BpodAnalogIn
908
-
909
-
addRequired(ip, 'obj', valid_obj); % instance is a required argument
910
-
addOptional(ip, 'oscope_time', default_update_time, valid_update_time); % oscope_time is optional, if the passed value is invalid, the default is used
910
+
addOptional(ip, 'update_frequency', default_update_time, valid_update_time); % update_frequency is optional, if the passed value is invalid, the default is used
911
911
912
-
parse(ip, obj, varargin{:}); % parse the args
913
-
oscope_time=ip.Results.oscope_time; % assuming all is well, grab the value from the parser
912
+
parse(ip, varargin{:}); % parse the args
913
+
update_frequency=ip.Results.update_frequency; % assuming all is well, grab the value from the parser
914
914
915
915
scopeReady =1;
916
916
if ~isfield(obj.UIhandles, 'OscopeFig')
@@ -942,7 +942,7 @@ function scope_StartStop(obj, varargin)
0 commit comments