From 1fa9851ae9de63415f7384562cb18c9f76fccf71 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 7 Jul 2016 23:01:43 -0400 Subject: [PATCH] auto-sync --- firmware/console/status_loop.cpp | 6 +++--- firmware/controllers/core/fsio_core.h | 1 + firmware/controllers/core/fsio_impl.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 5ce1c8e380..2d2d9fea3b 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -162,11 +162,11 @@ static void printSensors(Logging *log, bool fileFormat) { #endif if (hasMafSensor()) { - reportSensorF(log, fileFormat, "maf", "V", getMaf(), 2); - reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(), 2); + reportSensorF(log, fileFormat, "maf", "V", getMaf(PASS_ENGINE_PARAMETER_F), 2); + reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(PASS_ENGINE_PARAMETER_F), 2); } - reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", getEngineLoadT(), 2); + reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", getEngineLoadT(PASS_ENGINE_PARAMETER_F), 2); diff --git a/firmware/controllers/core/fsio_core.h b/firmware/controllers/core/fsio_core.h index c3922372e5..58132068a4 100644 --- a/firmware/controllers/core/fsio_core.h +++ b/firmware/controllers/core/fsio_core.h @@ -48,6 +48,7 @@ typedef enum { LE_METHOD_KNOCK = 112, LE_METHOD_FSIO_TABLE = 113, LE_METHOD_SELF = 114, + LE_METHOD_MAP = 115, Force_4b_le_action = ENUM_32_BITS, diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index 889d4f60df..8a74bdf01e 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -29,6 +29,7 @@ fsio8_Map3D_u8t fsioTable4("fsio#4"); static LENameOrdinalPair leRpm(LE_METHOD_RPM, "rpm"); static LENameOrdinalPair leTps(LE_METHOD_TPS, "tps"); static LENameOrdinalPair leMaf(LE_METHOD_MAF, "maf"); +static LENameOrdinalPair leMap(LE_METHOD_MAP, "map"); static LENameOrdinalPair leVBatt(LE_METHOD_VBATT, "vbatt"); static LENameOrdinalPair leFan(LE_METHOD_FAN, "fan"); static LENameOrdinalPair leCoolant(LE_METHOD_COOLANT, "coolant"); @@ -83,6 +84,10 @@ float getLEValue(Engine *engine, calc_stack_t *s, le_action_e action) { return getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F); case LE_METHOD_RPM: return engine->rpmCalculator.getRpm(); + case LE_METHOD_MAF: + return getMaf(PASS_ENGINE_PARAMETER_F); + case LE_METHOD_MAP: + return getMap(); case LE_METHOD_TIME_SINCE_BOOT: return getTimeNowSeconds(); case LE_METHOD_FAN_OFF_SETTING: @@ -358,7 +363,7 @@ static void showFsioInfo(void) { * in case of FSIO user interface indexes are starting with 0, the argument for that * is the fact that the target audience is more software developers */ - scheduleMsg(logger, "FSIO #%d [%s] at %s@%dHz value=%f", i, exp, + scheduleMsg(logger, "FSIO #%d [%s] at %s@%dHz value=%f", (i + 1), exp, hwPortname(boardConfiguration->fsioPins[i]), boardConfiguration->fsioFrequency[i], engineConfiguration2->fsioLastValue[i]); // scheduleMsg(logger, "user-defined #%d value=%f", i, engine->engineConfiguration2->fsioLastValue[i]);