View Single Post
Old 05-31-2009, 05:20 PM   #1510 (permalink)
dlaing
EcoModding Lurker
 
Join Date: Aug 2008
Location: Calgary, AB
Posts: 21

Corolla bandit - '05 Toyota Corolla CE
Thanks: 1
Thanked 1 Time in 1 Post
Paul,
Is the code not working because you don't reenable the interrupts after copying the variables?
The code would be easier to read with nicer variable names. I suggest globalISRcurrent, temp and throttle. globalADCMode, and globalISRcounter. I think everything else can be a local variables. throttle, current and temperature, currentSum, etc. Eliminating tmp and _ variables.
David
  Reply With Quote