Mark is asking for VIN number field fix #3967
This commit is contained in:
parent
83afa58baf
commit
9f8aa66a9a
|
@ -32,8 +32,9 @@ Release template (copy/paste this for new release):
|
|||
- VVT minimum RPM setting #4545
|
||||
- Flexible ignition adder/trim tables #4586
|
||||
- Enforce board configuration overrides more strictly #4614
|
||||
- Startup Frame should scan for available hardware #4633
|
||||
- rusEFI console Startup Frame should scan for available hardware #4633
|
||||
- Don't fire the engine without the ignition on (avoids USB keeping engine alive after ignition off) #4474
|
||||
- Lua: function to access VIN setting #3967
|
||||
|
||||
### Fixed
|
||||
- Fuel Priming reset fix #4627
|
||||
|
|
|
@ -28,8 +28,12 @@ using namespace luaaa;
|
|||
|
||||
static int lua_vin(lua_State* l) {
|
||||
auto zeroBasedCharIndex = luaL_checkinteger(l, 1);
|
||||
char value = engineConfiguration->vinNumber[zeroBasedCharIndex];
|
||||
lua_pushnumber(l, value);
|
||||
if (zeroBasedCharIndex < 0 || zeroBasedCharIndex > VIN_NUMBER_SIZE) {
|
||||
lua_pushnil(l);
|
||||
} else {
|
||||
char value = engineConfiguration->vinNumber[zeroBasedCharIndex];
|
||||
lua_pushnumber(l, value);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue