* Use fixed width types
* Improve table construction: automatically deduce length
* Improve 2d table test coverage
* Shrink cache types - save memory
* Remove lastXMin - it's always lastXMax-1: save memory
* Rename lastXMax to lastBinUpperIndex
* Bug Fix: lastBinUpperIndex is always in the range (1:length]
* Reuse - call construct2dTable() instead of custom function
* MISRA fixes
* Elide unecessary local variable (X)
* Separate 2d table cache into it's own struct.
* Use a bin idiom to simplfy the table2d search code
* Add opaque_array_t - captures the concept of an opaque array (void*)
* Reorder the checks on the assumption that we are within axis bounds most of the time.
* Better int16_t support.
* Table 2D - Initialise during constexpr construction.
Saves flash & RAM
* Remove knock tables (unused).
* Limit scope of all table2D instances (none need to be global).
[BREAKING CHANGE!] This change will result in different behaviour if you currently have the injector open time voltage correction set to apply to 'Whole PW'. In this instance, you may need to retune your open time values.
If you had this setting left to the default (And recommended) value of 'Open time only' then there is no change.
* Added Ford TFI Decoder
Decoder for Ford TFI Distributor mounted wheel with narrower signature tooth for cylinder no 1
* Removed variable
variable tempRevolutionOne was declared but not used.
If user set iacCoolTime to 0, program run will newer get to 'stepper motor enable pin setting' part.
Stepper status have to be STEPPING or COOLING to get into condition on line 300, then there is next condition for STEPPING status and power disable check is in else statement, so only status COOLING can get there. But if iacCoolTime=0, status is set to SOFF and stepper motor remains enabled.
The injector priming pulse could fail to occur if either of the following conditions were met:
1. The injector priming delay was 0.1s or less
2. Flood clear was set to 100% (ie Disabled) but TPS reading was 100%
* Unit testability: split out definition of statuses struct.
* Separate out getLoad() function
* Bug Fix: getAdvance1() & getAdvance2() should return a signed value.
* secondarytables.cpp - extract duplicate code into functions.
* Bug fix: BIT_STATUS3_FUEL2_ACTIVE not set in 2 cases.
* Performance: secondaryTables call percentage()
(which is optimised)
* Add secondary table tests
* Bug Fix: do not correct secondary spark multiplier
* Unit test no secondary spark with fixed timing.
* MISRA fixes
* Save memory: remove statuses::ignLoad2 & fuelLoad2 (unused)
* Unit testability: split out definition of config page structs.
* Make 3D table interpolation a const operation.
* Unit testability: inject the tune & status.
* Make the advance2 gauge work correctly in multiply mode
* Secondary table tests - no global state
* Secondary table tests: add additional spark multiply tests to cover #1274
---------
Co-authored-by: Josh Stewart <josh@noisymime.org>
* Avoid overflow of timer period between the current and next schedules
Potential fix for #1181
* Remove end compare on fuel schedules. Significant RAM improvement
* Cleanup of new code. Align ignition schedules with new fuel schedules
* Slight tweak to fuel scheduling conditions
* Prevent missed injection pulse under specific timing conditions
* Further work handling when injection start angle passes back and forth between 0 and CRANK_ANGLE_MAX_INJ
* Do not queue next fuel schedule if cycle time exceeds max timer duration
* Fix unit tests based on code path changes
* Hardened pin reassignment
Added check as some functions access the pin via registers and had no check.
Added protection for "board default" pin value as it can lock up STM32 board due to wrong board layout.
Added STM32 CAN pins to the `pinIsReserved` check.
* Fixed check for inputs
* Fixed typos on last commit
* Fixed possible problems with some outputs
Fixed first test failed on previous commit
* Correctly init reset pin
---------
Co-authored-by: Josh Stewart <josh@noisymime.org>