From 0583fd0b6c749471858b644ed8034a1a5cd461e0 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 2 Dec 2019 10:03:50 -0500 Subject: [PATCH] misc clean-up --- firmware/controllers/algo/auto_generated_enums.cpp | 6 ++++++ firmware/controllers/algo/rusefi_types.h | 7 ++----- firmware/controllers/trigger/trigger_decoder.cpp | 4 ++-- unit_tests/engine_test_helper.cpp | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index d923bd1e0d..92351a84b8 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -77,6 +77,12 @@ case EFI_ADC_ERROR: return "EFI_ADC_ERROR"; case EFI_ADC_NONE: return "EFI_ADC_NONE"; +#if EFI_UNIT_TEST +case TEST_MAF_CHANNEL: +case TEST_CLT_CHANNEL: +case TEST_IAT_CHANNEL: + return "EFI_TEST"; +#endif /* EFI_UNIT_TEST */ } return NULL; } diff --git a/firmware/controllers/algo/rusefi_types.h b/firmware/controllers/algo/rusefi_types.h index 0bb964ff28..41c23f8693 100644 --- a/firmware/controllers/algo/rusefi_types.h +++ b/firmware/controllers/algo/rusefi_types.h @@ -4,8 +4,8 @@ * @date Jan 12, 2015 * @author Andrey Belomutskiy, (c) 2012-2017 */ -#ifndef CONTROLLERS_ALGO_RUSEFI_TYPES_H_ -#define CONTROLLERS_ALGO_RUSEFI_TYPES_H_ + +#pragma once #include #include @@ -90,7 +90,6 @@ typedef uint8_t iac_pid_mult_t[IAC_PID_MULT_SIZE][IAC_PID_MULT_SIZE]; typedef float baro_corr_table_t[BARO_CORR_SIZE][BARO_CORR_SIZE]; typedef float fsio_table_8x8_f32t[FSIO_TABLE_8][FSIO_TABLE_8]; -typedef uint8_t fsio_table_8x8_u8t[FSIO_TABLE_8][FSIO_TABLE_8]; typedef float tps_tps_table_t[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE]; typedef uint8_t fsio_table_8x8_u8t[FSIO_TABLE_8][FSIO_TABLE_8]; @@ -131,5 +130,3 @@ typedef void (*VoidCharPtrCharPtrVoidPtr)(const char *, const char *, void*); typedef void (*VoidCharPtrCharPtrCharPtr)(const char *, const char *, const char *); typedef void (*VoidCharPtrCharPtrCharPtrCharPtrCharPtr)(const char *, const char *, const char *, const char *, const char *); - -#endif /* CONTROLLERS_ALGO_RUSEFI_TYPES_H_ */ diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index ebeaeff561..400b52d8a7 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -453,10 +453,10 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no if (needToSkipFall(type) || needToSkipRise(type) || (!considerEventForGap())) { #if EFI_UNIT_TEST if (printTriggerDebug) { - printf("%s isLessImportant %s now=%lld index=%d\r\n", + printf("%s isLessImportant %s now=%d index=%d\r\n", getTrigger_type_e(engineConfiguration->trigger.type), getTrigger_event_e(signal), - nowNt, + (int)nowNt, currentCycle.current_index); } #endif /* EFI_UNIT_TEST */ diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index 7bc1b53137..4b05a633cc 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -181,7 +181,7 @@ void EngineTestHelper::assertEvent(const char *msg, int index, void *callback, e InjectionEvent *actualEvent = (InjectionEvent *)event->action.getArgument(); - assertEqualsLM(msg, expectedEvent->outputs[0], (long)actualEvent->outputs[0]); + assertEqualsLM(msg, (long)expectedEvent->outputs[0], (long)actualEvent->outputs[0]); // but this would not work assertEqualsLM(msg, expectedPair, (long)eventPair); }