HotCat wrote:By 3 years evolution, FreeEMS source code had significant changed from 0.0.1. The comments are rich and easy to understand. I can see Fred put so much effort to encapsulate the basic data structures in order to keep the code clean and high level abstract, I hardly find a hardwired code around, I think Fred definitely want FreeEMS to be run on all the gas engines every build. I start to believe FreeEMS don't need document, the source code is the best document.
Thank you very much for the very kind words! ♥
By searching the CONFIG == PRESTO_ID, I quickly sorted out how to make FreeEMS to schedule my injectors and ignition pins.
Great, but there are some "gotchas" there. Please make sure you're rebased onto the latest and then push a clean change set to github for review before you try to fire it up.
Also I can construct my own VE table based on Fred's truck.
Structure/format, OK, fine. But the values in the table are mostly wrong - even for my truck :-)
Code: Select all
#elif CONFIG == CATPOWER_ID // HotCat's Citroen ZX
anglesOfTDC: {ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540), ANGLE(0), ANGLE(180), ANGLE(360), ANGLE(540)},
outputEventPinNumbers: {0,1,0,1,2,3,2,3}, // Wasted spark, semi-sequential TODO migrate this to sequential
schedulingConfigurationBits: {0,0,0,0,1,1,1,1}, // First four ignition, last four injection
decoderEngineOffset: ANGLE(144.00), // need to prove with timing light
numberOfConfiguredOutputEvents: 8, // See two lines above
numberOfInjectionsPerEngineCycle: 2 // Semi-sequential, for now.
This looks correct :-) I'd recommend putting the angle at either 0 or 180 as a base, though. Make the math simpler when it comes time to sort out the real number.
ADC reading, generateCoreVars, generateDerivedVars, calculateFuelAndIgnition, scheduleOutputs, this is how the FreeEMS works
For now! I really dislike the way it's done, so it'll be changing a lot in future. It'll stay similar in some ways, though :-)
M$ Visual Studio, well I'll be damned, I never thought I'd see the day! :-o
At last, Merry Christmas
To you too, hotcat! :-)
Fred.