mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
7d39a47c47
commit
75e5348910
|
@ -19,17 +19,21 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->hasMapSensor = true;
|
||||
|
||||
engineConfiguration->trigger.type = TT_MIATA_VVT;
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
|
||||
engineConfiguration->specs.displacement = 1.8;
|
||||
|
||||
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->camInput = GPIOC_6;
|
||||
|
||||
boardConfiguration->miataNb2 = true;
|
||||
// set vvt_mode 3
|
||||
engineConfiguration->vvtMode = MIATA_NB2;
|
||||
boardConfiguration->vvtCamSensorUseRise = true;
|
||||
|
||||
|
||||
boardConfiguration->nb2ratioFrom = 0.75;
|
||||
boardConfiguration->nb2ratioTo = 1.25;
|
||||
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Nov 13 22:09:24 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Nov 14 21:45:04 EST 2016
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -624,9 +624,6 @@ typedef struct {
|
|||
* Use rise or fall signal front
|
||||
offset 376 bit 17 */
|
||||
bool vvtCamSensorUseRise : 1;
|
||||
/**
|
||||
offset 376 bit 18 */
|
||||
bool miataNb2 : 1;
|
||||
/**
|
||||
* offset 380
|
||||
*/
|
||||
|
@ -1760,6 +1757,7 @@ typedef struct {
|
|||
*/
|
||||
pid_s auxPid[AUX_PID_COUNT];
|
||||
/**
|
||||
* set vvt_mode X
|
||||
* offset 2552
|
||||
*/
|
||||
vvt_mode_e vvtMode;
|
||||
|
@ -1994,4 +1992,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Nov 13 22:09:24 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Nov 14 21:45:04 EST 2016
|
||||
|
|
|
@ -426,7 +426,6 @@
|
|||
#define onOffAlternatorLogic_offset 1000
|
||||
#define isCJ125Enabled_offset 1000
|
||||
#define vvtCamSensorUseRise_offset 1000
|
||||
#define miataNb2_offset 1000
|
||||
#define logicAnalyzerPins1_offset 1004
|
||||
#define logicAnalyzerPins2_offset 1008
|
||||
#define logicAnalyzerPins3_offset 1012
|
||||
|
|
|
@ -94,7 +94,7 @@ void hwHandleVvtCamSignal(trigger_value_e front) {
|
|||
efitick_t nowNt = getTimeNowNt();
|
||||
|
||||
|
||||
if (boardConfiguration->miataNb2) {
|
||||
if (engineConfiguration->vvtMode == MIATA_NB2) {
|
||||
uint32_t currentDuration = nowNt - previousVvtCamTime;
|
||||
float ratio = ((float) currentDuration) / previousVvtCamDuration;
|
||||
|
||||
|
@ -108,6 +108,9 @@ void hwHandleVvtCamSignal(trigger_value_e front) {
|
|||
if (ratio < boardConfiguration->nb2ratioFrom || ratio > boardConfiguration->nb2ratioTo) {
|
||||
return;
|
||||
}
|
||||
if (engineConfiguration->isPrintTriggerSynchDetails) {
|
||||
scheduleMsg(logger, "looks good: vvt ratio %f", ratio);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -148,6 +151,13 @@ void hwHandleVvtCamSignal(trigger_value_e front) {
|
|||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
} else if (engineConfiguration->vvtMode == MIATA_NB2) {
|
||||
/**
|
||||
* NB2 is a symmetrical crank, there are four phases total
|
||||
*/
|
||||
while (tc->triggerState.getTotalRevolutionCounter() % 4 != 2) {
|
||||
tc->triggerState.intTotalEventCounter();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -424,7 +434,8 @@ void triggerInfo(void) {
|
|||
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
if (engineConfiguration->camInput != GPIO_UNASSIGNED) {
|
||||
scheduleMsg(logger, "VVT input: %s", hwPortname(engineConfiguration->camInput));
|
||||
scheduleMsg(logger, "VVT input: %s mode %d", hwPortname(engineConfiguration->camInput),
|
||||
engineConfiguration->vvtMode);
|
||||
scheduleMsg(logger, "VVT event counters: %d/%d", vvtEventRiseCounter, vvtEventFallCounter);
|
||||
|
||||
}
|
||||
|
|
|
@ -478,10 +478,13 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NB1:
|
||||
case TT_MAZDA_MIATA_VVT_TEST:
|
||||
initializeMazdaMiataNb1Shape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_VVT_TEST:
|
||||
initializeMazdaMiataVVtTestShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_MIATA_VVT:
|
||||
initializeMazdaMiataNb2Crank(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
|
|
@ -110,7 +110,7 @@ void initializeMazdaMiataNb1Shape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
|||
}
|
||||
|
||||
void initializeMazdaMiataVVtTestShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
initializeMazdaMiataNb1ShapeWithOffset(s, -10 PASS_ENGINE_PARAMETER);
|
||||
initializeMazdaMiataNb1ShapeWithOffset(s, -22 PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
|
|
|
@ -290,5 +290,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20161113;
|
||||
return 20161114;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue