Commit Graph

3059 Commits

Author SHA1 Message Date
Josh Stewart ad93a801c4 Revised CAN Broadcast system. Added Haltech dash protocol 2024-08-08 13:45:49 +10:00
tx_haggis 7c14269fc3
Tweak unit tests so they pass on Teensy 3.5 (#1233) 2024-08-02 15:51:23 +10:00
tx_haggis 96dce4429c
Unit test all corrections (#1207)
* Add unit tests for correctionCranking

* Unit test correctionASE

* Add test_maths_div10_s16_perf

* Make TPS AE tests independent

* Add test_corrections_MAE

* Use RUN_TEST_P to reduce test RAM usage

* Unit test correctionFloodClear

* Unit test battery correction

* Add unit tests for correctionLaunch

* Test repetability - initialiseAll at the start of every test

* Unit test flex & fuel temp corrections, plus minor cleanup

* Unit tests - avoid forward declarations

* Separate out populate_table() from 3D table tests

* Separate calculation of AFR target from correction (and unit test the calculation).
Separation of concerns and will make unit test AFR correction easier.

* Unit test correctionAFRClosedLoop

* Unit test correctionsFuel

* Add populate_2dtable_P test utility function

* Unit test all ignition corrections

* Add compile time buffer overflow check to RUN_TEST_P

* DFCO - test behavior not implementation

* Tweak tests to pass on Teensy 3.5

* Shrink unit test for faster build/upload/execute
We just need the 2D tables wired up, not the whole system initialized.
1. Factor out construct2dTables() from initialiseAll()
2. In the unit tests,  call construct2dTables() instead of initialiseAll()
Linker then does the heavy lifting of removing unused symbols

* Add test_correctionsDwell_uses_batvcorrection

* Use TEST_ASSERT_BIT_[HIGH_LOW] instead of TEST_ASSERT_[TRUE|FALSE]
Better failure messages, declares intent

* Igniton corrction test: expand assertions: make sure all corrections test both positive an negative advance values.

* Add AE test assertion: especially for MAE

* Add AE timeout unit tests

* Convert copy/paste 2D table construction code into shared functions

* Disbale knock unit tests until knock implementation is stable.
2024-07-30 14:35:20 +10:00
Daniel Johnson fc5397b5a7
fix: inconsistent type on revolutionTime (#1228) 2024-07-21 09:39:18 +10:00
Josh Stewart 3921610a46 Initial knock control for analog external controller input 2024-07-12 08:16:37 +10:00
Josh Stewart 003b1f0631 Initial knock control for use with external controller. Digital mode only supported 2024-07-11 16:14:09 +10:00
Josh Stewart 68d0ad33c9 Fix incorrect log variable name in ini (flexBoostCor) 2024-07-11 10:44:33 +10:00
Vitor Moreno B. Sales 6f80fb78df
Fix for #1218 and rusEFI code simplification (#1223) 2024-07-11 10:14:06 +10:00
Josh Stewart dd41d64dc6 Fix for potential double interrupt on Teensy 4.1 PIT timers 2024-07-09 12:31:31 +10:00
Josh Stewart dd9881c62d Fix for incorrect ignition pulse width with 3 and 5 cylinder engines under specific conditions
Conditions required for this bug:
Fuel set to sequential
Ignition set to single channel
Per tooth ignition timing enabled
3 or 5 Cylinders
2024-07-09 12:31:02 +10:00
Josh Stewart 1d6391a05e Prevent potential divide by 0 on init 2024-06-21 19:41:35 +10:00
tx_haggis 0f13753ed3
Performance: optimized 32-bit shifts (#1187)
* Add optimized 32-bit shifting

* Tooth based time to angle coversion is only used by a few decoders.
So move the functions into decoders.cpp

* Better separation of deocders and crank maths.

* Apply optimised shifts

* Doxygen
2024-05-30 14:12:14 +10:00
Josh Stewart 478e16cc52 Prevent flex boost adjustment being added multiple times to boost target 2024-05-29 17:45:19 +10:00
Josh Stewart aa0a7b7ab6 Fix for Flex Boost Correction variable not being set correctly 2024-05-29 16:32:25 +10:00
Josh Stewart a31e64b9df Warnings cleanup 2024-05-29 16:29:25 +10:00
tx_haggis cb78a45326
Unit Tests: provide correct filename in test messages (#1211)
* Make Unity print the correct file name - VS code output will then provide a clickable link :-)

* Provide macro to save, set & restore Unity filename
2024-05-29 15:27:50 +10:00
nickamuch 40463c51d6
Adding functionality for Honda J series crank decoder. (#1202)
Changes have been tested and are running well on a J32.

Co-authored-by: Nick Amuchastegui <nick@watttime.org>
2024-05-29 14:41:51 +10:00
tx_haggis 951f97f559
cppcheck: have to use absolute paths. (#1216) 2024-05-29 13:44:12 +10:00
Josh Stewart 0258f641ee Enable secondary trigger on non-seq missing tooth when VVT is enabled. See #1213 2024-05-29 13:28:05 +10:00
Josh Stewart bff1beca5d Record VVT angle when Poll cam method is in use. Fixes #1213 2024-05-27 09:34:00 +10:00
Vitor Moreno B. Sales 84e63d867e
Fix coil 6 declaration for STM32F407 SPECTRE board (#1215) 2024-05-27 08:15:40 +10:00
Josh Stewart 3c8726ffa0 Correct IO numbers for Teensy boards. Fixes #567 2024-05-14 12:46:15 +10:00
Josh Stewart cac1a05f97 Fix compilation for RTC_ENABLED is set but not SD_LOGGING 2024-05-11 09:07:44 +10:00
tx_haggis 5ac589752b
Provide hook for developer local PIO configuration (#1212) 2024-05-10 08:04:13 +10:00
Josh Stewart cd4a8e9640 Clear interrupt flag before enabling schedule timers on T4.1 2024-05-09 19:31:12 +10:00
Josh Stewart df78f5109c Disable the OFF Open Load pull-down current on MC33810 init 2024-04-07 15:15:35 +10:00
Josh Stewart a94b1231f3 Revert "Include current inj angle in injector timeout calculation. Fixes #1181"
This reverts commit 97b72b027e.
2024-04-05 16:31:36 +11:00
Josh Stewart 97b72b027e Include current inj angle in injector timeout calculation. Fixes #1181 2024-04-05 15:21:47 +11:00
Josh Stewart bbe7fa7f09 Correctly handle 2 stroke basic distributor setups. Fixes #1192 2024-04-03 15:37:49 +11:00
Josh Stewart e2f1c67c78 Fix regression that broke tacho sweep function. Fixes #1195 2024-04-03 14:57:47 +11:00
dependabot[bot] 0c725bc6f8
Bump actions/setup-python from 4 to 5 (#1143)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 10:08:30 +11:00
Josh Stewart 378200c2a7 Prevent potential fuel pump oscillation during tooth timeout period 2024-04-01 16:09:41 +11:00
Josh Stewart 9474f659b0 Disable automatic pulldown on Teensy 4.1 analog pins 2024-04-01 15:57:35 +11:00
tx_haggis 170c3a8a31
Fix compile failure (PR->master branch mismatch issue) (#1200) 2024-03-22 22:48:01 +11:00
tx_haggis e08d5dab25
test_math: make unit tests pass on Teensy (#1137)
Required converting dwell, actualDwell, dwellCrank & dwellRun to unsigned.
2024-03-21 11:45:10 +11:00
Daniel Tobias 3a712baf23
Comment typos correction (#1189)
* basic spelling fixes

* basic spelling fixes, external libs
2024-03-21 11:37:45 +11:00
Vitor Moreno B. Sales 98cf514bcf
Fix Stepper idle cranking outputting half steps (#1197)
* Fix Stepper idle cranking outputting half steps

* Add macros for stepper less and more air

---------

Co-authored-by: Josh Stewart <josh@noisymime.org>
2024-03-16 13:05:10 +11:00
Pasi Kemppainen e2bcac6ea3
Small bug fix, to correct TPS value over OBD2 (#1194)
* Fix OBD2 TPS value

* Fix the TPS on CAN broadcast too
2024-03-16 12:17:10 +11:00
Josh Stewart 6f9348a282 Fixes for CAN init on T41 2024-03-15 16:07:47 +11:00
Josh Stewart 5bef8d4bf7 Signatures for 202405-dev 2024-02-26 19:59:16 +00:00
Josh Stewart a4eed5f3e3 Signatures for 202402 release 2024-02-23 15:55:56 +11:00
dynfer 7879d6a3cc
Conditional heater enable (#1185) 2024-02-23 10:23:06 +11:00
Josh Stewart a1302a0cc3 Correct staging unit test for corrected open time 2024-02-20 16:10:40 +11:00
Josh Stewart 7361b46160 Only calculate corrections values on the secondary spark looked if either of the table switching modes are used (Not Multiple or Add)
Fixes #1154
2024-02-20 15:55:40 +11:00
Josh Stewart be3c49b0be Add injector open time back into total PW when auto staging is used.
Fixes #1172
2024-02-20 15:36:45 +11:00
Josh Stewart 66ee231aef Move CAN WBO to AFR dialog 2024-02-20 09:19:00 +11:00
tx_haggis b9c201de83
Fix possible array overrun (#1178) 2024-02-16 16:59:45 +11:00
Josh Stewart 5bfbd1eb28 Align scheduler timeout checks on fuel match those on ignition
Potential fix for #1181
2024-02-16 09:56:24 +11:00
Josh Stewart 7dc25282b3 Upload stm32f407 master builds in workflow upload to speeduino.com server 2024-02-12 17:18:11 +11:00
tx_haggis 2eb8daacc8
Add unit tests for recent 3 cylinder squirts changes (init.cpp) (#1179)
* Fix & extend fueling init unit tests for 3 cylinders

* Unit test - Fix possible buffer overrun
2024-02-11 23:11:54 +11:00