At this point timing is controlled by a single 16x16 table by RPM and engine load, with 3D interpolation. There is also a IAT-based timing correction table.
Durining running dwell is controlled by a curve by RPM. At the moment there is no voltage correction for dwell time based on VBATT.
Please note: usually a positive timing number is the value BEFORE TDC. Currently in rusEfi the value is upside down - negative values mean before TDC and positive value mean after TDC. TODO: https://sourceforge.net/p/rusefi/tickets/101/
Timing control during cranking
Cranking mode is defined as any RPM value below 'cranking RPM' setting. During cranking, special fuel and timing logic is applied.
By default, cranking timing is defined by a special 'crankingTimingAngle' configuration parameter and cranking dwell is defined by 'crankingChargeAngle' configuration parameter.
During cranking dwell time is set in either ms or in engine revolution degrees.
For example, let's say that we want to charge the coil for 50 degrees of engine cycle and fire cranking spark at 5 degrees before TDC while defining cranking RPM as any RPM below 400:
set cranking_rpm 400
set cranking_charge_angle 50
set cranking_timing_angle 715
715 because that's 5 degrees before 720 which is the duration of engine cycle on a four stroke engine.