Added Injection time and a phase macro

This commit is contained in:
2026-06-03 13:52:01 +02:00
parent 31bdeeaf50
commit 1771904eac
2 changed files with 4 additions and 0 deletions

View File

@@ -72,6 +72,9 @@ void crankHandler(void *argument) {
uint32_t d_spark = d1a * (45 - SPARK_ADVANCE) / 180;
uint32_t t_spark = CRANK(0) + d_spark;
// TODO: schedule spark
} else if (state_g.crank_state == CYCLE_EXHAUST) {
uint32_t t_injection = CRANK(0) + (45+INJECTION_PHASE) * (CRANK(4) - CRANK(0)) / 720;
//TODO Schedule injection
}
}
}