NA6 & trigger

This commit is contained in:
rusEfi 2019-08-06 22:17:18 -04:00
parent a3dfd5f8c6
commit 9ddc9233ee
4 changed files with 25 additions and 5 deletions

View File

@ -292,6 +292,19 @@ void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
* set engine_type 12
*/
void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// CLT: "18 - AN temp 1"
// IAT: "23 - AN temp 2"
// MAF/VAF: "19 - AN volt 4"
engineConfiguration->mafAdcChannel = EFI_ADC_12;
//boardConfiguration->triggerInputPins[0] = GPIOC_6;
boardConfiguration->triggerInputPins[1] = GPIOA_5;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
// MIL check engine:
// IAC: GPIOE_9: "7 - Lowside 1"
boardConfiguration->isHip9011Enabled = false;
boardConfiguration->isSdCardEnabled = false;

View File

@ -812,6 +812,6 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190805;
return 20190806;
}
#endif /* EFI_UNIT_TEST */

View File

@ -502,6 +502,7 @@ extern int perSecondIrqCounter;
#if EFI_PROD_CODE
extern uint32_t maxPrecisionCallbackDuration;
extern bool hwTriggerInputEnabled;
#endif /* EFI_PROD_CODE */
extern uint32_t maxSchedulingPrecisionLoss;
@ -537,9 +538,13 @@ void triggerInfo(void) {
TriggerShape *ts = &engine->triggerCentral.triggerShape;
#if HAL_USE_ICU == TRUE
scheduleMsg(logger, "trigger ICU hw: %d %d", icuWidthCallbackCounter, icuWidthPeriodCounter);
scheduleMsg(logger, "trigger ICU hw: %d %d %d", icuWidthCallbackCounter, icuWidthPeriodCounter, hwTriggerInputEnabled);
#endif /* HAL_USE_ICU */
#if HAL_TRIGGER_USE_PAL == TRUE
scheduleMsg(logger, "trigger PAL mode %d", hwTriggerInputEnabled);
#endif /* HAL_TRIGGER_USE_PAL */
scheduleMsg(logger, "Template %s (%d) trigger %s (%d) useRiseEdge=%s onlyFront=%s useOnlyFirstChannel=%s tdcOffset=%.2f",
getConfigurationName(engineConfiguration->engineType), engineConfiguration->engineType,
getTrigger_type_e(engineConfiguration->trigger.type), engineConfiguration->trigger.type,

View File

@ -196,13 +196,15 @@ static ICUConfig cam_icucfg = { ICU_INPUT_ACTIVE_LOW,
static int turnOnTriggerInputPin(const char *msg, brain_pin_e brainPin, bool is_shaft) {
ICUConfig *icucfg;
if (brainPin == GPIO_UNASSIGNED)
if (brainPin == GPIO_UNASSIGNED) {
return -1;
}
if (is_shaft)
if (is_shaft) {
icucfg = &shaft_icucfg;
else
} else {
icucfg = &cam_icucfg;
}
// configure pin
turnOnCapturePin(msg, brainPin);