Commit Graph

1346 Commits

Author SHA1 Message Date
Matthew Kennedy 32f319d7cd tests build 2024-12-24 02:59:54 -08:00
Matthew Kennedy 2efa469421 extract isCranking 2024-12-24 02:33:57 -08:00
Matthew Kennedy 4c770b3431 unnecessary includes 2024-12-24 02:15:40 -08:00
Matthew Kennedy cf58ece693 nix on SENT 2024-12-23 22:06:05 -08:00
Matthew Kennedy 84abe3692f fix tests 2024-12-23 13:38:19 -08:00
Matthew Kennedy 791f26ca8a Simplify idle: no "pid industrial" 2024-12-23 00:30:04 -08:00
Matthew Kennedy 8e6544a8fd broke a test 2024-12-14 14:07:54 -08:00
Matthew Kennedy 28e9f8a015 enum class-ify TriggerEvent 2024-12-12 15:37:14 -08:00
Matthew Kennedy 2c7a902d39 minor simplification to TableFunc template params 2024-09-26 16:27:40 -07:00
Matthew Kennedy 0d4632e266 (void) 2024-09-26 16:15:55 -07:00
Matthew Kennedy c3c7026b6a fix test 2024-09-25 00:41:29 -07:00
Matthew Kennedy fca72c4366 airmass takes a ptr for VE table 2024-09-25 00:27:40 -07:00
Matthew Kennedy 8952633854 int rpm -> float rpm 2024-09-25 00:16:53 -07:00
Matthew Kennedy 28fc04ee3d int rpm -> float rpm 2024-09-25 00:04:00 -07:00
Matthew Kennedy 1d9efc95f2 int rpm -> float rpm 2024-09-24 23:40:49 -07:00
Matthew Kennedy a329b3afca int rpm -> float rpm 2024-09-24 23:21:39 -07:00
Matthew Kennedy 4a37518d75 adjust test for new clamping default 2024-09-17 20:09:31 -07:00
Matthew Kennedy 3a394dc83a ETB expAverage cleanup #489 2024-09-17 18:49:13 -07:00
Matthew Kennedy 64108b67cf only check throttle jam while ignition is on #489 2024-09-17 18:33:32 -07:00
Matthew Kennedy 877ec23c47 etb jam tests #489 2024-09-17 18:18:00 -07:00
Matthew Kennedy 5c3d417441 simpler ETB jam detection #489
rather than try to integrate error over time, simply fault if there's been too much error for too long. Up to +-X error is allowed for any period of time, more is allowed for Y seconds.
2024-09-17 17:58:19 -07:00
alrijleh 9c928539bc
Disable DFCO when clutch is applied (#487)
* compiles but untested

* hide TS setting if clutchUpPin is not configured

* unit test passes

* disable feature if io not configured, fix unit test commit

* de morgans to align with other gating conditions - no functional change
2024-09-16 22:39:41 -07:00
Matthew Kennedy 89338bd4f9 implement DFCO hysteresis #478 2024-09-12 22:55:49 -07:00
Matthew Kennedy 48488b4f82 prefer true/false over 1/0 2024-09-12 22:52:00 -07:00
Matthew Kennedy 367cb28c99 oops missed one 2024-09-12 22:37:52 -07:00
alrijleh 86c1c52551
configure DFCO MAP threshold to vary based on RPM (#485)
* it compiles

* added description to the graph panel

* fixed typo and improved description

* dfco fuel cut map unit test added and passes

* added default settings
2024-09-12 22:13:30 -07:00
Matthew Kennedy 093ae1a17c fix alphaNUseIat 2024-09-12 22:00:25 -07:00
Matthew Kennedy ec043ad81f getVVTPosition returns expected<> 2024-09-12 21:25:18 -07:00
Matthew Kennedy 51a23364e2
Odd cylinder engine wasted spark (#479)
* allow wasted spark spin-up

* allow firing without phase sync on odd cyl engines

* support odd cyl wasted spark

* changelog

* unit test it

* wow, it's easy to support odd-fire too
2024-08-31 02:22:31 -07:00
Matthew Kennedy 75a50695c6 extend engineModules.apply_all to onEnginePhase 2024-08-28 02:26:16 -07:00
Matthew Kennedy bd7f8f2bb6 remove trigger input debug pins 2024-08-28 02:06:02 -07:00
Matthew Kennedy 2d4a87523e fix tests 2024-08-07 12:16:19 -07:00
Matthew Kennedy 08c878dbb9 sorry ADC trigger, your performance was never proven and you're in the way now 2024-08-06 23:21:36 -07:00
Matthew Kennedy e4b8aa3747
oil pressure protection (while running) (#460)
* config

* implement

* defaults

* check array bins

* gauge

* test the new behavior
2024-08-06 13:10:10 -07:00
Matthew Kennedy 70025791c6 this assertion didn't actually confirm any observable behavior 2024-08-05 11:47:54 -07:00
Matthew Kennedy f3045af367 AE is engine module 2024-08-01 21:45:54 -07:00
Matthew Kennedy ff5e47c95d
Engine modules participate in the build system (#452)
* infrastructure for engine modules in the build

* fully move fuel pump

* fan

* gear detector

* gear detect

* fan control cleanup

* trip odometer

* shuffle makefiles around a little

* minor format
2024-07-23 18:05:43 -07:00
Matthew Kennedy 7713071a8f std::isnan 2024-07-23 15:47:30 -07:00
Nathan Schulte 50f7a653a7
Toyota ETCS-i [02/02]: RedundantSensor: partial second (avoid average, etc.) (#431) 2024-07-16 02:08:43 -07:00
Matthew Kennedy dd8dea61c0 rename Executor -> Scheduler 2024-07-11 17:03:13 -07:00
Matthew Kennedy 89a0b273c6 don't use scheduleByTimestamp 2024-07-11 16:32:55 -07:00
Matthew Kennedy bb1d5f26d2 for loop formatting 2024-07-03 00:22:48 -07:00
Matthew Kennedy d907e6123f fix sensor mock tests 2024-06-28 10:13:22 -07:00
Nathan Schulte cd38fa1f61
remove functionpointer sensor (#442)
* remove functionpointer sensor

* remove function_pointer_sensor.cpp from tests.mk
2024-06-14 12:17:09 -07:00
Matthew Kennedy 2eb6c25313
ts refactoring (#439)
* replace large buffer instances

* handlePageReadCommand uses locked

* cleanup

* explicitly call big vs. small packet implementation

* correctness

* unused UNUSED

* cleaner TS logging & cleanup

* about time we bumped this
2024-06-09 20:26:27 -07:00
Matthew Kennedy c3e63d5541 fix test 2024-06-03 18:00:22 -07:00
Nathan Schulte a195289a12
Toyota ETCS-i [01/02]: meld FordRedundantTps Sensor into RedundantSensor (#430)
* remove redundant_ford_tps

* meld redundant_ford_tps logic into RedundantSensor

* default tps/ppsSecondaryMaximum is 100

* initTps uses melded RedundantSensor

* meld RedundantSensor unit tests

* RedundantSensor::showInfo prints redundancy status

* RedundantSensor::showInfo prints partial redundancy status

* assert SensorResult code in RedundantSensor tests

* RedundantSensor doesn't hide primary sensor result code

in the case of a single sensor only, don't hide the UnexpectedCode value
2024-06-03 11:28:56 -07:00
Matthew Kennedy 493ddfdd92 happy tests? 2024-06-02 22:44:58 -07:00
Matthew Kennedy 044e575af6 Map3D considered harmful #421 2024-05-03 22:55:18 -07:00
Matthew Kennedy 80358ad54e setTimeNowUs(): replace global fiddling with a functino call 2024-04-27 01:59:38 -07:00
Matthew Kennedy 5f52f5fc9f no need for getTimeNowUs on ETH 2024-04-27 01:48:02 -07:00
Matthew Kennedy 1561a894ee minor cleanup 2024-04-26 12:49:37 -07:00
Matthew Kennedy 80d9fd41aa unit test global cleanup 2024-04-26 02:02:49 -07:00
Matthew Kennedy 47ee857699 haha these two functions do the same thing!? 2024-04-25 22:17:20 -07:00
Matthew Kennedy 79dfb0f2c4 wrap times in simple structs 2024-04-25 15:46:53 -07:00
Matthew Kennedy 46b3a748ba more tests that are less chaos now 2024-04-12 12:19:24 -07:00
Matthew Kennedy 3c28268a6c testFasterSpinup doesn't trigger error 2024-04-12 12:13:25 -07:00
Matthew Kennedy 9d8a23241b better log 2024-04-12 12:13:12 -07:00
Matthew Kennedy 61dd44a4ba test for noisy triggers and another fix 2024-04-12 11:29:38 -07:00
rusefillc f269d56474
Odd fire unit (#407) 2024-04-10 21:36:01 -05:00
rusefillc 89462092a1
default argument to improve test API (#405) 2024-04-09 22:42:16 -07:00
Matthew Kennedy 25e2a40b53 avoid UB in tests 2024-03-22 12:07:58 -07:00
Matthew Kennedy 3a4bce217c Make toyota 3 tooth decoder more robust #382 2024-03-19 15:08:06 -07:00
Matthew Kennedy 8680b22816 move a bunch of tables out of engine_configuration_s #371 2024-03-17 12:06:14 -07:00
Matthew Kennedy e2fa08478e test etb rounding 2024-03-14 15:49:38 -07:00
Matthew Kennedy 5e1359c919 correct big buffer move assignment/constructor behavior 2024-02-29 00:09:57 +00:00
Stefan de Kraker 4c65992017
Add cranking taper duration multiplier based on CLT (#370)
* Add Cranking taper duration multiplier based on CLT

* Fixed same merge error in TS config

* Fixed existing unit test for getCrankingTaperFraction, and added a new one to test multiplier table for cranking taper duration.

* Fixed existing header file for unit test getCrankingTaperFraction

* Changed naming

* changed logic

* Forgot to update name here too

* Forgot to update name here too, second time
2024-02-25 17:36:30 -08:00
Matthew Kennedy f8070a922a
implement & test backend for injection splitting (#367)
* framing dual injection

* fix test

* uncomment logic

* format

* start test

* good test

* add todo
2024-02-21 10:54:27 -08:00
Matthew Kennedy 6b432ffef5 Actually separate injector model for second stage 2024-01-16 23:11:01 -08:00
Matthew Kennedy 9673ff01f3
implement staged injection (#331)
* output channel

* duty cycle etc math for second stage

* action_s utility

* basic enable switch

* staging fraction math

* implement staging logic

* wire up pins for second stage injectors

* staging UI

* Improve staged injection test, check scheduler arguments for other injection tests

* Stage 2 last pulse output channel, correct fuel consumption logic

* wall wet on the whole shot

* int vs size_t

* use a define instead of function so we get line numbers

* fix batch injection

* gauges

* bad test merge

* stub out secondary injector model
2024-01-07 15:22:39 -08:00
Matthew Kennedy 26f57fd226 no trailing semicolon 2024-01-07 12:32:18 -08:00
Matthew Kennedy a45b9ab611 minor housekeeping 2024-01-06 23:10:56 -08:00
Matthew Kennedy d38a9ef0c0 missed a spot 2024-01-06 22:37:41 -08:00
Matthew Kennedy 0ef0882597 this test worked on everything but apple silicon apparently 2023-11-01 21:46:08 -07:00
Matthew Kennedy 4ed8906748 fix tests for no shadowing 2023-11-01 17:31:08 -07:00
Matthew Kennedy 0fd5e33b89 happy hpfp test 2023-11-01 15:35:41 -07:00
Matthew Kennedy 21998dae2d tests 2023-11-01 15:14:53 -07:00
Matthew Kennedy 36643bb7f4 dead pid auto tune 2023-11-01 13:54:48 -07:00
Matthew Kennedy 56abb0c3b6 happy CAN filter test 2023-10-31 01:07:46 -07:00
Matthew Kennedy dd0e34346c unit test for wrapAngle 2023-10-24 01:03:02 -07:00
Matthew Kennedy 38c873252e
smarter injector duty cycle limiting (#215)
* config for duty cycle limiting

* implement timeout duty cycle limiting

* comment

* make overlapping injections actually work!

* missed one

* test

* call addFuelEvents from fast callback

* update comment about why we call it again in main trigger callback

* one more extra call

* undo addFuelEvents change

* cleanup

* minor encapsulation

* fix

* changelog

* dead obd code
2023-10-14 14:27:19 -07:00
Matthew Kennedy e09ed790eb extract injection refactoring from #215 2023-10-12 18:00:33 -07:00
Matthew Kennedy b0fd6596ea limp test doesn't rely on defaults 2023-10-11 16:15:22 -07:00
Matthew Kennedy 3c001f759f
Miata presets (#236)
* rename existing

* rename existing

* 1.6 progress

* nb2 progress

* format

* stub nb1

* nb1 progress

* msm

* msm

* brake switch, MSM IAT

* gppwm, clutch pin

* cleanup

* allow setting lua heap size

* Revert "allow setting lua heap size"

This reverts commit 82533b5c7b.

* guard 1.6

* everyone wins a more sensible tps/tps AE table

* guard for tests

* nb2 vvt angle tweak

* tweak tests for changed defaults
2023-09-25 11:12:34 -07:00
Matthew Kennedy 6418cba04e test 2023-09-14 13:59:04 -07:00
Matthew Kennedy a6a25ba020 toyota 3 tooth cam decoder #237 2023-09-13 22:30:14 -07:00
Matthew Kennedy 94c29d4cfb
simplify cam input single tooth modes (#178) 2023-08-03 00:52:19 -07:00
Matthew Kennedy 30f85245ec test lambda monitor response #75 2023-07-26 00:35:28 -07:00
Matthew Kennedy 6f4a4fc373
implement ignition timing clamping (#212)
* implement ignition timing clamping

* ui, improved comment

* wrap atdc timing correctly

* tests
2023-07-21 15:55:04 -07:00
Matthew Kennedy fb8cb4987e
fan control is engine module (#203)
* fan is engine module

* mockable AC

* mockable AC

* mock AC controller in fan test

* constexpr fan livedata

* isPtr
2023-07-21 01:28:25 -07:00
Matthew Kennedy e2550105b8
vvt is engine module (#202)
* vvt refactoring

* vvt constexpr livedata

* format

* fix null deref
2023-07-19 22:16:29 -07:00
Matthew Kennedy 9b6d964919 lambda monitor test file 2023-07-17 19:51:07 -07:00
Matthew Kennedy 7ae11160d9 simplify adjustCrankPhase 2023-06-28 18:12:38 -07:00
Matthew Kennedy 04a1eb6950
real test of 12+1 (#177) 2023-06-28 16:48:42 -07:00
Matthew Kennedy 06e818f89a explicit tests for batch and single point 2023-06-26 01:11:43 -07:00
Matthew Kennedy 01b4f1191a fix (honestly gross) tests to work in two wire batch 2023-06-24 20:55:17 -07:00
Matthew Kennedy b0c3357cba #23 and fix https://github.com/rusefi/rusefi/issues/5353 2023-06-24 20:14:37 -07:00
Matthew Kennedy 8cb484f3e0 happy test #111 #117 2023-06-23 02:21:53 -07:00
Matthew Kennedy daadce32a6 disable test 2023-06-22 01:19:56 -07:00
Matthew Kennedy ec8b054093 implement temp sensor pulldown mode #116 2023-06-10 13:36:03 -07:00