View Single Post
Old 06-04-2009, 12:17 AM   #1530 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Paul, not sure if this is working yet, couple comments on the conversion:
/trunk/HighVoltageControllerRefactoredISRReorganized.c - Open ReVolt - Trac

Sorry, it's just an optimization though.

Calling ReadThrottle and ReadCurrent in ISR (ADC_vect) adds a bit of code to that interrupt handler. Might just update the raw current and throttlePos variables directly (like temperature) and have a void ReadThrottle(int16_t) that you pass tmpThrottle to after making a copy of it, but outside the cli block in main. Same for ReadCurrent. Can inline them too. Might call them ConvertThrottle and ConvertCurrent instead too.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote