Skip to content

Commit

Permalink
only get outputs in non-test land
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jul 2, 2023
1 parent cef8b61 commit 588ad5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions firmware/controllers/lua/lua_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,12 +808,14 @@ void configureRusefiLuaHooks(lua_State* l) {
return 1;
});

#if EFI_PROD_CODE || EFI_SIMULATOR
lua_register(l, "getOutput", [](lua_State* l) {
auto propertyName = luaL_checklstring(l, 1, nullptr);
auto result = getOutputValueByName(propertyName);
lua_pushnumber(l, result);
return 1;
});
#endif // EFI_PROD_CODE || EFI_SIMULATOR

#if EFI_SHAFT_POSITION_INPUT
lua_register(l, "getEngineState", [](lua_State* l) {
Expand Down

0 comments on commit 588ad5c

Please sign in to comment.