parent
75d111c21c
commit
f52e66c394
|
@ -526,11 +526,20 @@ void resetMaxValues() {
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_ICU == TRUE
|
||||||
|
extern int icuWidthCallbackCounter;
|
||||||
|
extern int icuWidthPeriodCounter;
|
||||||
|
#endif /* HAL_USE_ICU */
|
||||||
|
|
||||||
void triggerInfo(void) {
|
void triggerInfo(void) {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
|
|
||||||
TriggerShape *ts = &engine->triggerCentral.triggerShape;
|
TriggerShape *ts = &engine->triggerCentral.triggerShape;
|
||||||
|
|
||||||
|
#if HAL_USE_ICU == TRUE
|
||||||
|
scheduleMsg(logger, "trigger ICU hw: %d %d", icuWidthCallbackCounter, icuWidthPeriodCounter);
|
||||||
|
#endif /* HAL_USE_ICU */
|
||||||
|
|
||||||
scheduleMsg(logger, "Template %s (%d) trigger %s (%d) useRiseEdge=%s onlyFront=%s useOnlyFirstChannel=%s tdcOffset=%.2f",
|
scheduleMsg(logger, "Template %s (%d) trigger %s (%d) useRiseEdge=%s onlyFront=%s useOnlyFirstChannel=%s tdcOffset=%.2f",
|
||||||
getConfigurationName(engineConfiguration->engineType), engineConfiguration->engineType,
|
getConfigurationName(engineConfiguration->engineType), engineConfiguration->engineType,
|
||||||
getTrigger_type_e(engineConfiguration->trigger.type), engineConfiguration->trigger.type,
|
getTrigger_type_e(engineConfiguration->trigger.type), engineConfiguration->trigger.type,
|
||||||
|
@ -707,7 +716,7 @@ void initTriggerCentral(Logging *sharedLogger) {
|
||||||
#endif /* EFI_ENGINE_SNIFFER */
|
#endif /* EFI_ENGINE_SNIFFER */
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
addConsoleAction("triggerinfo", triggerInfo);
|
addConsoleAction(CMD_TRIGGERINFO, triggerInfo);
|
||||||
addConsoleAction("trigger_shape_info", triggerShapeInfo);
|
addConsoleAction("trigger_shape_info", triggerShapeInfo);
|
||||||
addConsoleAction("reset_trigger", resetRunningTriggerCounters);
|
addConsoleAction("reset_trigger", resetRunningTriggerCounters);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#define HAL_TRIGGER_USE_PAL FALSE
|
#define HAL_TRIGGER_USE_PAL FALSE
|
||||||
#endif /* HAL_TRIGGER_USE_PAL */
|
#endif /* HAL_TRIGGER_USE_PAL */
|
||||||
|
|
||||||
|
volatile int icuWidthCallbackCounter = 0;
|
||||||
|
volatile int icuWidthPeriodCounter = 0;
|
||||||
|
|
||||||
#if EFI_SHAFT_POSITION_INPUT && (HAL_TRIGGER_USE_PAL == TRUE || HAL_USE_ICU == TRUE) && (HAL_USE_COMP == FALSE)
|
#if EFI_SHAFT_POSITION_INPUT && (HAL_TRIGGER_USE_PAL == TRUE || HAL_USE_ICU == TRUE) && (HAL_USE_COMP == FALSE)
|
||||||
|
|
||||||
|
@ -130,6 +132,7 @@ static void cam_icu_period_callback(ICUDriver *icup) {
|
||||||
* 'width' events happens before the 'period' event
|
* 'width' events happens before the 'period' event
|
||||||
*/
|
*/
|
||||||
static void shaft_icu_width_callback(ICUDriver *icup) {
|
static void shaft_icu_width_callback(ICUDriver *icup) {
|
||||||
|
icuWidthCallbackCounter++;
|
||||||
// todo: support for 3rd trigger input channel
|
// todo: support for 3rd trigger input channel
|
||||||
// todo: start using real event time from HW event, not just software timer?
|
// todo: start using real event time from HW event, not just software timer?
|
||||||
if (hasFirmwareErrorFlag)
|
if (hasFirmwareErrorFlag)
|
||||||
|
@ -146,6 +149,7 @@ static void shaft_icu_width_callback(ICUDriver *icup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shaft_icu_period_callback(ICUDriver *icup) {
|
static void shaft_icu_period_callback(ICUDriver *icup) {
|
||||||
|
icuWidthPeriodCounter++;
|
||||||
if (hasFirmwareErrorFlag)
|
if (hasFirmwareErrorFlag)
|
||||||
return;
|
return;
|
||||||
int isPrimary = icup == primaryCrankDriver;
|
int isPrimary = icup == primaryCrankDriver;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.rusefi;
|
package com.rusefi;
|
||||||
|
|
||||||
|
|
||||||
|
import com.rusefi.config.generated.Fields;
|
||||||
import com.rusefi.core.MessagesCentral;
|
import com.rusefi.core.MessagesCentral;
|
||||||
import com.rusefi.core.Sensor;
|
import com.rusefi.core.Sensor;
|
||||||
import com.rusefi.core.SensorCentral;
|
import com.rusefi.core.SensorCentral;
|
||||||
|
@ -135,6 +136,7 @@ public class AutoTest {
|
||||||
setEngineType(28);
|
setEngineType(28);
|
||||||
String msg = "mazda 626 default cranking";
|
String msg = "mazda 626 default cranking";
|
||||||
IoUtil.changeRpm(200);
|
IoUtil.changeRpm(200);
|
||||||
|
sendCommand(Fields.CMD_TRIGGERINFO);
|
||||||
EngineChart chart;
|
EngineChart chart;
|
||||||
chart = nextChart();
|
chart = nextChart();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue