This commit is contained in:
rusefillc 2022-12-17 15:50:54 -05:00
parent b7409470f9
commit f342bf7537
1 changed files with 17 additions and 17 deletions

View File

@ -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!
operation_mode_e RpmCalculator::getOperationMode() const {
#if EFI_SHAFT_POSITION_INPUT
@ -122,23 +139,6 @@ bool RpmCalculator::checkIfSpinning(efitick_t nowNt) const {
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) {
previousRpmValue = cachedRpmValue;