auto-sync

This commit is contained in:
rusEfi 2015-04-07 09:05:53 -05:00
parent f04e2fa046
commit eabb1d6085
8 changed files with 15 additions and 8 deletions

View File

@ -117,6 +117,8 @@ case TT_TOOTHED_WHEEL_60_2:
return "TT_TOOTHED_WHEEL_60_2"; return "TT_TOOTHED_WHEEL_60_2";
case TT_ONE_PLUS_TOOTHED_WHEEL_60_2: case TT_ONE_PLUS_TOOTHED_WHEEL_60_2:
return "TT_ONE_PLUS_TOOTHED_WHEEL_60_2"; return "TT_ONE_PLUS_TOOTHED_WHEEL_60_2";
case TT_ONE:
return "TT_ONE";
} }
return NULL; return NULL;
} }

View File

@ -128,6 +128,7 @@ typedef enum {
TT_ONE_PLUS_ONE = 16, TT_ONE_PLUS_ONE = 16,
TT_ONE_PLUS_TOOTHED_WHEEL_60_2 = 17, TT_ONE_PLUS_TOOTHED_WHEEL_60_2 = 17,
TT_ONE = 18,
Force_4b_trigger_type = ENUM_32_BITS, Force_4b_trigger_type = ENUM_32_BITS,
} trigger_type_e; } trigger_type_e;

View File

@ -495,7 +495,7 @@ static void setTriggerType(int value) {
static void setToothedWheel(int total, int skipped) { static void setToothedWheel(int total, int skipped) {
scheduleMsg(&logger, "toothed: total=%d/skipped=%d", total, skipped); scheduleMsg(&logger, "toothed: total=%d/skipped=%d", total, skipped);
setToothedWheelConfiguration(&engine->triggerShape, total, skipped, engineConfiguration); setToothedWheelConfiguration(&engine->triggerShape, total, skipped, engineConfiguration->operationMode);
// initializeTriggerShape(&logger, engineConfiguration, engineConfiguration2); // initializeTriggerShape(&logger, engineConfiguration, engineConfiguration2);
incrementGlobalConfigurationVersion(); incrementGlobalConfigurationVersion();
doPrintConfiguration(engine); doPrintConfiguration(engine);

View File

@ -354,6 +354,10 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
configureOnePlus60_2(triggerShape, engineConfiguration->operationMode); configureOnePlus60_2(triggerShape, engineConfiguration->operationMode);
break; break;
case TT_ONE:
setToothedWheelConfiguration(triggerShape, 1, 0, engineConfiguration->operationMode);
break;
case TT_MAZDA_SOHC_4: case TT_MAZDA_SOHC_4:
configureMazdaProtegeSOHC(triggerShape); configureMazdaProtegeSOHC(triggerShape);
break; break;
@ -363,11 +367,11 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
break; break;
case TT_TOOTHED_WHEEL_60_2: case TT_TOOTHED_WHEEL_60_2:
setToothedWheelConfiguration(triggerShape, 60, 2, engineConfiguration); setToothedWheelConfiguration(triggerShape, 60, 2, engineConfiguration->operationMode);
break; break;
case TT_TOOTHED_WHEEL_36_1: case TT_TOOTHED_WHEEL_36_1:
setToothedWheelConfiguration(triggerShape, 36, 1, engineConfiguration); setToothedWheelConfiguration(triggerShape, 36, 1, engineConfiguration->operationMode);
break; break;
case TT_HONDA_ACCORD_CD_TWO_WIRES: case TT_HONDA_ACCORD_CD_TWO_WIRES:

View File

@ -296,13 +296,13 @@ void multi_wave_s::checkSwitchTimes(int size) {
} }
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped,
engine_configuration_s const *engineConfiguration) { operation_mode_e operationMode) {
#if EFI_ENGINE_CONTROL #if EFI_ENGINE_CONTROL
s->useRiseEdge = true; s->useRiseEdge = true;
initializeSkippedToothTriggerShapeExt(s, total, skipped, initializeSkippedToothTriggerShapeExt(s, total, skipped,
engineConfiguration->operationMode); operationMode);
#endif #endif
} }

View File

@ -142,6 +142,6 @@ private:
void setTriggerSynchronizationGap(TriggerShape *s, float synchGap); void setTriggerSynchronizationGap(TriggerShape *s, float synchGap);
void setTriggerSynchronizationGap2(TriggerShape *s, float syncGapFrom, float syncRatioTo); void setTriggerSynchronizationGap2(TriggerShape *s, float syncGapFrom, float syncRatioTo);
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, engine_configuration_s const *engineConfiguration); void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, operation_mode_e operationMode);
#endif /* TRIGGER_STRUCTURE_H_ */ #endif /* TRIGGER_STRUCTURE_H_ */

View File

@ -202,7 +202,7 @@ struct trigger_config_s @brief Trigger wheel(s) configuration
custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true"
custom trigger_type_e 4 bits, U32, @OFFSET@, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
trigger_type_e type; trigger_type_e type;
bit customIsSynchronizationNeeded; bit customIsSynchronizationNeeded;

View File

@ -121,7 +121,7 @@ page = 1
tpsAdcChannel = bits, U32, 504, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5" tpsAdcChannel = bits, U32, 504, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
;skipping overrideCrankingIgnition offset 508 ;skipping overrideCrankingIgnition offset 508
analogChartFrequency = scalar, S32, 512, "index", 1, 0, 0, 300, 0 ; size 4 analogChartFrequency = scalar, S32, 512, "index", 1, 0, 0, 300, 0 ; size 4
trigger_type = bits, U32, 516, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" trigger_type = bits, U32, 516, [0:4], "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
trigger_customIsSynchronizationNeeded= bits, U32, 520, [0:0], "false", "true" trigger_customIsSynchronizationNeeded= bits, U32, 520, [0:0], "false", "true"
trigger_customNeedSecondTriggerInput= bits, U32, 520, [1:1], "false", "true" trigger_customNeedSecondTriggerInput= bits, U32, 520, [1:1], "false", "true"
trigger_customTotalToothCount = scalar, S32, 524, "number", 1, 0.0, 0, 1000.0, 2 trigger_customTotalToothCount = scalar, S32, 524, "number", 1, 0.0, 0, 1000.0, 2