only:Lamborghini Diablo 1995 CKP Pattern #5876
This commit is contained in:
parent
244a42d795
commit
249178cb49
|
@ -110,9 +110,12 @@ angle_t TriggerWaveform::getCycleDuration() const {
|
||||||
case FOUR_STROKE_CRANK_SENSOR:
|
case FOUR_STROKE_CRANK_SENSOR:
|
||||||
case TWO_STROKE:
|
case TWO_STROKE:
|
||||||
return TWO_STROKE_CYCLE_DURATION;
|
return TWO_STROKE_CYCLE_DURATION;
|
||||||
default:
|
case OM_NONE:
|
||||||
|
case FOUR_STROKE_CAM_SENSOR:
|
||||||
return FOUR_STROKE_CYCLE_DURATION;
|
return FOUR_STROKE_CYCLE_DURATION;
|
||||||
}
|
}
|
||||||
|
criticalError("unreachable getCycleDuration");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TriggerWaveform::needsDisambiguation() const {
|
bool TriggerWaveform::needsDisambiguation() const {
|
||||||
|
@ -120,15 +123,17 @@ bool TriggerWaveform::needsDisambiguation() const {
|
||||||
case FOUR_STROKE_CRANK_SENSOR:
|
case FOUR_STROKE_CRANK_SENSOR:
|
||||||
case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
|
case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
|
||||||
case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
|
case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
|
||||||
|
case FOUR_STROKE_SIX_TIMES_CRANK_SENSOR:
|
||||||
case FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR:
|
case FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR:
|
||||||
return true;
|
return true;
|
||||||
case FOUR_STROKE_CAM_SENSOR:
|
case FOUR_STROKE_CAM_SENSOR:
|
||||||
case TWO_STROKE:
|
case TWO_STROKE:
|
||||||
|
case OM_NONE:
|
||||||
return false;
|
return false;
|
||||||
default:
|
/* let's NOT handle default in order to benefit from -Werror=switch */
|
||||||
criticalError("bad operationMode() in needsDisambiguation");
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
criticalError("unreachable needsDisambiguation");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -712,7 +717,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case trigger_type_e::TT_6_TOOTH_CRANK:
|
case trigger_type_e::TT_6_TOOTH_CRANK:
|
||||||
configure3ToothCrank(this);
|
configure6ToothCrank(this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case trigger_type_e::TT_12_TOOTH_CRANK:
|
case trigger_type_e::TT_12_TOOTH_CRANK:
|
||||||
|
|
|
@ -108,12 +108,19 @@ int getCrankDivider(operation_mode_e operationMode) {
|
||||||
return SYMMETRICAL_SIX_TIMES_CRANK_SENSOR_DIVIDER;
|
return SYMMETRICAL_SIX_TIMES_CRANK_SENSOR_DIVIDER;
|
||||||
case FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR:
|
case FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR:
|
||||||
return SYMMETRICAL_TWELVE_TIMES_CRANK_SENSOR_DIVIDER;
|
return SYMMETRICAL_TWELVE_TIMES_CRANK_SENSOR_DIVIDER;
|
||||||
default:
|
case OM_NONE:
|
||||||
case FOUR_STROKE_CAM_SENSOR:
|
case FOUR_STROKE_CAM_SENSOR:
|
||||||
case TWO_STROKE:
|
case TWO_STROKE:
|
||||||
// That's easy - trigger cycle matches engine cycle
|
// That's easy - trigger cycle matches engine cycle
|
||||||
return 1;
|
return 1;
|
||||||
|
/* let's NOT handle default in order to benefit from -Werror=switch */
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
wow even while we explicitly handle all enumerations in the switch above we still need a return statement due to
|
||||||
|
https://stackoverflow.com/questions/34112483/gcc-how-best-to-handle-warning-about-unreachable-end-of-function-after-switch
|
||||||
|
*/
|
||||||
|
criticalError("unreachable getCrankDivider");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
||||||
|
|
Loading…
Reference in New Issue