diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 023dd2938e..1c6f51e7e9 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -101,6 +101,11 @@ int TriggerCentral::getHwEventCounter(int index) { return hwEventCounters[index]; } +void TriggerCentral::resetCounters() { + memset(hwEventCounters, 0, sizeof(hwEventCounters)); + triggerState.resetRunningCounters(); +} + static char shaft_signal_msg_index[15]; static ALWAYS_INLINE void reportEventToWaveChart(trigger_event_e ckpSignalType, int index) { @@ -298,7 +303,8 @@ float getTriggerDutyCycle(int index) { } static void resetRunningTriggerCounters() { - triggerCentral.triggerState.resetRunningCounters(); + triggerCentral.resetCounters(); + triggerInfo(engine); } void initTriggerCentral(Logging *sharedLogger, Engine *engine) { diff --git a/firmware/controllers/trigger/trigger_central.h b/firmware/controllers/trigger/trigger_central.h index 73eadaf6b9..2addda55bd 100644 --- a/firmware/controllers/trigger/trigger_central.h +++ b/firmware/controllers/trigger/trigger_central.h @@ -26,6 +26,7 @@ public: void addEventListener(ShaftPositionListener handler, const char *name, Engine *engine); void handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PARAMETER_S); int getHwEventCounter(int index); + void resetCounters(); TriggerState triggerState; uint64_t nowNt; private: diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index aea6e4e4a3..55e730726e 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -227,24 +227,24 @@ void chDbgStackOverflowPanic(Thread *otp) { extern engine_pins_s enginePins; // todo: why is this method here and not in error_handling.c ? -void firmwareError(const char *fmt, ...) { +void firmwareError(const char *errorMsg, ...) { if (hasFirmwareErrorFlag) return; enginePins.errorLedPin.setValue(1); turnAllPinsOff(); hasFirmwareErrorFlag = TRUE; - if (indexOf(fmt, '%') == -1) { + if (indexOf(errorMsg, '%') == -1) { /** * in case of simple error message let's reduce stack usage * because chvprintf might be causing an error */ - strcpy((char*) errorMessageBuffer, fmt); + strcpy((char*) errorMessageBuffer, errorMsg); } else { firmwareErrorMessageStream.eos = 0; // reset va_list ap; - va_start(ap, fmt); - chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, fmt, ap); + va_start(ap, errorMsg); + chvprintf((BaseSequentialStream *) &firmwareErrorMessageStream, errorMsg, ap); va_end(ap); firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly @@ -260,5 +260,5 @@ int getRusEfiVersion(void) { return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE == 0) return 1; // this is here to make the compiler happy about the unused array - return 20150201; + return 20150202; } diff --git a/firmware/rusefi_config.ini b/firmware/rusefi_config.ini index 8351e38974..1372a6802e 100644 --- a/firmware/rusefi_config.ini +++ b/firmware/rusefi_config.ini @@ -243,9 +243,9 @@ float injectionAngle;this is about deciding when the injector starts it's squirt float diffLoadEnrichmentCoef; air_pressure_sensor_config_s baroSensor;@see hasBaroSensor -float[FUEL_LOAD_COUNT] veLoadBins;;1, 0.0, 0, 300.0, 2 +float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2 float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 - float[FUEL_LOAD_COUNT] afrLoadBins;;1, 0.0, 0, 300.0, 2 + float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2 float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 fuel_table_t fuelTable; diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 3587c4c048..0580e78274 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -151,9 +151,9 @@ enable2ndByteCanID = false baroSensor_valueAt5 = scalar, F32, 1112, "kpa", 1, 0, 0, 450, 2 baroSensor_type = bits, U32, 1116, [0:1] "Custom", "DENSO183", "MPX4250", "INVALID" baroSensor_hwChannel = bits, U32, 1120, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5" - veLoadBins = array, F32, 1124, [16], 1, 0.0, 0, 300.0, 2 + veLoadBins = array, F32, 1124, [16], "%", 1, 0.0, 0, 300.0, 2 veRpmBins = array, F32, 1188, [16], "RPM", 1, 0.0, 0, 18000.0, 2 - afrLoadBins = array, F32, 1252, [16], 1, 0.0, 0, 300.0, 2 + afrLoadBins = array, F32, 1252, [16], "%", 1, 0.0, 0, 300.0, 2 afrRpmBins = array, F32, 1316, [16], "RPM", 1, 0.0, 0, 18000.0, 2 fuelTable = array, F32, 1380, [16x16],"ms", 1, 0, 0.0, 300.0, 2 ignitionTable = array, F32, 2404, [16x16],"deg", 1, 0, -360, 360, 2 diff --git a/java_console/ui/src/com/rusefi/ui/RecentCommands.java b/java_console/ui/src/com/rusefi/ui/RecentCommands.java index a473ae7966..fdafd29d2c 100644 --- a/java_console/ui/src/com/rusefi/ui/RecentCommands.java +++ b/java_console/ui/src/com/rusefi/ui/RecentCommands.java @@ -56,6 +56,8 @@ public class RecentCommands { add("enable self_stimulation"); add("disable self_stimulation"); + add("sparkbench 5 400 2"); + add("fuelbench 5 400 2"); add("fuelpumpbench"); add("fanbench"); add("milbench");