]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Do not call rpp_adc_update() multiple times
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 2 Mar 2015 10:53:01 +0000 (11:53 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 2 Mar 2015 10:53:01 +0000 (11:53 +0100)
Due to an error in the TLC template, rpp_adc_update() was called for
each ADC block, which wasteful.

rpp/blocks/tlc_c/sfunction_ain.tlc

index 17e60c2a28ac8107ab1cea5d172527536d57941c..ebe89c6efd9fabcbbab977dce33f7d65a5c6a7c7 100644 (file)
@@ -1,4 +1,4 @@
-%% Copyright (C) 2013 Czech Technical University in Prague
+%% Copyright (C) 2013, 2015 Czech Technical University in Prague
 %%
 %% Authors:
 %%     - Carlos Jenkins <carlos@jenkins.co.cr>
@@ -60,7 +60,7 @@
 
         %% First executed block must update cached values
         %if EXISTS("_RPP_ADC_UPDATE_") == 0
-            %assign _RPP_ADC_UPDATE_ = 1
+            %assign ::_RPP_ADC_UPDATE_ = 1
             if (rpp_adc_update() != SUCCESS) {
                 %<err_flag> = TRUE;
             }