From 60d04b422e1510ade0a36a39bf570bae7cda36dc Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 6 Oct 2014 02:03:15 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/core/le_functions.cpp | 9 +++++++++ firmware/controllers/core/logic_expression.h | 3 +++ firmware/rusefi.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/core/le_functions.cpp b/firmware/controllers/core/le_functions.cpp index a72452bfc3..d64fbaff06 100644 --- a/firmware/controllers/core/le_functions.cpp +++ b/firmware/controllers/core/le_functions.cpp @@ -8,10 +8,13 @@ #include "main.h" #include "le_functions.h" #include "allsensors.h" +#include "rpm_calculator.h" extern LENameOrdinalPair * LE_FIRST; static LENameOrdinalPair leRpm(LE_METHOD_RPM, "rpm"); +static LENameOrdinalPair leTps(LE_METHOD_TPS, "tps"); +static LENameOrdinalPair leMaf(LE_METHOD_MAF, "maf"); static LENameOrdinalPair leFan(LE_METHOD_FAN, "fan"); static LENameOrdinalPair leCoolant(LE_METHOD_COOLANT, "coolant"); static LENameOrdinalPair leFanOnSetting(LE_METHOD_FAN_ON_SETTING, "fan_on_setting"); @@ -25,6 +28,12 @@ float getLEValue(Engine *engine, le_action_e action) { // return ; case LE_METHOD_COOLANT: return getCoolantTemperature(engine->engineConfiguration2); + case LE_METHOD_INTAKE_AIR: + return getIntakeAirTemperature(engine->engineConfiguration2); + case LE_METHOD_RPM: + return engine->rpmCalculator->rpm(); + case LE_METHOD_TIME_SINCE_BOOT: + return getTimeNowSeconds(); default: firmwareError("No value for %d", action); return NAN; diff --git a/firmware/controllers/core/logic_expression.h b/firmware/controllers/core/logic_expression.h index 603f72f45d..570136ca13 100644 --- a/firmware/controllers/core/logic_expression.h +++ b/firmware/controllers/core/logic_expression.h @@ -30,6 +30,9 @@ typedef enum { LE_METHOD_TIME_SINCE_BOOT = 103, LE_METHOD_FAN_ON_SETTING = 104, LE_METHOD_FAN_OFF_SETTING = 105, + LE_METHOD_TPS = 106, + LE_METHOD_MAF = 107, + LE_METHOD_INTAKE_AIR = 108, Force_4b_le_action = ENUM_SIZE_HACK, diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 054bfc077d..febc23c70a 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -241,5 +241,5 @@ void firmwareError(const char *fmt, ...) { } int getRusEfiVersion(void) { - return 20141005; + return 20141006; }