parent
0328c08f2b
commit
0d333248e3
|
@ -28,5 +28,8 @@ ONBOARD_MEMS_TYPE=LIS2DH12
|
|||
|
||||
include $(BOARDS_DIR)/hellen/hellen-common100.mk
|
||||
|
||||
# we do not have much Lua RAM, let's drop some fancy functions
|
||||
DDEFS += -DWITH_LUA_CONSUMPTION=FALSE
|
||||
|
||||
DDEFS += $(PRIMARY_COMMUNICATION_PORT_USART2)
|
||||
|
||||
|
|
|
@ -700,7 +700,12 @@ void configureRusefiLuaHooks(lua_State* lState) {
|
|||
lua_register(lState, "getSensor", lua_getSensorByName);
|
||||
lua_register(lState, "getSensorRaw", lua_getSensorRaw);
|
||||
lua_register(lState, "hasSensor", lua_hasSensor);
|
||||
#if EFI_VEHICLE_SPEED
|
||||
|
||||
#ifndef WITH_LUA_CONSUMPTION
|
||||
#define WITH_LUA_CONSUMPTION TRUE
|
||||
#endif
|
||||
|
||||
#if EFI_VEHICLE_SPEED && WITH_LUA_CONSUMPTION
|
||||
lua_register(lState, "getConsumedGrams", [](lua_State* l) {
|
||||
lua_pushnumber(l, engine->module<TripOdometer>()->getConsumedGrams());
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue