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
|
- VVT minimum RPM setting #4545
|
||||||
- Flexible ignition adder/trim tables #4586
|
- Flexible ignition adder/trim tables #4586
|
||||||
- Enforce board configuration overrides more strictly #4614
|
- 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
|
- 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
|
### Fixed
|
||||||
- Fuel Priming reset fix #4627
|
- Fuel Priming reset fix #4627
|
||||||
|
|
|
@ -28,8 +28,12 @@ using namespace luaaa;
|
||||||
|
|
||||||
static int lua_vin(lua_State* l) {
|
static int lua_vin(lua_State* l) {
|
||||||
auto zeroBasedCharIndex = luaL_checkinteger(l, 1);
|
auto zeroBasedCharIndex = luaL_checkinteger(l, 1);
|
||||||
char value = engineConfiguration->vinNumber[zeroBasedCharIndex];
|
if (zeroBasedCharIndex < 0 || zeroBasedCharIndex > VIN_NUMBER_SIZE) {
|
||||||
lua_pushnumber(l, value);
|
lua_pushnil(l);
|
||||||
|
} else {
|
||||||
|
char value = engineConfiguration->vinNumber[zeroBasedCharIndex];
|
||||||
|
lua_pushnumber(l, value);
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue