diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 701d03ca12..01ec4b47e9 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -472,6 +472,17 @@ static void updateVehicleSpeed() { #endif /* EFI_VEHICLE_SPEED */ } +static SensorType luaGaugeTypes[] = { + SensorType::LuaGauge1, + SensorType::LuaGauge2, + SensorType::LuaGauge3, + SensorType::LuaGauge4, + SensorType::LuaGauge5, + SensorType::LuaGauge6, + SensorType::LuaGauge7, + SensorType::LuaGauge8 + }; + static void updateRawSensors() { engine->outputChannels.rawTps1Primary = Sensor::getRaw(SensorType::Tps1Primary); engine->outputChannels.rawTps1Secondary = Sensor::getRaw(SensorType::Tps1Secondary); @@ -491,8 +502,9 @@ static void updateRawSensors() { engine->outputChannels.rawWastegatePosition = Sensor::getRaw(SensorType::WastegatePosition); engine->outputChannels.rawIdlePositionSensor = Sensor::getRaw(SensorType::IdlePosition); - engine->outputChannels.luaGauges[0] = Sensor::getOrZero(SensorType::LuaGauge1); - engine->outputChannels.luaGauges[1] = Sensor::getOrZero(SensorType::LuaGauge2); + for (size_t i = 0;ioutputChannels.luaGauges[i] = Sensor::getOrZero(luaGaugeTypes[i]); + } for (int i = 0; i < LUA_ANALOG_INPUT_COUNT; i++) { adc_channel_e channel = engineConfiguration->auxAnalogInputs[i]; diff --git a/firmware/integration/rusefi_config_shared.txt b/firmware/integration/rusefi_config_shared.txt index 50a4c85087..f595bfde90 100644 --- a/firmware/integration/rusefi_config_shared.txt +++ b/firmware/integration/rusefi_config_shared.txt @@ -36,7 +36,7 @@ #define IGN_BLEND_COUNT 4 #define VE_BLEND_COUNT 4 #define BOOST_BLEND_COUNT 2 -#define LUA_GAUGE_COUNT 2 +#define LUA_GAUGE_COUNT 8 #define GAUGE_NAME_VERSION "firmware" diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index ab964c301a..f7f7b1c706 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1372,6 +1372,12 @@ gaugeCategory = LUA luaLastCycleDurationGauge = luaLastCycleDuration,"luaLastCycleDuration", "nt", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0 luaGauges1gauge = luaGauges1, "Lua Gauge 1", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 luaGauges2gauge = luaGauges2, "Lua Gauge 2", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges3gauge = luaGauges3, "Lua Gauge 3", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges4gauge = luaGauges4, "Lua Gauge 4", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges5gauge = luaGauges5, "Lua Gauge 5", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges6gauge = luaGauges6, "Lua Gauge 6", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges7gauge = luaGauges7, "Lua Gauge 7", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 + luaGauges8gauge = luaGauges8, "Lua Gauge 8", "lua", -30000,30000, 0, 0, 30000, 30000, 3, 3 gaugeCategory = Alternator PID alternatorStatus_iTermGauge = alternatorStatus_iTerm,"Alternator PID iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3