1 % Copyright (C) 2013-2014 Czech Technical University in Prague
4 % - Carlos Jenkins <carlos@jenkins.co.cr>
6 % This document contains proprietary information belonging to Czech
7 % Technical University in Prague. Passing on and copying of this
8 % document, and communication of its contents is not permitted
9 % without prior written authorization.
11 % File : rpp_select_callback_handler.m
13 % RPP Target select callback handler.
15 % This callback function is triggered whenever the user selects the target
16 % in the System Target File Browser. Default values for Simulation and
17 % configurations parameters are set. Some options are disabled if it is not
18 % allowed to be changed by user.
24 function rpp_select_callback_handler(hDlg, hSrc)
26 % The target is model reference compliant
27 slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
28 slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
30 % Set the target language to C and disable modification
31 slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
32 slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
35 slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
36 slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
38 % Hardware being used is the production hardware
39 slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
41 % For real-time builds, we must generate ert_main.c
42 slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');
43 slConfigUISetVal(hDlg, hSrc, 'GenerateSampleERTMain', 'off');
44 slConfigUISetEnabled(hDlg, hSrc, 'GenerateSampleERTMain', false);
46 % Set the TargetLibSuffix
47 slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
50 slConfigUISetVal(hDlg, hSrc, 'ExtModeMexArgs', ['1 ''ttyUSB0'' 115200']);
52 % Configure PostCodeGen Command to execute
53 % (library code inclusion for compilation)
54 %% Note: No longer needed with static library
55 %% Leaving here for future reference.
56 %%slConfigUISetVal(hDlg, hSrc, 'PostCodeGenCommand', ...
57 %% 'rpp_lib_support(modelName, buildInfo)');