From da3d616a7e9b4c53aefeaf2dcb3bdec953e89c61 Mon Sep 17 00:00:00 2001 From: GitHub set-date Action Date: Tue, 21 Jul 2020 00:31:28 +0000 Subject: [PATCH 1/2] Update date --- firmware/controllers/date_stamp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/date_stamp.h b/firmware/controllers/date_stamp.h index 77b68fcb19..2164403897 100644 --- a/firmware/controllers/date_stamp.h +++ b/firmware/controllers/date_stamp.h @@ -1,2 +1,2 @@ #pragma once -#define VCS_DATE 20200720 +#define VCS_DATE 20200721 From 48cc155144c122cf8973172fe8a5d2940b816e7a Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 20 Jul 2020 21:20:58 -0400 Subject: [PATCH 2/2] changing crazy in composite logger --- .../engine_cycle/main_trigger_callback.cpp | 43 ++++++------------- firmware/controllers/system/efi_gpio.h | 4 +- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index 4918b79343..6624edd32a 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -71,15 +71,12 @@ static Logging *logger; //#endif void startSimultaniousInjection(Engine *engine) { -#if EFI_TOOTH_LOGGER - efitick_t nowNt = getTimeNowNt(); #if EFI_UNIT_TEST EXPAND_Engine; #endif // EFI_UNIT_TEST - LogTriggerInjectorState(nowNt, true PASS_ENGINE_PARAMETER_SUFFIX); -#endif // EFI_TOOTH_LOGGER + efitick_t nowNt = getTimeNowNt(); for (int i = 0; i < engine->engineConfigurationPtr->specs.cylindersCount; i++) { - enginePins.injectors[i].open(); + enginePins.injectors[i].open(nowNt PASS_ENGINE_PARAMETER_SUFFIX); } } @@ -87,13 +84,9 @@ static void endSimultaniousInjectionOnlyTogglePins(Engine *engine) { #if EFI_UNIT_TEST EXPAND_Engine; #endif - -#if EFI_TOOTH_LOGGER efitick_t nowNt = getTimeNowNt(); - LogTriggerInjectorState(nowNt, false PASS_ENGINE_PARAMETER_SUFFIX); -#endif // EFI_TOOTH_LOGGER for (int i = 0; i < engine->engineConfigurationPtr->specs.cylindersCount; i++) { - enginePins.injectors[i].close(); + enginePins.injectors[i].close(nowNt PASS_ENGINE_PARAMETER_SUFFIX); } } @@ -103,16 +96,11 @@ void endSimultaniousInjection(InjectionEvent *event) { EXPAND_Engine; #endif event->isScheduled = false; -#if EFI_TOOTH_LOGGER - efitick_t nowNt = getTimeNowNt(); - LogTriggerInjectorState(nowNt, false PASS_ENGINE_PARAMETER_SUFFIX); -#endif // EFI_TOOTH_LOGGER - endSimultaniousInjectionOnlyTogglePins(engine); engine->injectionEvents.addFuelEventsForCylinder(event->ownIndex PASS_ENGINE_PARAMETER_SUFFIX); } -void InjectorOutputPin::open() { +void InjectorOutputPin::open(efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) { overlappingCounter++; #if FUEL_MATH_EXTREME_LOGGING @@ -132,31 +120,29 @@ void InjectorOutputPin::open() { } #endif /* FUEL_MATH_EXTREME_LOGGING */ } else { +#if EFI_TOOTH_LOGGER + LogTriggerInjectorState(nowNt, true PASS_ENGINE_PARAMETER_SUFFIX); +#endif // EFI_TOOTH_LOGGER setHigh(); } } void turnInjectionPinHigh(InjectionEvent *event) { - -#if EFI_TOOTH_LOGGER - efitick_t nowNt = getTimeNowNt(); #if EFI_UNIT_TEST Engine *engine = event->engine; EXPAND_Engine; #endif // EFI_UNIT_TEST - LogTriggerInjectorState(nowNt, true PASS_ENGINE_PARAMETER_SUFFIX); -#endif // EFI_TOOTH_LOGGER - + efitick_t nowNt = getTimeNowNt(); for (int i = 0;i < MAX_WIRES_COUNT;i++) { InjectorOutputPin *output = event->outputs[i]; if (output) { - output->open(); + output->open(nowNt PASS_ENGINE_PARAMETER_SUFFIX); } } } -void InjectorOutputPin::close() { +void InjectorOutputPin::close(efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) { #if FUEL_MATH_EXTREME_LOGGING if (printFuelDebug) { printf("InjectorOutputPin::close %s %d %d\r\n", name, overlappingCounter, (int)getTimeNowUs()); @@ -171,6 +157,9 @@ void InjectorOutputPin::close() { } #endif /* FUEL_MATH_EXTREME_LOGGING */ } else { +#if EFI_TOOTH_LOGGER + LogTriggerInjectorState(nowNt, false PASS_ENGINE_PARAMETER_SUFFIX); +#endif // EFI_TOOTH_LOGGER setLow(); } } @@ -183,15 +172,11 @@ void turnInjectionPinLow(InjectionEvent *event) { EXPAND_Engine; #endif -#if EFI_TOOTH_LOGGER - LogTriggerInjectorState(nowNt, false PASS_ENGINE_PARAMETER_SUFFIX); -#endif // EFI_TOOTH_LOGGER - event->isScheduled = false; for (int i = 0;ioutputs[i]; if (output) { - output->close(); + output->close(nowNt PASS_ENGINE_PARAMETER_SUFFIX); } } ENGINE(injectionEvents.addFuelEventsForCylinder(event->ownIndex PASS_ENGINE_PARAMETER_SUFFIX)); diff --git a/firmware/controllers/system/efi_gpio.h b/firmware/controllers/system/efi_gpio.h index 6bbe0d1034..80855001d2 100644 --- a/firmware/controllers/system/efi_gpio.h +++ b/firmware/controllers/system/efi_gpio.h @@ -108,8 +108,8 @@ public: InjectorOutputPin(); void reset(); - void open(); - void close(); + void open(efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX); + void close(efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX); int8_t getOverlappingCounter() const { return overlappingCounter; }