pastebin - collaborative debugging tool
eckelmann.kpaste.net RSS


comp-cap: Move |filtered_duration = 0|
Posted by Anonymous on Wed 23rd Oct 2019 12:28
raw | new post
view followups (newest first): comp-cap: Move |filtered_duration = 0| by Anonymous

  1. diff --git a/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c b/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  2. index 42d913d..187afe4 100644
  3. --- a/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  4. +++ b/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  5. @@ -258,6 +258,8 @@ int qa_mmc_calc( struct qa_mmc_dev *dev )
  6.        // if duration is longer than 100 ms the frequencey of pulses is less than 10 Hz.  This is an error
  7.        if(l_periode_duartion > MAX_MMC_PERIODE_DELAY) i_mmc_error |= 0x8;
  8.  
  9. +      filtered_duration = 0;
  10. +
  11.        // Filter to eliminate values much longer than average or much shorter than everage.  
  12.        // To prevent side effects activate filter only if L and R signal are not present
  13.        // Interrupt from these signals should be preventet by disabling them if the bridge from Pin C3 to C4
  14. @@ -298,7 +300,6 @@ int qa_mmc_calc( struct qa_mmc_dev *dev )
  15.  
  16.          ++filter_cnt;
  17.  
  18. -        filtered_duration = 0;
  19.  
  20.          for(i=0; i< 12; i++) {
  21.            if((t_periode_duartion[i] > l_periode_duartion_min) && (t_periode_duartion[i] < l_periode_duartion_max)) {

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at