MAP Sync not working #5503

additional data points
This commit is contained in:
rusefillc 2023-08-09 05:49:06 -04:00
parent efcb45a94c
commit 17026dbb3d
1 changed files with 3 additions and 2 deletions

View File

@ -620,8 +620,9 @@ bool TriggerNoiseFilter::noiseFilter(efitick_t nowNt,
}
void TriggerCentral::decodeMapCam(efitick_t timestamp, float currentPhase) {
if (engineConfiguration->vvtMode[0] == VVT_MAP_V_TWIN &&
Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm) {
isDecodingMapCam = engineConfiguration->vvtMode[0] == VVT_MAP_V_TWIN &&
Sensor::getOrZero(SensorType::Rpm) < engineConfiguration->cranking.rpm;
if (isDecodingMapCam) {
// we are trying to figure out which 360 half of the total 720 degree cycle is which, so we compare those in 360 degree sense.
auto toothAngle360 = currentPhase;
while (toothAngle360 >= 360) {