reduce flash footprint by smarter code generation #4163
a bit of unit tests drama
This commit is contained in:
parent
6b3e028ba8
commit
aa87eb681c
|
@ -51,4 +51,13 @@ void configureRusefiLuaUtilHooks(lua_State* l) {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void * hackEngineConfigurationPointer(void *ptr) {
|
||||||
|
// we know that 'engineConfiguration' was null at the time of initialization in unit tests
|
||||||
|
#if EFI_UNIT_TEST
|
||||||
|
intptr_t offset = (intptr_t)ptr;
|
||||||
|
void * valuePtr = (void *)engineConfiguration + offset;
|
||||||
|
return valuePtr;
|
||||||
|
#else
|
||||||
|
return ptr;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -27,3 +27,5 @@ plain_get_float_s * findFloat(const char *name);
|
||||||
float getConfigValueByName(const char *name);
|
float getConfigValueByName(const char *name);
|
||||||
void setConfigValueByName(const char *name, float value);
|
void setConfigValueByName(const char *name, float value);
|
||||||
float getOutputValueByName(const char *name);
|
float getOutputValueByName(const char *name);
|
||||||
|
|
||||||
|
void * hackEngineConfigurationPointer(void *ptr);
|
||||||
|
|
Loading…
Reference in New Issue