Commit Graph

568 Commits

Author SHA1 Message Date
Matthew Kennedy 094fc6b8d3 Delete knock window start, always start at spark firing 2025-04-07 13:05:21 -07:00
Matthew Kennedy 2cb2ed2a86
calculate spark timing last minute rather than storing it (#555)
* calculate spark timing last minute rather than storing it

* handle underdwell

* f2lz avoidance

* test friendlyness

* move test hook after the underdwell bailout
2025-03-11 19:35:18 -07:00
Matthew Kennedy 442c75cc4c
Remove sensor chart (#568)
* delete sensor chart from firmware

* delete sensor sniffer UI
2025-03-07 03:28:29 -08:00
Matthew Kennedy 02ac461589 don't underdwell on overdwell events 2025-03-01 17:15:22 -08:00
Matthew Kennedy d82f3260d1 implement underdwell protection 2025-03-01 16:50:23 -08:00
Matthew Kennedy 9dcf76d99c
Remove stack checks (#558)
* remove stack checks

* put one back
2025-02-18 17:33:24 -08:00
Matthew Kennedy 1b3b86c2cd extract calculateSparkAngle 2025-02-14 12:58:44 -08:00
Matthew Kennedy 6f228a1222
Adjust fuel qty for mode at the last minute (#554) 2025-02-14 10:05:45 -08:00
Matthew Kennedy f6e4239bcb reset ignition schedule too on trigger loss 2025-02-13 23:19:34 -08:00
Matthew Kennedy c932c55693 overdwell test with IgnitionContext instead of event 2025-02-13 23:18:30 -08:00
Matthew Kennedy fedf0db652 don't do fancy features when spark fired by overdwell protect 2025-02-13 23:16:40 -08:00
Matthew Kennedy 5eaa331b21 format 2025-02-13 22:03:19 -08:00
Matthew Kennedy 2ebd882722
Ignition outputs use a mask like fuel (#553)
* remove skipped spark check

* this test no longer does anything

* ignition mask outputs

* tests

* extract function to calculate mask

* don't even store the mask
2025-02-13 20:31:09 -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 13bec56987 turnSparkPinHigh: prioritize flipping the output 2025-02-12 22:43:07 -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 616cf20a11 dead 2025-02-09 01:23:47 -08:00
GitHub gen-configs Action f6f5723930 Auto-generated configs and docs 2025-02-04 07:43:37 +00:00
Matthew Kennedy cc93f9752b indicators for knock fix #547 2025-02-03 23:42:21 -08:00
Matthew Kennedy 493aebb7d4 knock sampling shortcut in case of 0 2025-02-02 00:41:44 -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 2d96259667 move output channel fuel/spark cut update to limp 2025-01-18 16:03:07 -08:00
Matthew Kennedy 810c392bb2 OneCylinder::getSparkAngle 2025-01-18 02:51:15 -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 d033f26910 cylinder calculates its own angle offset 2025-01-18 02:22:02 -08:00
Matthew Kennedy e516fdeb82 fix odd fire offset lookup 2025-01-18 02:19:34 -08:00
Matthew Kennedy 7ff6ece889 use real cylinder number instead of mislabeled coil number 2025-01-18 02:08:07 -08:00
Matthew Kennedy 1ff00b7524 getCylinderId -> getCylinderNumberAtIndex 2025-01-18 01:23:10 -08:00
Matthew Kennedy 0e2709cd91 start refactoring towards OneCylinder 2025-01-18 01:03:44 -08:00
Matthew Kennedy 410b307b21 unnecessary guard 2025-01-07 21:12:16 -08:00
Matthew Kennedy f81dff184e enableOverdwellProtection 2025-01-02 22:04:56 -08:00
Matthew Kennedy c616f44c8b if (auto x = foo()) 2024-12-26 00:19:11 -08:00
Matthew Kennedy 32f319d7cd tests build 2024-12-24 02:59:54 -08:00
Matthew Kennedy 28e9f8a015 enum class-ify TriggerEvent 2024-12-12 15:37:14 -08:00
Matthew Kennedy 3e7931aaf7 per-cam trigger counters 2024-11-23 23:04:47 -08:00
Matthew Kennedy 71c860b648 int rpm -> float rpm 2024-09-25 00:20:18 -07:00
Matthew Kennedy 8952633854 int rpm -> float rpm 2024-09-25 00:16:53 -07:00
Matthew Kennedy 83cd4366d3 RegisteredNamedOutputPin fix #285 2024-09-18 22:38:53 -07:00
Matthew Kennedy b5271f0991 misc logging cleanup 2024-09-18 22:17:07 -07:00
Matthew Kennedy 8c87c19b5c SPARK_EXTREME_LOGGING cleanup 2024-09-18 22:11:13 -07:00
Matthew Kennedy ec043ad81f getVVTPosition returns expected<> 2024-09-12 21:25:18 -07:00
Matthew Kennedy 40dfd1e205 give dwell metric its own channel 2024-09-01 16:48:40 -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 397e3dcd04 hoist dwellMs/angle/sparkangle 2024-08-31 00:44:21 -07:00
Matthew Kennedy 3fc42222cc hoist dwell check out of loop 2024-08-31 00:37:27 -07:00
Matthew Kennedy 761efd862c
MAP avg uses engine module callbacks (#475)
* use engine module callbacks

* happy tests

* happy small-can-board

* interact with map avg via module

* simplify map avg init

* tweaks

* omit module to disable it instead!

* unnecessary guard

* minor cleanups

* unnecessary branch - lookups for these tables are fine at 0 rpm

* oop
2024-08-29 22:38:30 -07:00
Matthew Kennedy 12321d4325 map averaging includes 2024-08-29 13:29:53 -07:00