Subversion Repositories BL-Ctrl

Rev

Rev 29 | Rev 40 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 31
Line 48... Line 48...
48
  }
48
  }
49
 else                      // Negative Flanke
49
 else                      // Negative Flanke
50
  {
50
  {
51
    ICP_POS_FLANKE;
51
    ICP_POS_FLANKE;
52
#ifdef  _32KHZ 
52
#ifdef  _32KHZ 
53
    ppm = (ICR1 - tim_alt + (int) Timer1Overflow * 256) / 32;
53
    ppm = (ICR1 - tim_alt + (int) Timer1Overflow * 512) / 32;
54
#endif 
54
#endif 
55
#ifdef  _16KHZ 
55
#ifdef  _16KHZ 
56
    ppm = (ICR1 - tim_alt + (int) Timer1Overflow * 512) / 32;
56
    ppm = (ICR1 - tim_alt + (int) Timer1Overflow * 1024) / 32;
57
#endif 
57
#endif 
58
    if(ppm < 280) ppm = 280;
58
    if(ppm < 280) ppm = 280;
59
    ppm -= 280;
59
    ppm -= 280;
60
        if(PPM_Signal < ppm)  PPM_Signal++;
60
        if(PPM_Signal < ppm)  PPM_Signal++;
61
        else if(PPM_Signal > ppm)  PPM_Signal--;
61
        else if(PPM_Signal > ppm)  PPM_Signal--;