Something something Automatic Compression Release #3442
This commit is contained in:
parent
5c99178eeb
commit
88dcab9cd6
|
@ -533,6 +533,16 @@ void configureRusefiLuaHooks(lua_State* l) {
|
|||
lua_register(l, "setFuelAdd", lua_setFuelAdd);
|
||||
lua_register(l, "setFuelMult", lua_setFuelMult);
|
||||
|
||||
lua_register(l, "getTimeSinceTriggerEventMs", [](lua_State* l) {
|
||||
#if EFI_UNIT_TEST
|
||||
Engine *engine = engineForLuaUnitTests;
|
||||
EXPAND_Engine;
|
||||
#endif
|
||||
int result = currentTimeMillis() - engine->triggerActivityMs;
|
||||
lua_pushnumber(l, result);
|
||||
return 1;
|
||||
});
|
||||
|
||||
#if EFI_CAN_SUPPORT
|
||||
lua_register(l, "canRxAdd", lua_canRxAdd);
|
||||
#endif // EFI_CAN_SUPPORT
|
||||
|
|
|
@ -33,6 +33,14 @@ static int lua_interpolate(lua_State* l) {
|
|||
void configureRusefiLuaUtilHooks(lua_State* l) {
|
||||
lua_register(l, "print", lua_efi_print);
|
||||
lua_register(l, "interpolate", lua_interpolate);
|
||||
/*
|
||||
* todo: shall we? same for milliseconds?
|
||||
lua_register(l, "getNowSeconds", [](lua_State* l) -> int {
|
||||
int result = getTimeNowSeconds();
|
||||
lua_pushnumber(l, result);
|
||||
return 1;
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue