Commit Graph

6 Commits

Author SHA1 Message Date
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
tx_haggis 963f6317ba
Save 600+ bytes RAM (step 5 of 9) - De-duplicate setSchedule functions (#1111)
* initialiseSchedulers: factor out shared code.

* Proxy setFuelSchedule\d through generic
setFuelSchedule() function

* Directly call setFuelSchedule

* Simplify unit tests

* Proxy setIgnitionSchedule\d through generic
setIgnitionSchedule() function

* Directly call setIgnitionSchedule

* Simplify unit tests

* Optimize by partially inlining
the set[Fuel|Ignition]Schedule funcs

* Use the embedded schedule compare
& counter members instead of using
hardcoded individual channel macros.

* Unit test adjustCrankAngle
2023-11-24 09:35:43 +11:00
tx_haggis b03db96ad7
Save 600+ bytes RAM (step 4 of 9) - deduplicate scheduler ISR functions (#1063) 2023-10-07 08:25:26 +11:00
tx_haggis 0afffb2ca0
Unit test the schedule calculations (#1010)
* Refactor: separate out schedule calcs from speeduino.ino
(so they can be unit tested)

* Add unit tests for compute_delay

* Use PROGMEM to store test input & output

* Add some 720 unit tests

* Rename unit test file

* Test ignition codepaths 2-8

* Test ign1 calcs

* Add first injector calc tests

* Add 720 deg tests
Simplify

* Simplify test_calc_inj1_timeout

* Claw back RAM

* Simplify test framework
Channel angle is part of the test data set.

* Move schedule calculation unit tests into their own harness
Competing for RAM with the rest of Speeduino
can cause them to fail,

* Performance: inline all schedule calcs.

* Unit test end angle

* Unit test calculateIgnitionAngle1

* Test start angles also
And test end angles for channel 1

* Unit test calculateIgnitionAngle3

* Unit test calculateIgnitionAngle4

* Improve unit test output

* Add Nissan360 decoder unit tests.

* Add Ford ST170 decoder unit tests

* Add NGC decoder unit tests
2023-03-06 17:23:17 +11:00
Josh Stewart efe962598a Fix for OUTPUT test failing due to random pin assignments 2021-10-05 11:15:14 +11:00
Josh Stewart fd9fa36c29 Major revamp of unit testing framework 2020-11-19 21:38:00 +11:00