View Single Post
Old 12-12-2016, 01:15 PM   #36 (permalink)
skybolt
deviant
 
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
ah HA!! Found it

Code:
#ifdef useDebugReadings
        tripArray[(unsigned int)(rawIdx)].collectedData[(unsigned int)(rvInjCycleIdx)] = (t2CyclesPerSecond / loopsPerSecond);
        tripArray[(unsigned int)(rawIdx)].collectedData[(unsigned int)(rvInjOpenCycleIdx)] = ((16391ul * processorSpeed) / (loopsPerSecond * 10));
        tripArray[(unsigned int)(rawIdx)].collectedData[(unsigned int)(rvVSScycleIdx)] = (t2CyclesPerSecond / loopsPerSecond);
        tripArray[(unsigned int)(rawIdx)].collectedData[(unsigned int)(rvInjPulseIdx)] = (20ul / loopsPerSecond);
        tripArray[(unsigned int)(rawIdx)].collectedData[(unsigned int)(rvVSSpulseIdx)] = (208ul / loopsPerSecond);

        timerCommand |= tcWakeUpOnEngine; // tell system timer to wake up the main program
#endif
Updates to follow as I run it with live data and start tinkering with the code.

My first order of action will be to modify the loop time to allow for .01 sec resolution during the acceleration times, then see how badly that affects RPM, then look at putting in an RPM buffer so that dropping to zero takes 3 or 4 shortened loops.
  Reply With Quote