Index: mttroot/mtt/lib/rep/sfun_rep/sfun_interface.c.tmpl ================================================================== --- mttroot/mtt/lib/rep/sfun_rep/sfun_interface.c.tmpl +++ mttroot/mtt/lib/rep/sfun_rep/sfun_interface.c.tmpl @@ -32,19 +32,19 @@ const int NumberOfControllerInputs = 1; /* inputs TO controller */ const int NumberOfControllerOutputs = 1; /* outputs FROM controller */ /* End EDIT */ static void -_process_inputs (void) +_process_inputs (SimStruct *S) { /* insert _struc.c */ /* Start EDIT */ /* Edit this block to process the model inputs and outputs */ /* Remove the following line */ - fprintf (stderr, "*** Error: _sfun_interface.c has not been customised!\n"); return; + ssSetErrorStatus (S, "_sfun_interface.c has not been customised!\n"); /* simple example follows */ /* Get total of all outputs and input to controller */ controller_inputs[0] = 0.0; @@ -191,11 +191,11 @@ PRINT_ENTER; update_inputs_from_simulink (S); update_simtime_from_simulink (S); - _process_inputs (); + _process_inputs (S); UNUSED_ARG(tid); /* not used in single tasking mode */ for (i = 0; i < MTTNU; i++) { ssGetOutputPortRealSignal (S, 0)[i] = mttu[i];