auto-sync

This commit is contained in:
rusEfi 2015-03-22 14:04:59 -05:00
parent 5d8bd45a50
commit 2621853e0d
6 changed files with 8 additions and 8 deletions

View File

@ -17,8 +17,9 @@ void setSachs(engine_configuration_s *engineConfiguration) {
engineConfiguration->specs.cylindersCount = 1; engineConfiguration->specs.cylindersCount = 1;
engineConfiguration->engineCycle = 360; engineConfiguration->engineCycle = 360;
// setOperationMode(engineConfiguration, TWO_STROKE); setOperationMode(engineConfiguration, TWO_STROKE);
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER; engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
engineConfiguration->digitalChartSize = 400;
/** /**
* We treat the trigger as 1/0 toothed wheel * We treat the trigger as 1/0 toothed wheel

View File

@ -37,7 +37,6 @@
float getRpmMultiplier(operation_mode_e mode); float getRpmMultiplier(operation_mode_e mode);
void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode); void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode);
operation_mode_e getOperationMode(engine_configuration_s const *engineConfiguration);
typedef struct { typedef struct {
engine_configuration_s engineConfiguration; engine_configuration_s engineConfiguration;

View File

@ -169,11 +169,11 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
} }
/** /**
* If we only have a crank position sensor, here we are extending crank revolutions with a 360 degree * If we only have a crank position sensor with four stroke, here we are extending crank revolutions with a 360 degree
* cycle into a four stroke, 720 degrees cycle. TODO * cycle into a four stroke, 720 degrees cycle.
*/ */
int triggerIndexForListeners; int triggerIndexForListeners;
if (getOperationMode(engine->engineConfiguration) == FOUR_STROKE_CAM_SENSOR) { if (engineConfiguration->operationMode != FOUR_STROKE_CRANK_SENSOR) {
// That's easy - trigger cycle matches engine cycle // That's easy - trigger cycle matches engine cycle
triggerIndexForListeners = triggerState.getCurrentIndex(); triggerIndexForListeners = triggerState.getCurrentIndex();
} else { } else {

View File

@ -290,7 +290,7 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
case TT_TOOTHED_WHEEL: case TT_TOOTHED_WHEEL:
initializeSkippedToothTriggerShapeExt(triggerShape, triggerConfig->customTotalToothCount, initializeSkippedToothTriggerShapeExt(triggerShape, triggerConfig->customTotalToothCount,
triggerConfig->customSkippedToothCount, getOperationMode(engineConfiguration)); triggerConfig->customSkippedToothCount, engineConfiguration->operationMode);
break; break;
case TT_MAZDA_MIATA_NA: case TT_MAZDA_MIATA_NA:

View File

@ -297,7 +297,7 @@ void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped,
s->useRiseEdge = true; s->useRiseEdge = true;
initializeSkippedToothTriggerShapeExt(s, total, skipped, initializeSkippedToothTriggerShapeExt(s, total, skipped,
getOperationMode(engineConfiguration)); engineConfiguration->operationMode);
#endif #endif
} }

View File

@ -112,7 +112,7 @@ public class TestingUtils {
// we need to skip TWO because spark could have been scheduled a while ago and happen now // we need to skip TWO because spark could have been scheduled a while ago and happen now
// todo: improve this logic, compare times // todo: improve this logic, compare times
IoUtil.sendCommand("reset_wave_chart"); IoUtil.sendCommand("reset_wave_chart");
getWaveChart(); // getWaveChart();
// we want to wait for the 2nd chart to see same same RPM across the whole chart // we want to wait for the 2nd chart to see same same RPM across the whole chart
String result = getWaveChart(); String result = getWaveChart();
FileLog.MAIN.logLine("current chart: " + result); FileLog.MAIN.logLine("current chart: " + result);