This commit is contained in:
parent
7e3a7b5c79
commit
3a7f719d5c
|
@ -33,21 +33,21 @@ void initializeMazdaMiataNaShape(TriggerShape *s, bool useOnlyRisingEdgeForTrigg
|
|||
/**
|
||||
* http://rusefi.com/forum/viewtopic.php?f=3&t=729&p=12983#p12983
|
||||
*/
|
||||
s->addEvent(52.960405 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(122.635956 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 52.960405 / 720, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 122.635956 / 720, T_SECONDARY, TV_FALL);
|
||||
|
||||
s->addEvent(216.897031 / 720, useOnlyRisingEdgeForTrigger, T_PRIMARY, TV_RISE);
|
||||
s->addEvent(232.640068 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(288.819688 / 720, useOnlyRisingEdgeForTrigger, T_PRIMARY, TV_FALL);
|
||||
s->addEvent(302.646323 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 216.897031 / 720, T_PRIMARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 232.640068 / 720, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 288.819688 / 720, T_PRIMARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 302.646323 / 720, T_SECONDARY, TV_FALL);
|
||||
|
||||
s->addEvent(412.448056 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(482.816719 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 412.448056 / 720, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 482.816719 / 720, T_SECONDARY, TV_FALL);
|
||||
|
||||
s->addEvent(577.035495 / 720, useOnlyRisingEdgeForTrigger, T_PRIMARY, TV_RISE);
|
||||
s->addEvent(592.878113 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(662.899708 / 720, useOnlyRisingEdgeForTrigger, T_SECONDARY, TV_FALL);
|
||||
s->addEvent(720.0f / 720, useOnlyRisingEdgeForTrigger, T_PRIMARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 577.035495 / 720, T_PRIMARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 592.878113 / 720, T_SECONDARY, TV_RISE);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 662.899708 / 720, T_SECONDARY, TV_FALL);
|
||||
s->addEvent(useOnlyRisingEdgeForTrigger, 720.0f / 720, T_PRIMARY, TV_FALL);
|
||||
s->useOnlyPrimaryForSync = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ void TriggerShape::addEvent2(angle_t angle, trigger_wheel_e const waveIndex, tri
|
|||
// todo: the whole 'useOnlyRisingEdgeForTrigger' parameter and logic should not be here
|
||||
// todo: see calculateExpectedEventCounts
|
||||
// related calculation should be done once trigger is initialized outside of trigger shape scope
|
||||
void TriggerShape::addEvent(angle_t angle, bool useOnlyRisingEdgeForTrigger, trigger_wheel_e const waveIndex, trigger_value_e const stateParam) {
|
||||
void TriggerShape::addEvent(bool useOnlyRisingEdgeForTrigger, angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam) {
|
||||
|
||||
efiAssertVoid(CUSTOM_OMODE_UNDEF, operationMode != OM_NONE, "operationMode not set");
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
*/
|
||||
int privateTriggerDefinitionSize;
|
||||
|
||||
void addEvent(angle_t angle, bool useOnlyRisingEdgeForTrigger, trigger_wheel_e const waveIndex, trigger_value_e const state);
|
||||
void addEvent(bool useOnlyRisingEdgeForTrigger, angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state);
|
||||
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam, float filterLeft, float filterRight DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -64,7 +64,7 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste
|
|||
engine->updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
prepareTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
TRIGGER_SHAPE(initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
TRIGGER_SHAPE(initializeTriggerShape(NULL, false PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
engine->triggerCentral.addEventListener(rpmShaftPositionCallback, "rpm reporter", engine);
|
||||
engine->triggerCentral.addEventListener(mainTriggerCallback, "main loop", engine);
|
||||
resetTriggerConfigChangedForUnitTest();
|
||||
|
@ -120,7 +120,7 @@ void EngineTestHelper::applyTriggerShape() {
|
|||
Engine *engine = &this->engine;
|
||||
EXPAND_Engine
|
||||
|
||||
TRIGGER_SHAPE(initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
TRIGGER_SHAPE(initializeTriggerShape(NULL, false PASS_ENGINE_PARAMETER_SUFFIX));
|
||||
|
||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ void testAngleResolver(void) {
|
|||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
|
||||
TriggerShape * ts = &engine->triggerCentral.triggerShape;
|
||||
ts->initializeTriggerShape(NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ts->initializeTriggerShape(NULL, false PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
assertEqualsM("index 2", 52.76, ts->eventAngles[3]); // this angle is relation to synch point
|
||||
assertEqualsM("time 2", 0.3233, ts->wave.getSwitchTime(2));
|
||||
|
|
Loading…
Reference in New Issue