BpodSystem_ProtocolSettings
BpodSystem.ProtocolSettings
Description
Contains the settings struct selected by the user in the launch manager when running a protocol.
A default, empty settings struct is always created when a new subject is added.
The current settings file on the disk can be replaced with BpodSystem.ProtocolSettings using the SaveBpodProtocolSettings function.
Example
% 1. This code checks the selected settings file to see if it has been populated - and if not, adds default values.
S = BpodSystem.ProtocolSettings; % Load settings chosen in launch manager into current workspace as a struct called S
if isempty(fieldnames(S)) % If settings file was an empty struct, populate struct with default settings
S.SoundDuration = 0.5; % Duration of sound (s)
S.RiotDuration = 7.5; % Duration of riot(s)
SaveBpodProtocolSettings; % Saves the default settings to the disk location selected in the launch manager.
end