3 -1. Refactor all vars to A be consistent, readable, meaningful B be inside a massive struct in an intelligent order padded by a string to be 4k or some other clean amount.
4 0. Make header dependencies clean in Makefile - make file will deteriorate in cleansliness, but compile will be faster
5 1. Add checking of preprocessed C files for 8 bit notted literals. grep -rn "~0x[0-9][0-9];" src should return 0 lines.
6 1.5 ditto, check for use of "&= !"
7 2. Do basic range checking and ensure that dwell overlap functions correctly.
8 3. Because it is meaningless to have 100% duty dwell, ensure that some brief period is always allowed for spark to occur in.
9 4. Add proper staging code allowing configurable parallel on OR off and PIT scheduled other event (two pits for staged siamese, but not yet?)
10 5. Add ADC averaging code (stabilises readings) in the calculation section
11 6. Add proper advance calcs based on speed and time rather than just time as now (which is very wrong) offsets should be in degrees too
12 7. Add proper wheel decode/sync code
13 8. Add proper scheduling code
14 9. Add ignition control with PITS to scheduling
15 10. Add fuel pump turn on for X seconds at power on, and on with RPM, off with no rpm for more than X seconds
16 11. Add tacho output in configurable way
17 12. Add rpm/accel/change in accel prediction to periods etc, and do per tooth.
18 18. Clean up headers more by splitting and rearranging and grouping
19 19. Check for volatile stuff that isn't labeled as such
20 20. Add staged atmospheric calculations/corrections with if then else if options (% load, manual correction, no correction, fixed correction, dashpot via standard ADC, etc and/or all/some of them)
21 21. Add staged delta/transient calculations/corrections with if then else if options (WW1, WW2, TPS based, MAP based, RPM based, load based, etc and/or all/some of them)
22 22. Add EGO Lambda correction calculations/corrections option block
23 29. Add ign correction for engine temp (+/- params? table?)
24 30. Add ign correction for intake air temp (+/- params? table?)
25 32. Add ign correction for knock level/frequency/history
26 33. Add ign adjustment for anti lag
27 34. Add ign adjustment for launch control
28 35. Add option for fixed timing
29 36. Add ign adjustment for rpm limit (soft)
30 37. Add ign cut for rpm limit (hard)
31 38. Add ign adjustment for idle speed control
32 39. Add fuel enrichment based on knock.
33 40. Add fuel correction based on fuel temperature and or pressure and or dashpot or flexfuel sensor
34 43. Add coolant based RPM limiting by using tables for each RPM limit such that it is always done that way
35 44. Think about how to implement priming pulses
36 45. Think about how to implement post start enrich
37 46. Think about how to implement other time based things such as knock, fuel pump, etc
38 47. Add additional fuel variable for NOS use
39 51. Add structure to determine the current rpm limits for each type (4 types)
40 52. Ensure ordering of all fuel and ignition calculations is perfect for best precision and correctness
41 53. Add runtime vars for ALL functions/ISRs of any importance
43 56. Add Ignition struct
44 57. Add Injection struct
45 58. Add Engine position struct
46 59. Add Validity flags perhaps in the status struct?
47 60. Calculate RPM based on data recorded during decode
49 * averaging all vars by the appropriate amount
51 * fuel advance calculations
52 * ignition dwell and angle calcs
53 * apply corrections to ignition
54 * ignition advance calcs