guards
This commit is contained in:
parent
b7409470f9
commit
f342bf7537
|
@ -68,6 +68,23 @@ operation_mode_e lookupOperationMode() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see also in TunerStudio project '[doesTriggerImplyOperationMode] tag
|
||||||
|
// this is related to 'knownOperationMode' flag
|
||||||
|
static bool doesTriggerImplyOperationMode(trigger_type_e type) {
|
||||||
|
switch (type) {
|
||||||
|
case TT_TOOTHED_WHEEL:
|
||||||
|
case TT_ONE:
|
||||||
|
case TT_3_1_CAM:
|
||||||
|
case TT_36_2_2_2: // TODO: should this one be in this list?
|
||||||
|
case TT_TOOTHED_WHEEL_60_2:
|
||||||
|
case TT_TOOTHED_WHEEL_36_1:
|
||||||
|
// These modes could be either cam or crank speed
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// todo: move to triggerCentral/triggerShape since has nothing to do with rotation state!
|
// todo: move to triggerCentral/triggerShape since has nothing to do with rotation state!
|
||||||
operation_mode_e RpmCalculator::getOperationMode() const {
|
operation_mode_e RpmCalculator::getOperationMode() const {
|
||||||
#if EFI_SHAFT_POSITION_INPUT
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
|
@ -122,23 +139,6 @@ bool RpmCalculator::checkIfSpinning(efitick_t nowNt) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// see also in TunerStudio project '[doesTriggerImplyOperationMode] tag
|
|
||||||
// this is related to 'knownOperationMode' flag
|
|
||||||
static bool doesTriggerImplyOperationMode(trigger_type_e type) {
|
|
||||||
switch (type) {
|
|
||||||
case TT_TOOTHED_WHEEL:
|
|
||||||
case TT_ONE:
|
|
||||||
case TT_3_1_CAM:
|
|
||||||
case TT_36_2_2_2: // TODO: should this one be in this list?
|
|
||||||
case TT_TOOTHED_WHEEL_60_2:
|
|
||||||
case TT_TOOTHED_WHEEL_36_1:
|
|
||||||
// These modes could be either cam or crank speed
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void RpmCalculator::assignRpmValue(float floatRpmValue) {
|
void RpmCalculator::assignRpmValue(float floatRpmValue) {
|
||||||
previousRpmValue = cachedRpmValue;
|
previousRpmValue = cachedRpmValue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue