Commit Graph

64 Commits

Author SHA1 Message Date
Matthew Kennedy 6f228a1222
Adjust fuel qty for mode at the last minute (#554) 2025-02-14 10:05:45 -08:00
Matthew Kennedy ef9032bca4
Control injectors with a mask rather than pointers (#551)
* mostly implement

* tests

* tests

* tests

* properly handle single point injection

* fix tests

* fix tests

* scheduler

* format

* fix tests

* extract calculateInjectorOutputMask

* uncomment

* split injection just barely fits!

* provide a constructor so maybe mac is happy?

* don't bother storing the mask at all

* simplify

* make the pad bits predictable
2025-02-13 17:54:42 -08:00
Matthew Kennedy 5110c5bb85 pass mode in to computeInjectionAngle 2025-02-12 10:30:42 -08:00
Matthew Kennedy 48d4191932 stash injectionmode in the event 2025-02-11 22:56:05 -08:00
Matthew Kennedy b08aeed287 don't do the same math twice in a row 2025-01-19 19:17:17 -08:00
Matthew Kennedy 67d41ea65e put injection mass inside OneCylinder 2025-01-18 02:42:51 -08:00
Matthew Kennedy 0d2ceefde3 move injection SOI function to OneCylinder 2025-01-18 02:35:06 -08:00
Matthew Kennedy dc8b8c3b3f fix sorta the same bug for injection too 2025-01-18 02:31:06 -08:00
Matthew Kennedy 1ff00b7524 getCylinderId -> getCylinderNumberAtIndex 2025-01-18 01:23:10 -08:00
Matthew Kennedy c616f44c8b if (auto x = foo()) 2024-12-26 00:19:11 -08: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 aa5ea293e6 cisnan -> std::isnan 2024-07-22 12:15:40 -07:00
Matthew Kennedy dd8dea61c0 rename Executor -> Scheduler 2024-07-11 17:03:13 -07:00
Matthew Kennedy 32d2a81529 more default init vs = 0 2024-04-27 01:32:45 -07:00
Matthew Kennedy dce084fdcb duration vs timestamp 2024-04-25 15:18:41 -07: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 9035b574ca fix tests 2024-02-16 14:10:57 -08:00
Matthew Kennedy be00d34d0c put fuel scheduling actually in fuel_schedule.cpp 2024-02-16 13:49:42 -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 a45b9ab611 minor housekeeping 2024-01-06 23:10:56 -08:00
Matthew Kennedy 7e2097056c unused parameters 2024-01-06 18:31:18 -08:00
Matthew Kennedy f835025a2f remove wrapAngle2, wrapAngle does fine 2023-10-19 14:46:55 -07:00
Matthew Kennedy 3999272d24 fix injection SOI log channel 2023-10-19 14:10:44 -07:00
Matthew Kennedy e09ed790eb extract injection refactoring from #215 2023-10-12 18:00:33 -07:00
Matthew Kennedy 5e01450fee lock injection timing at high duty cycle to avoid skipped injections 2023-10-11 23:43:31 -07:00
Matthew Kennedy d9c9f6beeb good behavior in single point 2023-06-26 01:12:08 -07:00
Matthew Kennedy 1885f3eca3 make spark and fuel more similar 2023-06-25 01:46:33 -07:00
Matthew Kennedy ade14a956f make spark and fuel more similar 2023-06-25 01:37:45 -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 9621ff844e add ignition/injection mode output channel #85 2023-04-28 00:27:43 -07:00
Matthew Kennedy d5f9479f28
ObdCode is enum class (#77)
* change ObdCode to enum class builds firmware

* test builds

* don't need this line at all

* can we go down to uint16_t?
2023-04-12 23:44:33 -07:00
Matthew Kennedy 0c644e2b2e format 2023-04-11 17:17:50 -07:00
Matthew Kennedy f090a97b0b remove specs_s struct, flatten config 2023-03-27 00:58:18 -07:00
Matthew Kennedy c551aef780 no reason to warn about injection pins, I think you already know 2023-02-24 23:57:15 -08:00
Andrey 867cc73950 moving IO-only away from scheduling logic 2022-09-14 00:55:55 -04:00
Andrey d4024f7f2d tear down Engine god object #4511
just trying different things
2022-09-05 04:10:14 -04:00
Andrey b6eddaee59 tear down Engine god object #4511
just trying different things
2022-09-05 03:38:44 -04:00
Andrey da7a4b6641 tear down Engine god object #4511
just trying different things
2022-09-05 02:59:38 -04:00
Andrey 76b74a85ba tear down Engine god object #4511
just trying different things
2022-09-05 02:44:06 -04:00
Andrey 1983a07078 tear down Engine god object #4511
just trying different things
2022-09-05 02:28:46 -04:00
Andrey 6fbafd7818 Injection Offset for skipped wheel triggers fix #4536 2022-09-05 01:31:03 -04:00
Andrey 82fa9b191a refactoring: let's use different names for different things 2022-09-05 01:16:24 -04:00
Andrey 841cd4f962 refactoring: moving field 2022-09-05 00:53:05 -04:00
Andrey 9a9b33401c refactoring: splitting header where cpp was already split 2022-09-05 00:48:38 -04:00
Matthew Kennedy 716b0c1f60 extract updateInjectionAngle (#4512) 2022-09-01 18:48:03 -04:00
Andrey 3eaaf5e293 english do you speak it 2022-08-31 22:56:38 -04:00
Matthew Kennedy 88ff234c91 Injector scheduled by angle, not tooth index (#4208)
* trigger decoder returns a result

* TriggerFormDetails

* s

* don't reach out and touch the engine

* injection doesn't care about teeth

* fix up existing tests

* oh look, we can actually test this logic now without trying to depend on trigger shape!!!

* fix a real bug

* simplify
2022-06-24 17:43:23 -04:00
Matthew Kennedy 735b4899e2 allow setting injection phase by start or center of injection (#4068)
* allow SOI/COI

* other change

* renames and simplify

* clean up ownIndex

* double check in spark logic
2022-04-15 10:22:36 -04:00
Matthew Kennedy 258f00efa3 fix sequential mode cranking (#2919)
* fix

* use the right enum

* do it for fuel too

* earlier

* s
2022-02-01 19:04:20 -05:00
Matthew Kennedy b2af3637a2 simplify cylinder phasing (#3650) 2021-12-05 10:46:35 -05:00