auto-sync
This commit is contained in:
parent
887b641f5c
commit
048d3960dc
|
@ -17,8 +17,9 @@ void setSachs(engine_configuration_s *engineConfiguration) {
|
|||
engineConfiguration->specs.cylindersCount = 1;
|
||||
engineConfiguration->engineCycle = 360;
|
||||
|
||||
// setOperationMode(engineConfiguration, TWO_STROKE);
|
||||
setOperationMode(engineConfiguration, TWO_STROKE);
|
||||
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
|
||||
engineConfiguration->digitalChartSize = 400;
|
||||
|
||||
/**
|
||||
* We treat the trigger as 1/0 toothed wheel
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
float getRpmMultiplier(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 {
|
||||
engine_configuration_s engineConfiguration;
|
||||
|
|
|
@ -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
|
||||
* cycle into a four stroke, 720 degrees cycle. TODO
|
||||
* 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.
|
||||
*/
|
||||
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
|
||||
triggerIndexForListeners = triggerState.getCurrentIndex();
|
||||
} else {
|
||||
|
|
|
@ -290,7 +290,7 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
|
|||
|
||||
case TT_TOOTHED_WHEEL:
|
||||
initializeSkippedToothTriggerShapeExt(triggerShape, triggerConfig->customTotalToothCount,
|
||||
triggerConfig->customSkippedToothCount, getOperationMode(engineConfiguration));
|
||||
triggerConfig->customSkippedToothCount, engineConfiguration->operationMode);
|
||||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NA:
|
||||
|
|
|
@ -297,7 +297,7 @@ void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped,
|
|||
s->useRiseEdge = true;
|
||||
|
||||
initializeSkippedToothTriggerShapeExt(s, total, skipped,
|
||||
getOperationMode(engineConfiguration));
|
||||
engineConfiguration->operationMode);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public class TestingUtils {
|
|||
// we need to skip TWO because spark could have been scheduled a while ago and happen now
|
||||
// todo: improve this logic, compare times
|
||||
IoUtil.sendCommand("reset_wave_chart");
|
||||
getWaveChart();
|
||||
// getWaveChart();
|
||||
// we want to wait for the 2nd chart to see same same RPM across the whole chart
|
||||
String result = getWaveChart();
|
||||
FileLog.MAIN.logLine("current chart: " + result);
|
||||
|
|
Loading…
Reference in New Issue