clean up debug channels in status_loop.cpp (#3317)
* FSIO is going away eventually * dead modes * rx8 hmm * break out tps debug
This commit is contained in:
parent
e983b60f57
commit
a3bc507f9b
|
@ -657,6 +657,20 @@ static void updateFlags() {
|
|||
#endif /* EFI_INTERNAL_FLASH */
|
||||
}
|
||||
|
||||
static void updateTpsDebug() {
|
||||
// TPS 1 pri/sec split
|
||||
tsOutputChannels.debugFloatField1 = Sensor::get(SensorType::Tps1Primary).value_or(0) - Sensor::get(SensorType::Tps1Secondary).value_or(0);
|
||||
// TPS 2 pri/sec split
|
||||
tsOutputChannels.debugFloatField2 = Sensor::get(SensorType::Tps2Primary).value_or(0) - Sensor::get(SensorType::Tps2Secondary).value_or(0);
|
||||
// TPS1 - TPS2 split
|
||||
tsOutputChannels.debugFloatField3 = Sensor::get(SensorType::Tps1).value_or(0) - Sensor::get(SensorType::Tps2).value_or(0);
|
||||
// Pedal pri/sec split
|
||||
tsOutputChannels.debugFloatField4 = Sensor::get(SensorType::AcceleratorPedalPrimary).value_or(0) - Sensor::get(SensorType::AcceleratorPedalSecondary).value_or(0);
|
||||
|
||||
// TPS 1 pri/sec ratio - useful for ford ETB that has partial-range second channel
|
||||
tsOutputChannels.debugFloatField5 = 100 * Sensor::get(SensorType::Tps1Primary).value_or(0) / Sensor::get(SensorType::Tps1Secondary).value_or(0);
|
||||
}
|
||||
|
||||
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
int rpm = Sensor::get(SensorType::Rpm).Value;
|
||||
|
@ -798,35 +812,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
// debugFloatField6 used
|
||||
// no one uses shaft so far tsOutputChannels->debugFloatField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_RISING);
|
||||
break;
|
||||
case DBG_FSIO_ADC:
|
||||
// todo: implement a proper loop
|
||||
if (isAdcChannelValid(engineConfiguration->fsioAdc[0])) {
|
||||
tsOutputChannels->debugFloatField1 = getVoltage("fsio", engineConfiguration->fsioAdc[0] PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
break;
|
||||
case DBG_FSIO_EXPRESSION_1_7:
|
||||
#if EFI_FSIO
|
||||
tsOutputChannels->debugFloatField1 = getFsioOutputValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField2 = getFsioOutputValue(1 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField3 = getFsioOutputValue(2 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField4 = getFsioOutputValue(3 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField5 = getFsioOutputValue(4 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField6 = getFsioOutputValue(5 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField7 = getFsioOutputValue(6 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
break;
|
||||
case DBG_FSIO_EXPRESSION_8_14:
|
||||
tsOutputChannels->debugFloatField1 = getFsioOutputValue(7 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField2 = getFsioOutputValue(8 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField3 = getFsioOutputValue(9 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField4 = getFsioOutputValue(10 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField5 = getFsioOutputValue(11 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField6 = getFsioOutputValue(12 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
tsOutputChannels->debugFloatField7 = getFsioOutputValue(13 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
break;
|
||||
#endif /* EFI_FSIO */
|
||||
case DBG_VEHICLE_SPEED_SENSOR:
|
||||
tsOutputChannels->debugIntField1 = engine->engineState.vssEventCounter;
|
||||
break;
|
||||
case DBG_CRANKING_DETAILS:
|
||||
tsOutputChannels->debugIntField1 = engine->rpmCalculator.getRevolutionCounterSinceStart();
|
||||
break;
|
||||
|
@ -853,26 +838,11 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
break;
|
||||
#endif /* EFI_CAN_SUPPORT */
|
||||
case DBG_ANALOG_INPUTS:
|
||||
tsOutputChannels->debugFloatField1 = isAdcChannelValid(engineConfiguration->vbattAdcChannel) ? getVoltageDivided("vbatt", engineConfiguration->vbattAdcChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField2 = Sensor::getRaw(SensorType::Tps1);
|
||||
tsOutputChannels->debugFloatField3 = isAdcChannelValid(engineConfiguration->mafAdcChannel) ? getVoltageDivided("maf", engineConfiguration->mafAdcChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField4 = isAdcChannelValid(engineConfiguration->map.sensor.hwChannel) ? getVoltageDivided("map", engineConfiguration->map.sensor.hwChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField5 = isAdcChannelValid(engineConfiguration->clt.adcChannel) ? getVoltageDivided("clt", engineConfiguration->clt.adcChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField6 = isAdcChannelValid(engineConfiguration->iat.adcChannel) ? getVoltageDivided("iat", engineConfiguration->iat.adcChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
tsOutputChannels->debugFloatField7 = isAdcChannelValid(engineConfiguration->afr.hwChannel) ? getVoltageDivided("ego", engineConfiguration->afr.hwChannel PASS_ENGINE_PARAMETER_SUFFIX) : 0.0f;
|
||||
break;
|
||||
case DBG_ANALOG_INPUTS2:
|
||||
// TPS 1 pri/sec split
|
||||
tsOutputChannels->debugFloatField1 = Sensor::get(SensorType::Tps1Primary).value_or(0) - Sensor::get(SensorType::Tps1Secondary).value_or(0);
|
||||
// TPS 2 pri/sec split
|
||||
tsOutputChannels->debugFloatField2 = Sensor::get(SensorType::Tps2Primary).value_or(0) - Sensor::get(SensorType::Tps2Secondary).value_or(0);
|
||||
// TPS1 - TPS2 split
|
||||
tsOutputChannels->debugFloatField3 = Sensor::get(SensorType::Tps1).value_or(0) - Sensor::get(SensorType::Tps2).value_or(0);
|
||||
// Pedal pri/sec split
|
||||
tsOutputChannels->debugFloatField4 = Sensor::get(SensorType::AcceleratorPedalPrimary).value_or(0) - Sensor::get(SensorType::AcceleratorPedalSecondary).value_or(0);
|
||||
|
||||
// TPS 1 pri/sec ratio - useful for ford ETB that has partial-range second channel
|
||||
tsOutputChannels->debugFloatField5 = 100 * Sensor::get(SensorType::Tps1Primary).value_or(0) / Sensor::get(SensorType::Tps1Secondary).value_or(0);
|
||||
updateTpsDebug();
|
||||
break;
|
||||
case DBG_INSTANT_RPM:
|
||||
{
|
||||
|
|
|
@ -68,8 +68,6 @@ public:
|
|||
float currentVeLoad = 0;
|
||||
float currentAfrLoad = 0;
|
||||
|
||||
int vssEventCounter = 0;
|
||||
|
||||
float fuelingLoad = 0;
|
||||
float ignitionLoad = 0;
|
||||
|
||||
|
|
|
@ -800,7 +800,6 @@ typedef enum {
|
|||
DBG_IDLE_CONTROL = 3,
|
||||
DBG_EL_ACCEL = 4,
|
||||
DBG_TRIGGER_COUNTERS = 5,
|
||||
DBG_FSIO_ADC = 6,
|
||||
|
||||
DBG_VVT_1_PID = 7,
|
||||
/**
|
||||
|
@ -810,7 +809,6 @@ typedef enum {
|
|||
DBG_CRANKING_DETAILS = 9,
|
||||
DBG_IGNITION_TIMING = 10,
|
||||
DBG_FUEL_PID_CORRECTION = 11,
|
||||
DBG_VEHICLE_SPEED_SENSOR = 12,
|
||||
DBG_SD_CARD = 13,
|
||||
DBG_SR5_PROTOCOL = 14,
|
||||
DBG_KNOCK = 15,
|
||||
|
@ -832,7 +830,6 @@ typedef enum {
|
|||
DBG_ANALOG_INPUTS = 21,
|
||||
|
||||
DBG_INSTANT_RPM = 22,
|
||||
DBG_FSIO_EXPRESSION_1_7 = 23,
|
||||
DBG_STATUS = 24,
|
||||
DBG_CJ125 = 25,
|
||||
DBG_CAN = 26,
|
||||
|
@ -853,7 +850,6 @@ typedef enum {
|
|||
DBG_LAUNCH = 38,
|
||||
DBG_ETB_AUTOTUNE = 39,
|
||||
DBG_COMPOSITE_LOG = 40,
|
||||
DBG_FSIO_EXPRESSION_8_14 = 41,
|
||||
DBG_UNUSED_42 = 42,
|
||||
DBG_INJECTOR_COMPENSATION = 43,
|
||||
DBG_DYNO_VIEW = 44,
|
||||
|
|
|
@ -196,7 +196,8 @@ void canMazdaRX8(CanCycle cycle) {
|
|||
CanTxMessage msg(CAN_MAZDA_RX_STATUS_2);
|
||||
auto clt = Sensor::get(SensorType::Clt);
|
||||
msg[0] = (uint8_t)(clt.value_or(0) + 69); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar
|
||||
msg[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff;
|
||||
// TODO: fixme!
|
||||
//msg[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff;
|
||||
msg[2] = 0x00; // unknown
|
||||
msg[3] = 0x00; //unknown
|
||||
msg[4] = 0x01; //Oil Pressure (not really a gauge)
|
||||
|
|
|
@ -296,7 +296,7 @@ float baseFuel;+Base mass of the per-cylinder fuel injected during cranking. Thi
|
|||
int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0
|
||||
end_struct
|
||||
|
||||
#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "GPPWM", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "VVT1 PID", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Wall Wetting", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION_1_7", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "FSIO_COMPOSITE_LOG", "FSIO_EXPRESSION_8_14", "INVALID", "Injector Compensation", "Dyno_View", "Logic_Analyzer", "rusEFI Wideband", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
|
||||
#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "GPPWM", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "INVALID", "VVT1 PID", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "INVALID", "SD card", "sr5", "Knock", "Wall Wetting", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "FSIO_COMPOSITE_LOG", "INVALID", "INVALID", "Injector Compensation", "Dyno_View", "Logic_Analyzer", "rusEFI Wideband", "TCU", "Lua", "VVT2 PID", "VVT3 PID", "VVT4 PID", "mode 52", "mode 53"
|
||||
custom debug_mode_e 4 bits, U32, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
||||
|
||||
#define VM_VVT_INACTIVE 0
|
||||
|
|
Loading…
Reference in New Issue