54ac7279b1 partial rollback

This commit is contained in:
Andrey 2022-09-01 00:46:45 -04:00
parent 2a949f6cd2
commit bc407d7749
3 changed files with 12 additions and 6 deletions

View File

@ -94,6 +94,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
uint16_t autoscale iatCorrection;@@GAUGE_NAME_FUEL_IAT_CORR@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
uint16_t autoscale cltCorrection;@@GAUGE_NAME_FUEL_CLT_CORR@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
uint16_t autoscale baroCorrection;@@GAUGE_NAME_FUEL_BARO_CORR@@;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
! todo: migrate to currentEngineDecodedPhase
uint16_t autoscale currentEnginePhase;Engine Phase;"deg",1, 0, 0, 0, 0
! Wall model AE
uint16_t autoscale wallFuelAmount;@@GAUGE_NAME_FUEL_WALL_AMOUNT@@;"mg",{1/@@PACK_MULT_FUEL_MASS@@}, 0, 0, 0, 0
int16_t autoscale wallFuelCorrection;@@GAUGE_NAME_FUEL_WALL_CORRECTION@@;"mg",{1/@@PACK_MULT_FUEL_MASS@@}, 0, 0, 0, 0

View File

@ -703,8 +703,12 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
// Look up this tooth's angle from the sync point. If this tooth is the sync point, we'll get 0 here.
auto currentPhaseFromSyncPoint = engine->triggerCentral.triggerFormDetails.eventAngles[triggerIndexForListeners];
// Adjust so currentPhase is in engine-space angle / TDC angle, not trigger-space angle
currentEngineDecodedPhase = wrapAngleMethod(currentPhaseFromSyncPoint - tdcPosition(), "currentEnginePhase", CUSTOM_ERR_6555);
// Adjust so currentPhase is in engine-space angle, not trigger-space angle
auto currentPhase = currentPhaseFromSyncPoint - tdcPosition();
wrapAngle(currentPhase, "currentEnginePhase", CUSTOM_ERR_6555);
#if EFI_TUNER_STUDIO
engine->outputChannels.currentEnginePhase = currentPhase;
#endif // EFI_TUNER_STUDIO
// Record precise time and phase of the engine. This is used for VVT decode.
{
@ -744,7 +748,7 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
nextToothIndex = (nextToothIndex + 1) % engine->engineCycleEventCount;
nextPhase = engine->triggerCentral.triggerFormDetails.eventAngles[nextToothIndex] - tdcPosition();
wrapAngle(nextPhase, "nextEnginePhase", CUSTOM_ERR_6555);
} while (nextPhase == currentEngineDecodedPhase);
} while (nextPhase == currentPhase);
#if EFI_CDM_INTEGRATION
@ -755,10 +759,10 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
#endif /* EFI_CDM_INTEGRATION */
// Handle ignition and injection
mainTriggerCallback(triggerIndexForListeners, timestamp, currentEngineDecodedPhase, nextPhase);
mainTriggerCallback(triggerIndexForListeners, timestamp, currentPhase, nextPhase);
// Decode the MAP based "cam" sensor
decodeMapCam(timestamp, currentEngineDecodedPhase);
decodeMapCam(timestamp, currentPhase);
} else {
// We don't have sync, but report to the wave chart anyway as index 0.
reportEventToWaveChart(signal, 0);

View File

@ -11,7 +11,7 @@ int vvtCamCounter
uint8_t mapVvt_MAP_AT_CYCLE_COUNT;;"", 1, 0, -10000, 10000, 3
uint8_t mapVvt_map_peak;;"", 1, 0, -10000, 10000, 3
uint16_t autoscale currentEngineDecodedPhase;Engine Phase;"deg",1, 0, 0, 0, 0
uint16_t autoscale currentEngineDecodedPhase;Engine Phase2;"deg",1, 0, 0, 0, 0
end_struct