Commit Graph
9 Commits
Author SHA1 Message Date
h3cx 7502b354dc Implemented "full" ignition timing system
This is a first implementation of a "full" timing system, with proper
handling for cases wher the ignition charge time overlaps with the
compression pulse, the spark has a more complex state machine system
with the option to defer charge from the intake pulse to the compression
pulse, and further defferal of the spark release schedule to the ISR
that triggers when the output compare triggers for the charge

Preliminary error counters have been put in place, they still require
handling error conditions that would force a soft shutdown on the
ignition IC. Alongside this the code still needs to be verified so that
all non critical errors (ie missed charge schedules) reset the state
machine and increment a global spark miss counter to avoid having these
errors breaking the state machine as they can easily be recovered from

Cases where the coil would already be charging and an error occurs
require as stated above a full recovery procedure with soft shutdown of
the ignition IC and a clean cycle of the state machine to ensure a full
recovery
2026-09-26 22:11:51 +02:00
h3cx 6f0009cfbb Fixed critical ring buffer underflow bug 2026-06-03 19:11:50 +02:00
h3cx f8b73ea1bc Broken spark implementation 2026-06-03 17:45:48 +02:00
Pierre Barbier e75f21ccf6 things 2026-06-03 11:44:27 +02:00
Pierre Barbier 0909c180e8 added cam double trigger and pragma once in GS 2026-06-03 11:35:21 +02:00
h3cx e346c67e00 Ring buffer fixes and spark time compute 2026-06-03 11:18:44 +02:00
h3cx 42e64b673c Initial sync implementation
Implemented system sync with crank and cam state and simple error
handling
2026-06-03 10:56:28 +02:00
Pierre Barbier ce2b76e6c0 added a crank_state to general_state 2026-06-02 18:06:32 +02:00
Pierre Barbier bca9d8816c consistant naming for global_state and implemented 2026-06-02 17:54:15 +02:00