auto-sync

This commit is contained in:
rusEfi 2016-10-15 23:03:28 -04:00
parent 7b87c7fcd0
commit 719a7f86dc
9 changed files with 63 additions and 2 deletions

View File

@ -14,6 +14,10 @@
* set_engine_type 17 * set_engine_type 17
* 1+24 signal, JM Predule * 1+24 signal, JM Predule
* *
*
* set_engine_type 48
* debug configuration to reproduce https://sourceforge.net/p/rusefi/tickets/319/
*
* @date Jan 12, 2014 * @date Jan 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2016 * @author Andrey Belomutskiy, (c) 2012-2016
*/ */
@ -190,3 +194,13 @@ void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24; engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F); setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
} }
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = HONDA_ACCORD_1_24_SHIFTED;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24_SHIFTED;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
// set_global_trigger_offset_angle 0
engineConfiguration->globalTriggerAngleOffset = 0;
}

View File

@ -14,5 +14,6 @@ void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_F); void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F); void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F); void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfiguration1_24_shifted(DECLARE_ENGINE_PARAMETER_F);
#endif /* HONDA_ACCORD_H_ */ #endif /* HONDA_ACCORD_H_ */

View File

@ -86,6 +86,8 @@ case HONDA_ACCORD_CD_DIP:
return "HONDA_ACCORD_CD_DIP"; return "HONDA_ACCORD_CD_DIP";
case HONDA_ACCORD_CD_TWO_WIRES: case HONDA_ACCORD_CD_TWO_WIRES:
return "HONDA_ACCORD_CD_TWO_WIRES"; return "HONDA_ACCORD_CD_TWO_WIRES";
case HONDA_ACCORD_1_24_SHIFTED:
return "HONDA_ACCORD_1_24_SHIFTED";
case MAZDA_323: case MAZDA_323:
return "MAZDA_323"; return "MAZDA_323";
case MAZDA_626: case MAZDA_626:
@ -159,6 +161,8 @@ case TT_HONDA_ACCORD_CD:
return "TT_HONDA_ACCORD_CD"; return "TT_HONDA_ACCORD_CD";
case TT_HONDA_ACCORD_1_24: case TT_HONDA_ACCORD_1_24:
return "TT_HONDA_ACCORD_1_24"; return "TT_HONDA_ACCORD_1_24";
case TT_HONDA_ACCORD_1_24_SHIFTED:
return "ACCORD_1_24_SHIFTED";
case TT_DODGE_STRATUS: case TT_DODGE_STRATUS:
return "TT_DODGE_STRATUS"; return "TT_DODGE_STRATUS";
case TT_36_2_2_2: case TT_36_2_2_2:

View File

@ -882,6 +882,9 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
case HONDA_ACCORD_CD_TWO_WIRES: case HONDA_ACCORD_CD_TWO_WIRES:
setHondaAccordConfiguration1_24(PASS_ENGINE_PARAMETER_F); setHondaAccordConfiguration1_24(PASS_ENGINE_PARAMETER_F);
break; break;
case HONDA_ACCORD_1_24_SHIFTED:
setHondaAccordConfiguration1_24_shifted(PASS_ENGINE_PARAMETER_F);
break;
case HONDA_ACCORD_CD_DIP: case HONDA_ACCORD_CD_DIP:
setHondaAccordConfigurationDip(PASS_ENGINE_PARAMETER_F); setHondaAccordConfigurationDip(PASS_ENGINE_PARAMETER_F);
break; break;

View File

@ -138,7 +138,9 @@ typedef enum {
MAZDA_MIATA_2003 = 47, MAZDA_MIATA_2003 = 47,
ET_UNUSED = 48, HONDA_ACCORD_1_24_SHIFTED = 48,
ET_UNUSED = 49,
Force_4b_engine_type = ENUM_32_BITS, Force_4b_engine_type = ENUM_32_BITS,
} engine_type_e; } engine_type_e;
@ -203,7 +205,13 @@ typedef enum {
TT_MIATA_VVT = 33, TT_MIATA_VVT = 33,
TT_UNUSED = 34, // this is used if we want to iterate over all trigger types /**
* This is a different version of TT_HONDA_ACCORD_1_24
* See https://sourceforge.net/p/rusefi/tickets/319/
*/
TT_HONDA_ACCORD_1_24_SHIFTED = 34,
TT_UNUSED = 35, // this is used if we want to iterate over all trigger types
Force_4b_trigger_type = ENUM_32_BITS, Force_4b_trigger_type = ENUM_32_BITS,
} trigger_type_e; } trigger_type_e;

View File

@ -135,6 +135,8 @@ const char* getConfigurationName(engine_type_e engineType) {
return "Accord3"; return "Accord3";
case HONDA_ACCORD_CD_TWO_WIRES: case HONDA_ACCORD_CD_TWO_WIRES:
return "Accord2"; return "Accord2";
case HONDA_ACCORD_1_24_SHIFTED:
return "Accord24sh";
case HONDA_ACCORD_CD_DIP: case HONDA_ACCORD_CD_DIP:
return "HondaD"; return "HondaD";
case FORD_INLINE_6_1995: case FORD_INLINE_6_1995:

View File

@ -555,6 +555,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
configureHondaAccordCD(triggerShape, true, false, T_PRIMARY, T_PRIMARY, 10); configureHondaAccordCD(triggerShape, true, false, T_PRIMARY, T_PRIMARY, 10);
break; break;
case TT_HONDA_ACCORD_1_24_SHIFTED:
configureHondaAccordShifter(triggerShape);
break;
case TT_HONDA_ACCORD_CD_DIP: case TT_HONDA_ACCORD_CD_DIP:
configureHondaAccordCDDip(triggerShape); configureHondaAccordCDDip(triggerShape);
break; break;

View File

@ -243,5 +243,29 @@ void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
} }
void configureHondaAccordShifter(TriggerShape *s) {
float w = 720 / 2 / 24;
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
float sb = S24;
s->addEvent(S24 + 0.001, T_PRIMARY, TV_RISE);
s->addEvent(S24 + 0.1, T_SECONDARY, TV_RISE);
sb += S24;
s->addEvent(sb, T_SECONDARY, TV_FALL);
sb += S24;
s->addEvent(S24 + 22, T_PRIMARY, TV_FALL);
for (int i = 0;i<23;i++)
sb = addAccordPair(s, sb, T_SECONDARY);
s->useOnlyPrimaryForSync = true;
s->isSynchronizationNeeded = false;
}

View File

@ -11,6 +11,7 @@
#include "trigger_structure.h" #include "trigger_structure.h"
void configureHondaAccordCDDip(TriggerShape *s); void configureHondaAccordCDDip(TriggerShape *s);
void configureHondaAccordShifter(TriggerShape *s);
void configureHondaAccordCD(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal, void configureHondaAccordCD(TriggerShape *s, bool withOneEventSignal, bool withFourEventSignal,
trigger_wheel_e const oneEventWave, trigger_wheel_e const oneEventWave,
trigger_wheel_e const fourEventWave, trigger_wheel_e const fourEventWave,