mirror of https://github.com/FOME-Tech/fome-fw.git
debug channel cleanups
This commit is contained in:
parent
0d1b489eae
commit
3df1ee9c5f
|
@ -652,14 +652,8 @@ int TunerStudio::handleCrcCommand(TsChannelBase* tsChannel, char *data, int inco
|
|||
uint16_t subsystem = SWAP_UINT16(data16[0]);
|
||||
uint16_t index = SWAP_UINT16(data16[1]);
|
||||
|
||||
if (engineConfiguration->debugMode == DBG_BENCH_TEST) {
|
||||
engine->outputChannels.debugIntField1++;
|
||||
engine->outputChannels.debugIntField2 = subsystem;
|
||||
engine->outputChannels.debugIntField3 = index;
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE && EFI_ENGINE_CONTROL
|
||||
executeTSCommand(subsystem, index);
|
||||
executeTSCommand(subsystem, index);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
sendOkResponse(tsChannel, TS_CRC);
|
||||
}
|
||||
|
|
|
@ -560,13 +560,6 @@ static void updateFlags() {
|
|||
#endif /* EFI_INTERNAL_FLASH */
|
||||
}
|
||||
|
||||
// weird thing: one of the reasons for this to be a separate method is stack usage reduction in non-optimized build
|
||||
// see https://github.com/rusefi/rusefi/issues/3302 and linked tickets
|
||||
static void updateTpsDebug() {
|
||||
// TPS 1 pri/sec ratio - useful for ford ETB that has partial-range second channel
|
||||
engine->outputChannels.debugFloatField5 = 100 * Sensor::getOrZero(SensorType::Tps1Primary) / Sensor::getOrZero(SensorType::Tps1Secondary);
|
||||
}
|
||||
|
||||
// sensor state for EFI Analytics Tuner Studio
|
||||
// todo: the 'let's copy internal state for external consumers' approach is DEPRECATED
|
||||
// As of 2022 it's preferred to leverage LiveData where all state is exposed
|
||||
|
@ -725,13 +718,6 @@ DcHardware *getdcHardware();
|
|||
postMapState(tsOutputChannels);
|
||||
break;
|
||||
#endif /* EFI_MAP_AVERAGING */
|
||||
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;
|
||||
break;
|
||||
case DBG_ANALOG_INPUTS2:
|
||||
updateTpsDebug();
|
||||
break;
|
||||
case DBG_INSTANT_RPM:
|
||||
{
|
||||
#if EFI_SHAFT_POSITION_INPUT
|
||||
|
|
|
@ -229,14 +229,14 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
DBG_STEPPER_IDLE_CONTROL = 3,
|
||||
DBG_EL_ACCEL = 4,
|
||||
DBG_TRIGGER_COUNTERS = 5,
|
||||
DBG_SOFT_SPARK_CUT = 6,
|
||||
DBG_6 = 6,
|
||||
DBG_7 = 7,
|
||||
DBG_8 = 8,
|
||||
DBG_9 = 9,
|
||||
DBG_10 = 10,
|
||||
DBG_11 = 11,
|
||||
DBG_UNUSED12 = 12,
|
||||
DBG_SD_CARD = 13,
|
||||
DBG_12 = 12,
|
||||
DBG_13 = 13,
|
||||
DBG_SR5_PROTOCOL = 14,
|
||||
DBG_15 = 15,
|
||||
DBG_16 = 16,
|
||||
|
@ -248,11 +248,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
|
||||
DBG_19 = 19,
|
||||
DBG_20 = 20,
|
||||
/**
|
||||
* ADC
|
||||
* See also DBG_ANALOG_INPUTS2
|
||||
*/
|
||||
DBG_ANALOG_INPUTS = 21,
|
||||
DBG_21 = 21,
|
||||
|
||||
DBG_INSTANT_RPM = 22,
|
||||
UNUSED23 = 23,
|
||||
|
@ -264,10 +260,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
DBG_29 = 29,
|
||||
DBG_ION = 30,
|
||||
DBG_TLE8888 = 31,
|
||||
/**
|
||||
* See also DBG_ANALOG_INPUTS
|
||||
*/
|
||||
DBG_ANALOG_INPUTS2 = 32,
|
||||
DBG_32 = 32,
|
||||
DBG_DWELL_METRIC = 33,
|
||||
DBG_34 = 34,
|
||||
DBG_35 = 35,
|
||||
|
|
|
@ -546,13 +546,6 @@ void mlgLogger() {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (engineConfiguration->debugMode == DBG_SD_CARD) {
|
||||
engine->outputChannels.debugIntField1 = totalLoggedBytes;
|
||||
engine->outputChannels.debugIntField2 = totalWritesCounter;
|
||||
engine->outputChannels.debugIntField3 = totalSyncCounter;
|
||||
engine->outputChannels.debugIntField4 = fileCreatedCounter;
|
||||
}
|
||||
|
||||
writeSdLogLine(logBuffer);
|
||||
|
||||
// Something went wrong (already handled), so cancel further writes
|
||||
|
|
Loading…
Reference in New Issue