why so many channels are hidden in debug ? #3614

This commit is contained in:
rusefillc 2021-11-29 10:16:45 -05:00
parent de0680209b
commit 818d12f68e
2 changed files with 22 additions and 33 deletions

View File

@ -770,22 +770,25 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->recentErrorCode[i] = engine->engineState.warnings.recentWarnings.get(i);
}
tsOutputChannels->startStopStateToggleCounter = engine->startStopStateToggleCounter;
tsOutputChannels->starterState = enginePins.starterControl.getLogicValue();
tsOutputChannels->starterRelayDisable = enginePins.starterRelayDisable.getLogicValue();
tsOutputChannels->revolutionCounterSinceStart = engine->rpmCalculator.getRevolutionCounterSinceStart();
#if EFI_CAN_SUPPORT
postCanState(tsOutputChannels);
#endif /* EFI_CAN_SUPPORT */
#if EFI_CLOCK_LOCKS
tsOutputChannels->maxLockedDuration = maxLockedDuration;
tsOutputChannels->maxTriggerReentraint = maxTriggerReentraint;
#endif /* EFI_CLOCK_LOCKS */
switch (engineConfiguration->debugMode) {
case DBG_START_STOP:
tsOutputChannels->debugIntField1 = engine->startStopStateToggleCounter;
tsOutputChannels->debugIntField2 = enginePins.starterControl.getLogicValue();
tsOutputChannels->debugIntField3 = enginePins.starterRelayDisable.getLogicValue();
break;
case DBG_STATUS:
tsOutputChannels->debugFloatField1 = timeSeconds;
tsOutputChannels->debugIntField1 = atoi(VCS_VERSION);
break;
case DBG_METRICS:
#if EFI_CLOCK_LOCKS
tsOutputChannels->debugIntField1 = maxLockedDuration;
tsOutputChannels->debugIntField2 = maxTriggerReentraint;
#endif /* EFI_CLOCK_LOCKS */
break;
case DBG_TPS_ACCEL:
tsOutputChannels->debugIntField1 = engine->tpsAccelEnrichment.cb.getSize();
break;
@ -796,22 +799,18 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->debugIntField3 = tsState.readPageCommandsCounter * _10_6 + tsState.burnCommandCounter;
break;
}
case DBG_AUX_VALVES:
tsOutputChannels->debugFloatField1 = engine->engineState.auxValveStart;
tsOutputChannels->debugFloatField2 = engine->engineState.auxValveEnd;
break;
case DBG_TRIGGER_COUNTERS:
tsOutputChannels->debugIntField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_FALLING);
tsOutputChannels->debugIntField2 = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_FALLING);
tsOutputChannels->triggerPrimaryFall = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_FALLING);
tsOutputChannels->triggerSecondaryFall = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_FALLING);
// no one uses shaft so far tsOutputChannels->debugIntField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_FALLING);
#if EFI_PROD_CODE && HAL_USE_ICU == TRUE
tsOutputChannels->debugFloatField3 = icuRisingCallbackCounter + icuFallingCallbackCounter;
#endif /* EFI_PROD_CODE */
tsOutputChannels->debugFloatField4 = engine->triggerCentral.vvtEventRiseCounter[0];
tsOutputChannels->debugFloatField5 = engine->triggerCentral.vvtEventFallCounter[0];
tsOutputChannels->triggerVvtRise = engine->triggerCentral.vvtEventRiseCounter[0];
tsOutputChannels->triggerVvtFall = engine->triggerCentral.vvtEventFallCounter[0];
tsOutputChannels->debugFloatField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_RISING);
tsOutputChannels->debugFloatField2 = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_RISING);
tsOutputChannels->triggerPrimaryRise = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_RISING);
tsOutputChannels->triggerSecondaryRise = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_RISING);
tsOutputChannels->debugIntField4 = engine->triggerCentral.triggerState.currentCycle.eventCount[0];
tsOutputChannels->debugIntField5 = engine->triggerCentral.triggerState.currentCycle.eventCount[1];
@ -819,9 +818,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
// debugFloatField6 used
// no one uses shaft so far tsOutputChannels->debugFloatField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_RISING);
break;
case DBG_CRANKING_DETAILS:
tsOutputChannels->debugIntField1 = engine->rpmCalculator.getRevolutionCounterSinceStart();
break;
#if EFI_HIP_9011_DEBUG
case DBG_KNOCK:
// todo: maybe extract hipPostState(tsOutputChannels);
@ -839,11 +835,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
postMapState(tsOutputChannels);
break;
#endif /* EFI_MAP_AVERAGING */
#if EFI_CAN_SUPPORT
case DBG_CAN:
postCanState(tsOutputChannels);
break;
#endif /* EFI_CAN_SUPPORT */
case DBG_ANALOG_INPUTS:
tsOutputChannels->debugFloatField4 = isAdcChannelValid(engineConfiguration->map.sensor.hwChannel) ? getVoltageDivided("map", engineConfiguration->map.sensor.hwChannel) : 0.0f;
tsOutputChannels->debugFloatField7 = isAdcChannelValid(engineConfiguration->afr.hwChannel) ? getVoltageDivided("ego", engineConfiguration->afr.hwChannel) : 0.0f;
@ -857,8 +848,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) {
tsOutputChannels->debugFloatField1 = instantRpm;
tsOutputChannels->debugFloatField2 = instantRpm / GET_RPM();
tsOutputChannels->debugIntField1 = engine->mostRecentTimeBetweenSparkEvents;
tsOutputChannels->debugIntField2 = engine->mostRecentTimeBetweenIgnitionEvents;
tsOutputChannels->mostRecentTimeBetweenSparkEvents = engine->mostRecentTimeBetweenSparkEvents;
tsOutputChannels->mostRecentTimeBetweenIgnitionEvents = engine->mostRecentTimeBetweenIgnitionEvents;
}
break;
case DBG_ION:

View File

@ -676,8 +676,6 @@ static void setDefaultEngineConfiguration() {
engineConfiguration->isMapAveragingEnabled = true;
engineConfiguration->isWaveAnalyzerEnabled = true;
engineConfiguration->debugMode = DBG_ALTERNATOR_PID;
engineConfiguration->acIdleRpmBump = 200;
/* these two are used for HIP9011 only