From e8bcf314d3c5bf4ac0594fd0907556a9333fe660 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sun, 5 Oct 2014 13:03:00 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/core/core.mk | 2 +- firmware/controllers/core/le_functions.cpp | 23 +++++++++++++++++++ firmware/controllers/core/le_functions.h | 16 +++++++++++++ .../controllers/core/logic_expression.cpp | 7 +----- firmware/controllers/core/logic_expression.h | 2 -- 5 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 firmware/controllers/core/le_functions.cpp create mode 100644 firmware/controllers/core/le_functions.h diff --git a/firmware/controllers/core/core.mk b/firmware/controllers/core/core.mk index e220c5e2b8..3186186cb5 100644 --- a/firmware/controllers/core/core.mk +++ b/firmware/controllers/core/core.mk @@ -5,4 +5,4 @@ CONTROLLERS_CORE_SRC_CPP = $(PROJECT_DIR)/controllers/core/EfiWave.cpp \ $(PROJECT_DIR)/controllers/core/table_helper.cpp \ $(PROJECT_DIR)/controllers/core/logic_expression.cpp \ $(PROJECT_DIR)/controllers/core/interpolation.cpp \ - + $(PROJECT_DIR)/controllers/core/le_functions.cpp diff --git a/firmware/controllers/core/le_functions.cpp b/firmware/controllers/core/le_functions.cpp new file mode 100644 index 0000000000..d4b45f49a9 --- /dev/null +++ b/firmware/controllers/core/le_functions.cpp @@ -0,0 +1,23 @@ +/** + * @file le_functions.cpp + * + * @date Oct 5, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#include "main.h" +#include "le_functions.h" +#include "allsensors.h" + +#if EFI_PROD_CODE || EFI_SIMULATOR +float getLEValue(Engine *engine, le_action_e action) { + switch(action) { +// case LE_METHOD_FAN: + // return ; + case LE_METHOD_COOLANT: + return getCoolantTemperature(engine->engineConfiguration2); + default: + firmwareError("No value for %d", action); + } +} +#endif diff --git a/firmware/controllers/core/le_functions.h b/firmware/controllers/core/le_functions.h new file mode 100644 index 0000000000..cc383cdbc7 --- /dev/null +++ b/firmware/controllers/core/le_functions.h @@ -0,0 +1,16 @@ +/** + * @file le_functions.h + * + * @date Oct 5, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#ifndef LE_FUNCTIONS_H_ +#define LE_FUNCTIONS_H_ + +#include "engine.h" +#include "logic_expression.h" + +float getLEValue(Engine *engine, le_action_e action); + +#endif /* LE_FUNCTIONS_H_ */ diff --git a/firmware/controllers/core/logic_expression.cpp b/firmware/controllers/core/logic_expression.cpp index 0e89d684b9..34ffa8bb42 100644 --- a/firmware/controllers/core/logic_expression.cpp +++ b/firmware/controllers/core/logic_expression.cpp @@ -7,6 +7,7 @@ #include "main.h" #include "logic_expression.h" +#include "le_functions.h" LENameOrdinalPair * LE_FIRST = NULL; @@ -244,9 +245,3 @@ LEElement * parseExpression(LEElementPool *pool, const char * line) { } return first; } - -#if EFI_PROD_CODE || EFI_SIMULATOR -float getLEValue(Engine *engine, le_action_e action) { - return NAN; -} -#endif diff --git a/firmware/controllers/core/logic_expression.h b/firmware/controllers/core/logic_expression.h index ec7700d9e3..603f72f45d 100644 --- a/firmware/controllers/core/logic_expression.h +++ b/firmware/controllers/core/logic_expression.h @@ -91,6 +91,4 @@ bool isNumeric(const char* line); le_action_e parseAction(const char * line); LEElement * parseExpression(LEElementPool *pool, const char * line); -float getLEValue(Engine *engine, le_action_e action); - #endif /* LOGIC_EXPRESSION_H_ */