function initDetectBlocks()
%

%   Copyright 2011 The MathWorks, Inc.

prmVal = get_param(gcbh,'OutDataTypeStr');

if strcmp(prmVal,'boolean')
    setValue = 'boolean';
else
    setValue = 'fixdt(0, 8)';
end

set_param([gcb,'/FixPt Relational Operator'], 'OutDataTypeStr', setValue);

set_param([gcb,'/', 'Delay Input1'], ...
    'InputProcessing', get_param(gcbh,'InputProcessing'));

name = get_param(gcbh, 'ReferenceBlock');
switch (name) 
  case sprintf('simulink/Logic and Bit\nOperations/Detect Rise\nPositive')
    compblk = 'Positive';
  case sprintf('simulink/Logic and Bit\nOperations/Detect Rise\nNonnegative')        
    compblk = 'Nonnegative' ;
  case sprintf('simulink/Logic and Bit\nOperations/Detect Fall\nNegative')
    compblk = 'Negative';
  case sprintf('simulink/Logic and Bit\nOperations/Detect Fall\nNonpositive')
    compblk = 'Nonpositive';
  otherwise
    return;
end

set_param([gcb,'/', compblk], 'OutDataTypeStr', prmVal);
