mirror of https://github.com/rusefi/rusefi-1.git
why so many channels are hidden in debug ? #3614
This commit is contained in:
parent
81f4a3e5f0
commit
de0680209b
|
@ -44,13 +44,11 @@ class AlternatorController : public PeriodicTimerController {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (engineConfiguration->debugMode == DBG_ALTERNATOR_PID) {
|
||||
// this block could be executed even in on/off alternator control mode
|
||||
// but at least we would reflect latest state
|
||||
#if EFI_TUNER_STUDIO
|
||||
alternatorPid.postState(&tsOutputChannels);
|
||||
alternatorPid.postState(&tsOutputChannels.alternatorStatus);
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
}
|
||||
|
||||
// todo: migrate this to FSIO
|
||||
bool alternatorShouldBeEnabledAtCurrentRpm = GET_RPM() > engineConfiguration->cranking.rpm;
|
||||
|
@ -68,6 +66,7 @@ class AlternatorController : public PeriodicTimerController {
|
|||
auto vBatt = Sensor::get(SensorType::BatteryVoltage);
|
||||
float targetVoltage = engineConfiguration->targetVBatt;
|
||||
|
||||
// todo: I am not aware of a SINGLE person to use this onOffAlternatorLogic
|
||||
if (engineConfiguration->onOffAlternatorLogic) {
|
||||
if (!vBatt) {
|
||||
// Somehow battery voltage isn't valid, disable alternator control
|
||||
|
@ -78,11 +77,9 @@ class AlternatorController : public PeriodicTimerController {
|
|||
bool newState = (vBatt.Value < targetVoltage - h) || (currentPlainOnOffState && vBatt.Value < targetVoltage);
|
||||
enginePins.alternatorPin.setValue(newState);
|
||||
currentPlainOnOffState = newState;
|
||||
if (engineConfiguration->debugMode == DBG_ALTERNATOR_PID) {
|
||||
#if EFI_TUNER_STUDIO
|
||||
tsOutputChannels.debugIntField1 = newState;
|
||||
tsOutputChannels.alternatorOnOff = newState;
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -94,9 +94,7 @@ ClosedLoopFuelResult fuelClosedLoopCorrection() {
|
|||
size_t binIdx = computeStftBin(GET_RPM(), getFuelingLoad(), engineConfiguration->stft);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_FUEL_PID_CORRECTION) {
|
||||
tsOutputChannels.debugIntField1 = binIdx;
|
||||
}
|
||||
tsOutputChannels.fuelClosedLoopBinIdx = binIdx;
|
||||
#endif // EFI_TUNER_STUDIO
|
||||
|
||||
ClosedLoopFuelResult result;
|
||||
|
|
Loading…
Reference in New Issue