log actual tooth angle (#3646)

This commit is contained in:
Matthew Kennedy 2021-12-02 16:22:33 -08:00 committed by GitHub
parent 9313c7b3ed
commit 25beb610b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

View File

@ -872,16 +872,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
} }
} }
void updateCurrentEnginePhase() {
if (auto phase = engine->triggerCentral.getCurrentEnginePhase(getTimeNowNt())) {
angle_t angle = phase.Value - tdcPosition();
wrapAngle(angle, "updateCurrentEnginePhase", CUSTOM_ERR_6555);
tsOutputChannels.currentEnginePhase = angle;
} else {
tsOutputChannels.currentEnginePhase = 0;
}
}
void prepareTunerStudioOutputs(void) { void prepareTunerStudioOutputs(void) {
// sensor state for EFI Analytics Tuner Studio // sensor state for EFI Analytics Tuner Studio
updateTunerStudioState(&tsOutputChannels); updateTunerStudioState(&tsOutputChannels);

View File

@ -11,7 +11,6 @@
void updateDevConsoleState(void); void updateDevConsoleState(void);
void prepareTunerStudioOutputs(void); void prepareTunerStudioOutputs(void);
void updateCurrentEnginePhase();
void startStatusThreads(void); void startStatusThreads(void);
void initStatusLoop(void); void initStatusLoop(void);

View File

@ -656,7 +656,9 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta
mainTriggerCallback(triggerIndexForListeners, timestamp); mainTriggerCallback(triggerIndexForListeners, timestamp);
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
updateCurrentEnginePhase(); auto toothAngle = engine->triggerCentral.triggerFormDetails.eventAngles[triggerIndexForListeners] - tdcPosition();
wrapAngle(toothAngle, "currentEnginePhase", CUSTOM_ERR_6555);
tsOutputChannels.currentEnginePhase = toothAngle;
#endif #endif
} }
} }