diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 25a904012a..aae8feec8c 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -32,6 +32,9 @@ EXTERN_ENGINE ; +#if EFI_UNIT_TEST +extern bool verboseMode; +#endif /* EFI_UNIT_TEST */ floatms_t getEngineCycleDuration(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { return getCrankshaftRevolutionTimeMs(rpm) * (engine->getOperationMode(PASS_ENGINE_PARAMETER_SIGNATURE) == TWO_STROKE ? 1 : 2); @@ -488,8 +491,10 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } #if EFI_UNIT_TEST - printf("prepareOutputSignals %d onlyEdge=%s %s\r\n", engineConfiguration->trigger.type, boolToString(engineConfiguration->useOnlyRisingEdgeForTrigger), - getIgnition_mode_e(engineConfiguration->ignitionMode)); + if (verboseMode) { + printf("prepareOutputSignals %d onlyEdge=%s %s\r\n", engineConfiguration->trigger.type, boolToString(engineConfiguration->useOnlyRisingEdgeForTrigger), + getIgnition_mode_e(engineConfiguration->ignitionMode)); + } #endif /* EFI_UNIT_TEST */ for (int i = 0; i < CONFIG(specs.cylindersCount); i++) { diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 52051e9ed9..46cd6528ba 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -446,7 +446,7 @@ void printAllTriggers() { fprintf(fp, "# This file is used by TriggerImage tool\n"); fprintf(fp, "# See 'gen_trigger_images.bat'\n"); - printTriggerDebug = true; + //printTriggerDebug = true; for (int triggerId = 1; triggerId < TT_UNUSED; triggerId++) { trigger_type_e tt = (trigger_type_e) triggerId; diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 122e1645b7..7ff879a540 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -41,12 +41,13 @@ int getRevolutionCounter(void) { } extern bool printTriggerDebug; +bool verboseMode = false; GTEST_API_ int main(int argc, char **argv) { // printTriggerDebug = true; // resizeMap(); - printf("Success 20190808\r\n"); + printf("Success 20190824\r\n"); printAllTriggers(); // printConvertedTable(); testing::InitGoogleTest(&argc, argv); @@ -68,9 +69,11 @@ void initLogging(LoggingWithStorage *logging, const char *name) { } void scheduleMsg(Logging *logging, const char *format, ...) { - va_list ap; - va_start(ap, format); - vprintf(format, ap); - va_end(ap); - printf("\r\n"); + if (verboseMode) { + va_list ap; + va_start(ap, format); + vprintf(format, ap); + va_end(ap); + printf("\r\n"); + } }