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
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
1b3b86c2cd
extract calculateSparkAngle
2025-02-14 12:58:44 -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
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
13bec56987
turnSparkPinHigh: prioritize flipping the output
2025-02-12 22:43:07 -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
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
f81dff184e
enableOverdwellProtection
2025-01-02 22:04:56 -08:00
Matthew Kennedy
32f319d7cd
tests build
2024-12-24 02:59:54 -08:00
Matthew Kennedy
8952633854
int rpm -> float rpm
2024-09-25 00:16: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
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
63b07e5d1f
cisnan -> std::isnan
2024-07-22 12:05:17 -07:00
Matthew Kennedy
dd8dea61c0
rename Executor -> Scheduler
2024-07-11 17:03:13 -07:00
Matthew Kennedy
bb1d5f26d2
for loop formatting
2024-07-03 00:22:48 -07:00
Matthew Kennedy
6758e2dfc0
compile-time enforcement of printf strings
2024-06-10 00:53:24 -07:00
Matthew Kennedy
9ab794a461
avoid long -> float conversion
2024-05-11 13:07:47 -07:00
Matthew Kennedy
32d2a81529
more default init vs = 0
2024-04-27 01:32:45 -07:00
Matthew Kennedy
0c30e1e148
use timer instead of home spun time math
2024-04-25 15:11:13 -07:00
Matthew Kennedy
9ebdc88bb4
use timer instead of home spun time math
2024-04-25 15:06:11 -07:00
Matthew Kennedy
af4ec4ab19
add std::function hooks to ignition
2024-04-12 11:11:44 -07:00
Matthew Kennedy
21998dae2d
tests
2023-11-01 15:14:53 -07:00
Matthew Kennedy
44bd9af964
misc anti shadow
2023-11-01 14:59:36 -07:00
Matthew Kennedy
f835025a2f
remove wrapAngle2, wrapAngle does fine
2023-10-19 14:46:55 -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
1885f3eca3
make spark and fuel more similar
2023-06-25 01:46:33 -07:00
Matthew Kennedy
e5ee320b67
make spark and fuel more similar
2023-06-25 01:31:30 -07:00
Matthew Kennedy
04e6f45ce9
log per-cylinder timing #76
2023-05-31 11:38:06 -07:00
Matthew Kennedy
41339c5418
change to log base timing
2023-05-31 11:22:41 -07:00
Matthew Kennedy
ad3ea57276
tooth_logger.h -> pch
2023-05-30 22:41:20 -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
778289455b
this warning is not useful fix #79
2023-04-12 19:42:44 -07:00
Matthew Kennedy
489d016682
function >>> macro
2023-04-12 19:32:52 -07:00
Matthew Kennedy
f090a97b0b
remove specs_s struct, flatten config
2023-03-27 00:58:18 -07:00
Matthew Kennedy
e5d28022ad
spammy prints cleanup
2023-03-16 01:27:03 -07:00
Matthew Kennedy
cd6b770945
is this just dead?
2023-03-03 02:05:50 -08:00
Matthew Kennedy
3fa2f44014
remove twoWireBatchIgnition
2023-03-02 22:23:24 -08:00