View Single Post
Old 02-10-2009, 01:38 PM   #806 (permalink)
rmccomiskie
EcoModding Lurker
 
Join Date: Aug 2008
Location: Massachusetts USA
Posts: 84

Ziggy - '95 Audi S6 Sedan

Manfred - '97 Audi A6 Quattro Sedan
90 day: 20.61 mpg (US)

Clarabell - '03 Audi A4 Quattro Avant

Sherman - '98 Audi A6 Quattro Avant

Cab - '96 Audi Cabriolet
Thanks: 0
Thanked 2 Times in 2 Posts
Code Question

I'm trying to track down why, when I'm coasting and the injectors are shut off, I see GPH rise to a very large number.

In this routine in v0.75:

Code:
void processInjClosed(void){      
  long t =  microSeconds();
  long x = elapsedMicroseconds(injHiStart, t)- parms[injectorSettleTimeIdx];       
  if(x >0)
    tmpTrip.injHius += x;       
  tmpTrip.injPulses++;      

  if (tmpInstInjStart != nil) {
    if(x >0)
      tmpInstInjTot += x;     
    tmpInstInjCount++;
  } else {
    tmpInstInjStart = t;
  }
  
  tmpInstInjEnd = t;
}
The variables t and x are declared as 'long'. Yet the functions being assigned to those vars are declared as 'unsigned long'. I am not familiar with how this compiler resolves assignment of dissimilar values. Will this introduce an error?
  Reply With Quote