%% ************************************************************************
% Model         :   mcb_pmsm_foc_host
% Description   :   Evaluate the hardware selected in host model
% File name     :   mcb_evalHW_host_model.m
% Copyright 2020 The MathWorks, Inc.

if( strcmp(get_param([gcs '/TX/HW_Selected'], 'Value'), '0'))

set_param([gcs '/RX/Host Serial Receive'], 'dataType', 'uint16');
set_param([gcs '/TX/SCI_TX/Convert'], 'OutDataTypeStr', 'uint16');
set_param([gcs '/RX/Host Serial Receive'], 'dataHead', '''SS''');
set_param([gcs '/RX/Host Serial Receive'], 'dataTail', '''EE''');
set_param([gcs '/Host Serial Setup'], 'baudRateA', '5.625e6');
set_param([gcs '/TX/SCI_TX/Data_Conditioning_Tx'], 'OutDataTypeStr', 'fixdt(1,16,12)');
set_param([gcs '/RX/Data_Conditioning_Rx'], 'OutDataTypeStr', 'fixdt(1,16,12)');


elseif( strcmp(get_param([gcs '/TX/HW_Selected'], 'Value'), '1'))

set_param([gcs '/RX/Host Serial Receive'], 'dataType', 'uint32');
set_param([gcs '/TX/SCI_TX/Convert'], 'OutDataTypeStr', 'uint32');
set_param([gcs '/RX/Host Serial Receive'], 'dataHead', '''SSSS''');
set_param([gcs '/RX/Host Serial Receive'], 'dataTail', '''EEEE''');
set_param([gcs '/Host Serial Setup'], 'baudRateA', '5e6');
set_param([gcs '/TX/SCI_TX/Data_Conditioning_Tx'], 'OutDataTypeStr', 'fixdt(1,32,28)');
set_param([gcs '/RX/Data_Conditioning_Rx'], 'OutDataTypeStr', 'fixdt(1,32,28)');

end