1 % Copyright (C) 2013 Czech Technical University in Prague
4 % - Carlos Jenkins <carlos@jenkins.co.cr>
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 2 of the License, or
9 % (at your option) any later version.
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with this program. If not, see <http://www.gnu.org/licenses/>.
19 % File : rpp_select_callback_handler.m
21 % Custom callback funtion for rtwgensettings.SelectCallback event.
22 % Default values of Simulation configurations parameters are set.
23 % Some options are disabled if it is not allowed to be changed by user.
24 % Reference: rtw_ug.pdf p. 1211?
27 function rpp_select_callback_handler(hDlg, hSrc)
29 % The target is model reference compliant
30 slConfigUISetVal(hDlg, hSrc, 'ModelReferenceCompliant', 'on');
31 slConfigUISetEnabled(hDlg, hSrc, 'ModelReferenceCompliant', false);
33 % Setup the hardware configuration
34 slConfigUISetVal(hDlg, hSrc, 'ProdHWDeviceType', 'Texas Instruments->TMS570');
36 % Hardware being used is the production hardware
37 slConfigUISetVal(hDlg, hSrc, 'ProdEqTarget', 'on');
40 slConfigUISetVal(hDlg, hSrc, 'SolverType', 'Fixed-step');
41 slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
43 % Set the target language to C and disable modification
44 slConfigUISetVal(hDlg, hSrc, 'TargetLang', 'C');
45 slConfigUISetEnabled(hDlg, hSrc, 'TargetLang', false);
47 % Set the TargetLibSuffix
48 slConfigUISetVal(hDlg, hSrc, 'TargetLibSuffix', '.a');
50 % For real-time builds, we must generate ert_main.c
51 slConfigUISetVal(hDlg, hSrc, 'ERTCustomFileTemplate', 'rpp_file_process.tlc');