Lua conditional get xxx value by name for vw121 (#5439)
* VW121 config: better way to say EFI_LUA_LOOKUP=FALSE * Conditional compilation of getOutputValueByName getConfigValueByName #5434
This commit is contained in:
parent
a9afd1c7db
commit
1877cfa1dc
|
@ -14,7 +14,10 @@ DDEFS += -DFIRMWARE_ID=\"hellen121vag\" $(VAR_DEF_ENGINE_TYPE)
|
||||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||||
|
|
||||||
# Use less Flash memory for this config
|
# Use less Flash memory for this config
|
||||||
DDEFS += -DEFI_LUA_LOOKUP=FALSE
|
ifeq ($(EFI_LUA_LOOKUP),)
|
||||||
|
EFI_LUA_LOOKUP = FALSE
|
||||||
|
endif
|
||||||
|
DDEFS += -DEFI_LUA_LOOKUP=$(EFI_LUA_LOOKUP)
|
||||||
|
|
||||||
DDEFS += -DSHORT_BOARD_NAME=hellen121vag
|
DDEFS += -DSHORT_BOARD_NAME=hellen121vag
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,17 @@ ALLCPPSRC += $(LUA_DIR)/lua.cpp \
|
||||||
$(LUA_DIR)/can_filter.cpp \
|
$(LUA_DIR)/can_filter.cpp \
|
||||||
$(LUA_DIR)/lua_hooks_util.cpp \
|
$(LUA_DIR)/lua_hooks_util.cpp \
|
||||||
$(LUA_DIR)/script_impl.cpp \
|
$(LUA_DIR)/script_impl.cpp \
|
||||||
$(LUA_DIR)/generated/output_lookup_generated.cpp \
|
|
||||||
$(LUA_DIR)/generated/value_lookup_generated.cpp \
|
|
||||||
$(LUA_DIR)/lua_can_rx.cpp \
|
$(LUA_DIR)/lua_can_rx.cpp \
|
||||||
|
|
||||||
|
ifeq ($(EFI_LUA_LOOKUP), FALSE)
|
||||||
|
ALLCPPSRC += $(LUA_DIR)/value_lookup_stubs.cpp \
|
||||||
|
|
||||||
|
else
|
||||||
|
ALLCPPSRC += $(LUA_DIR)/generated/output_lookup_generated.cpp \
|
||||||
|
$(LUA_DIR)/generated/value_lookup_generated.cpp \
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
ALLINC += $(LUA_DIR) $(LUA_DIR)/luaaa $(LUA_EXT)
|
ALLINC += $(LUA_DIR) $(LUA_DIR)/luaaa $(LUA_EXT)
|
||||||
ALLCSRC += \
|
ALLCSRC += \
|
||||||
$(LUA_EXT)/lapi.c \
|
$(LUA_EXT)/lapi.c \
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* @file value_lookup_stubs.cpp
|
||||||
|
* @brief These stubs are used to reduce the Flash amount used for some configs
|
||||||
|
*
|
||||||
|
* @date Jul 23, 2023
|
||||||
|
* @author andreika <prometheus.pcb@gmail.com>
|
||||||
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pch.h"
|
||||||
|
#include "value_lookup.h"
|
||||||
|
|
||||||
|
float getOutputValueByName(const char * /*name*/) {
|
||||||
|
return EFI_ERROR_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
float getConfigValueByName(const char * /*name*/) {
|
||||||
|
return EFI_ERROR_CODE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool setConfigValueByName(const char * /*name*/, float /*value*/) {
|
||||||
|
return false;
|
||||||
|
}
|
Loading…
Reference in New Issue