Well, I got a little side-tracked with going through the MPGuino v0.86 code, to figure out how it all works. However, I am through it, and have figured out the likely spot to inject the pressure correction factor (the fuel injector shut-off interrupt handler), and have also figured out that the factor will likely be calculated on-the-fly in the main body of the program code. The interrupt handler simply cannot be saddled down with anything resembling a square root calculation. Having the correction factor being calculated once per display update cycle will lead to inaccuracy, but I think it'll be orders of magnitude better than having no correction factor at all.
In the course of figuring out how the code works, I've managed to shave off some 3000 compiled program bytes and some 100 lines from the code, to optimize the code somewhat to add the correction factor computing. I will go through this subforum to glean off some other interesting ideas.
|