function adasblocks_callbackEnablePanel(blk)
% Callback function of the "Number of obstacles" Edit field in the Vehicle
% Path Planner (VPP) System block dialog.

% Copyright 2022 The MathWorks, Inc.

% this parameter is not tunable.
if any(strcmpi(get_param(bdroot(blk),'SimulationStatus'),{'external','running'}))
    return
end
% enable/disable of the obstacle list panel
maskObj = Simulink.Mask.get(blk);
selection = get_param(blk,'numObs'); % do not use "object.Value'
object = maskObj.getDialogControl('ObsPanel');
if strcmp(selection,'0')
    object.Enabled = 'off';
else
    object.Enabled = 'on';
end
