mirror of https://github.com/rusefi/rusefi-1.git
why so many channels are hidden in debug ? #3614
This commit is contained in:
parent
f61f3e2834
commit
26997ab9e3
|
@ -253,7 +253,14 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0
|
|||
|
||||
|
||||
! we have some unused bytes to allow compatible TS changes
|
||||
uint8_t[204 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
uint8_t[196 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
|
||||
|
||||
uint16_t mostRecentTimeBetweenSparkEvents;;"", 1, 0, -10000, 10000, 3
|
||||
uint16_t mostRecentTimeBetweenIgnitionEvents;;"", 1, 0, -10000, 10000, 3
|
||||
|
||||
uint16_t maxLockedDuration;;"", 1, 0, -10000, 10000, 3
|
||||
uint16_t maxTriggerReentraint;;"", 1, 0, -10000, 10000, 3
|
||||
|
||||
|
||||
uint16_t canWriteOk;;"", 1, 0, -10000, 10000, 3
|
||||
uint16_t canWriteNotOk;;"", 1, 0, -10000, 10000, 3
|
||||
|
|
|
@ -482,8 +482,8 @@ expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t obs
|
|||
float errorIntegral = m_errorAccumulator.accumulate(target - observation);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (m_function == ETB_Throttle1 && engineConfiguration->debugMode == DBG_ETB_LOGIC) {
|
||||
tsOutputChannels.debugFloatField3 = errorIntegral;
|
||||
if (m_function == ETB_Throttle1) {
|
||||
tsOutputChannels.etbIntegralError = errorIntegral;
|
||||
}
|
||||
#endif // EFI_TUNER_STUDIO
|
||||
|
||||
|
@ -529,14 +529,9 @@ void EtbController::update() {
|
|||
#if EFI_TUNER_STUDIO
|
||||
// Only debug throttle #1
|
||||
if (m_function == ETB_Throttle1) {
|
||||
// set debug_mode 17
|
||||
if (engineConfiguration->debugMode == DBG_ELECTRONIC_THROTTLE_PID) {
|
||||
m_pid.postState(&tsOutputChannels);
|
||||
tsOutputChannels.debugIntField5 = engine->engineState.etbFeedForward;
|
||||
} else if (engineConfiguration->debugMode == DBG_ELECTRONIC_THROTTLE_EXTRA) {
|
||||
// set debug_mode 29
|
||||
tsOutputChannels.debugFloatField1 = directPwmValue;
|
||||
}
|
||||
m_pid.postState(&tsOutputChannels.etbStatus);
|
||||
tsOutputChannels.etbFeedForward = engine->engineState.etbFeedForward
|
||||
tsOutputChannels.etbStatus.output = directPwmValue;
|
||||
}
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
|
@ -554,11 +549,7 @@ void EtbController::update() {
|
|||
}
|
||||
}
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_ETB_LOGIC) {
|
||||
tsOutputChannels.debugFloatField1 = engine->engineState.targetFromTable;
|
||||
}
|
||||
#endif
|
||||
tsOutputChannels.etbCurrentTarget = engine->engineState.targetFromTable;
|
||||
|
||||
m_pid.iTermMin = engineConfiguration->etb_iTermMin;
|
||||
m_pid.iTermMax = engineConfiguration->etb_iTermMax;
|
||||
|
|
|
@ -454,17 +454,15 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
|
|||
tsOutputChannels.isIdleClosedLoop = phase == Phase::Idling;
|
||||
tsOutputChannels.isIdleCoasting = phase == Phase::Coasting;
|
||||
|
||||
if (engineConfiguration->debugMode == DBG_IDLE_CONTROL) {
|
||||
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||
// see also tsOutputChannels->idlePosition
|
||||
getIdlePid()->postState(&tsOutputChannels, 1000000);
|
||||
tsOutputChannels.debugIntField4 = engine->idle.idleState;
|
||||
getIdlePid()->postState(&tsOutputChannels.idleStatus);
|
||||
tsOutputChannels.idleState = engine->idle.idleState;
|
||||
} else {
|
||||
tsOutputChannels.debugFloatField1 = iacPosition;
|
||||
tsOutputChannels.idleCurrentPosition = iacPosition;
|
||||
extern StepperMotor iacMotor;
|
||||
tsOutputChannels.debugIntField1 = iacMotor.getTargetPosition();
|
||||
tsOutputChannels.idleTargetPosition = iacMotor.getTargetPosition();
|
||||
}
|
||||
}
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
engine->idle.currentIdlePosition = iacPosition;
|
||||
|
|
|
@ -60,15 +60,13 @@ float InjectorModel::getInjectorFlowRatio() const {
|
|||
return 1.0f;
|
||||
}
|
||||
|
||||
// todo: live data model
|
||||
float pressureRatio = pressureDelta / referencePressure;
|
||||
float flowRatio = sqrtf(pressureRatio);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_INJECTOR_COMPENSATION) {
|
||||
tsOutputChannels.debugFloatField1 = pressureDelta;
|
||||
tsOutputChannels.debugFloatField2 = pressureRatio;
|
||||
tsOutputChannels.debugFloatField3 = flowRatio;
|
||||
}
|
||||
tsOutputChannels.injectorFlowPressureDelta = pressureDelta;
|
||||
tsOutputChannels.injectorFlowPressureRatio = pressureRatio;
|
||||
#endif // EFI_TUNER_STUDIO
|
||||
|
||||
// TODO: should the flow ratio be clamped?
|
||||
|
|
|
@ -184,9 +184,9 @@ void setCanType(int type) {
|
|||
|
||||
#if EFI_TUNER_STUDIO
|
||||
void postCanState(TunerStudioOutputChannels *tsOutputChannels) {
|
||||
tsOutputChannels->debugIntField1 = isCanEnabled ? canReadCounter : -1;
|
||||
tsOutputChannels->debugIntField2 = isCanEnabled ? canWriteOk : -1;
|
||||
tsOutputChannels->debugIntField3 = isCanEnabled ? canWriteNotOk : -1;
|
||||
tsOutputChannels->canReadCounter = isCanEnabled ? canReadCounter : -1;
|
||||
tsOutputChannels->canWriteOk = isCanEnabled ? canWriteOk : -1;
|
||||
tsOutputChannels->canWriteNotOk = isCanEnabled ? canWriteNotOk : -1;
|
||||
}
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
|
|
Loading…
Reference in New Issue