Merge branch 'dev' of git.h3cx.dev:Exergie/NeoECU-Firmware into dev
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include "global_state.h"
|
#include "global_state.h"
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include "SEGGER_RTT.h"
|
#include "SEGGER_RTT.h"
|
||||||
|
#define INJECTION_PHASE 0
|
||||||
#define DEBUG_LOG(fmt, ...) SEGGER_RTT_printf(0, fmt "\n", ##__VA_ARGS__)
|
#define DEBUG_LOG(fmt, ...) SEGGER_RTT_printf(0, fmt "\n", ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define DEBUG_LOG(fmt, ...) \
|
#define DEBUG_LOG(fmt, ...) \
|
||||||
|
|||||||
@@ -81,6 +81,9 @@ void crankHandler(void *argument) {
|
|||||||
// TODO: schedule spark
|
// TODO: schedule spark
|
||||||
// __HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_3, t_spark);
|
// __HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_3, t_spark);
|
||||||
// TIM2_CH3_SetOCMode(t_spark);
|
// TIM2_CH3_SetOCMode(t_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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user