refactoring: bringing method names up to date
This commit is contained in:
parent
ed267c2d09
commit
bd8459875d
|
@ -23,7 +23,7 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) {
|
|||
}
|
||||
|
||||
if (noFiringUntilVvtSync(engineConfiguration->vvtMode[0])
|
||||
&& !engine->triggerCentral.triggerState.hasSynchronizedSymmetrical()) {
|
||||
&& !engine->triggerCentral.triggerState.hasSynchronizedPhase()) {
|
||||
// Any engine that requires cam-assistance for a full crank sync (symmetrical crank) can't schedule until we have cam sync
|
||||
// examples:
|
||||
// NB2, Nissan VQ/MR: symmetrical crank wheel and we need to make sure no spark happens out of sync
|
||||
|
|
|
@ -113,7 +113,7 @@ static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
|||
static angle_t syncAndReport(TriggerCentral *tc, int divider, int remainder) {
|
||||
angle_t engineCycle = getEngineCycle(engine->getOperationMode());
|
||||
|
||||
angle_t offset = tc->triggerState.syncSymmetricalCrank(divider, remainder, engineCycle);
|
||||
angle_t offset = tc->triggerState.syncEnginePhase(divider, remainder, engineCycle);
|
||||
if (offset > 0) {
|
||||
tc->triggerState.vvtSyncCounter++;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ void TriggerState::resetTriggerState() {
|
|||
totalEventCountBase = 0;
|
||||
isFirstEvent = true;
|
||||
|
||||
m_hasSynchronizedSymmetrical = false;
|
||||
m_hasSynchronizedPhase = false;
|
||||
}
|
||||
|
||||
void TriggerState::setTriggerErrorState() {
|
||||
|
@ -394,8 +394,8 @@ void TriggerCentral::validateCamVvtCounters() {
|
|||
}
|
||||
}
|
||||
|
||||
angle_t TriggerState::syncSymmetricalCrank(int divider, int remainder, angle_t engineCycle) {
|
||||
efiAssert(OBD_PCM_Processor_Fault, remainder < divider, "syncSymmetricalCrank", false);
|
||||
angle_t TriggerState::syncEnginePhase(int divider, int remainder, angle_t engineCycle) {
|
||||
efiAssert(OBD_PCM_Processor_Fault, remainder < divider, "syncEnginePhase", false);
|
||||
angle_t totalShift = 0;
|
||||
while (getTotalRevolutionCounter() % divider != remainder) {
|
||||
/**
|
||||
|
@ -408,7 +408,8 @@ angle_t TriggerState::syncSymmetricalCrank(int divider, int remainder, angle_t e
|
|||
}
|
||||
|
||||
// Allow injection/ignition to happen, we've now fully sync'd the crank based on new cam information
|
||||
m_hasSynchronizedSymmetrical = true;
|
||||
m_hasSynchronizedPhase = true;
|
||||
synchronizedPhase.reset();
|
||||
|
||||
return totalShift;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
* this is important for crank-based virtual trigger and VVT magic
|
||||
*/
|
||||
void incrementTotalEventCounter();
|
||||
angle_t syncSymmetricalCrank(int divider, int remainder, angle_t engineCycle);
|
||||
angle_t syncEnginePhase(int divider, int remainder, angle_t engineCycle);
|
||||
|
||||
efitime_t getTotalEventCounter() const;
|
||||
|
||||
|
@ -156,11 +156,11 @@ public:
|
|||
const trigger_config_s& triggerConfig
|
||||
);
|
||||
|
||||
// Returns true if syncSymmetricalCrank has been called,
|
||||
// ie if we have enough VVT information to have full sync on
|
||||
// Returns true if syncEnginePhase has been called,
|
||||
// i.e. if we have enough VVT information to have full sync on
|
||||
// an indeterminite crank pattern
|
||||
bool hasSynchronizedSymmetrical() const {
|
||||
return m_hasSynchronizedSymmetrical;
|
||||
bool hasSynchronizedPhase() const {
|
||||
return m_hasSynchronizedPhase;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -173,8 +173,9 @@ private:
|
|||
|
||||
bool isFirstEvent;
|
||||
|
||||
bool m_hasSynchronizedSymmetrical = false;
|
||||
Timer synchronizedSymmetrical;
|
||||
// todo: migrate from 'm_hasSynchronizedPhase' to 'synchronizedPhase'
|
||||
bool m_hasSynchronizedPhase = false;
|
||||
Timer synchronizedPhase;
|
||||
};
|
||||
|
||||
// we only need 90 degrees of events so /4 or maybe even /8 should work?
|
||||
|
|
Loading…
Reference in New Issue