* Add udiv_32_16
* Apply udiv_32_16() where possible
* Convert udiv_32_16 to assembler
It's worth 20 loop/s
* Remove unused functions
* Remove degreesPeruSx2048 - unused
* Remove angleToTime - replace with direct calls
1. Drop angleToTime()
It's slow, only partially implemented and adds zero value
(and has MISRA violations)
2. Consistent function naming
3. Doxygen
* triggerPri_Nissan360 shouldn't set timePerDegree.
It will be overwritten every loop by doCrankSpeedCalcs()
* Use angleToTimeMicroSecPerDegree() instead of timePerDegree
No loss in performance
Increased injection open/close time accuracy (so unit test values must change)
Can remove timePerDegree global.
* Hide (encapsulate) crank math globals.
* Base all angle to time conversions on decoder computed variables.
This is within 2us of the revolution based method
and is much faster - which is essentially zero percent change.
* Performance: move calculation of degreesPeruSx32768
into decoders.
Remove doCrankSpeedCalcs() - it's doing nothing
at the moment.
* Apply libdivide to triggerSetEndTeeth functions.
Since triggerToothAngle is set once at initialization
time, we can generate the libdivide struct
once and reuse it many times.
* Remove lastToothCalcAdvance - unused
* Replace 16-bit division with shift
* Replace 32-bit divison with 16-bit division
* Avoid 32-bit division; use div100()
* inline percentage()
* Optimize div100()
* MISRA fixes
* Replace magic numbers with #defs
* Replace libdivide structs with inline constants
No perf or memory changes
* Use fixed types for PWM max count variables
* Accurate rounded integer division
* Formalise rounding behavior (DIV_ROUND_CORRECT)
* Apply DIV_ROUND_CORRECT to DIV_ROUND_CLOSEST(),
UDIV_ROUND_CLOSEST(), div100(), div360(),
percentage() & halfPercentage()
* Add, fix & improve unit tests
* Add udiv_32_16_closest()
* Perf: Limit percentage calculations to 16-bits
* MISRA fixes
* Add compare_executiontime() to encapsulate common perf testing code
* Signed to unsigned division
* Convert ignitionLimits() to an inline function.
Slight speed up, probably due to removing
multiple evaluations of macro arguments.
* Split unit tests up.
* udiv_32_16 - check for valid parameters
* Added taper for DFCO for ignition and fuel
Used 1 byte of RAM and 4 on page 9
* Moved data to be compatible with DFCO map thres
* Added taper for DFCO for ignition and fuel
Used 1 byte of RAM and 4 on page 9
* Moved data to be compatible with DFCO map thres
* Fixed potential overflow and DFCO tests
* Moved math into functions and added tests
---------
Co-authored-by: Josh Stewart <josh@noisymime.org>
* Map Limits for EGO
* Better update value for not breaking old tunes
my guess is that 300 kpa max will be good for not disabling EGO when using boost now but you can change for what value you think is the best
* Atualizar o updates.cpp
fix my dumbo mistake
* Prevent signed vs unsigned warning
---------
Co-authored-by: Josh Stewart <josh@noisymime.org>
* Update speeduino.ini
this fix parse problem in the msdroid debuglogs
* fix logs not opening in msdroid
this fix a problem that the logs the msdroid created cannot be open in msdroid itself
* Moved STM32 definitions from globals to board file
Moved definitions from globals.h
Removed old STM32 generic library as this is very old and unused for almost 5 years.
* Remove old stm32_generic build environment from platformio.ini
---------
Co-authored-by: Josh Stewart <josh@noisymime.org>
The original tool tip says that engine protections won't be active below min rpm.
the code implementation is actually that they won't be active until above the min rpm.
This is just a safety change.
Provides safe initial functions for decoder related function pointers.
Prevents possibly hard to track board reset issues in case some future decoder accidentally leaves any of the functions uninitialised. Or when those pointers accidentally are used before proper values are assigned.
Flash usage 18bytes for atmega2560
Ram usage unaffected.