Skip to content

Commit

Permalink
[SDL 0262] Feature/New vehicle data SeatOccupancy (#2490)
Browse files Browse the repository at this point in the history
* Add seatOccupancy to existed scripts for vehicle data

* Add seatOccupancy to existed scripts for GNSD

Co-authored-by: VjKlepikov <vklepikov@luxoft.com>
  • Loading branch information
dboltovskyi and VjKlepikov authored Feb 2, 2021
1 parent d5edd84 commit b8c7ddd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ local function VehicleDataItemsWithDataTableCreation()
local myKeyParams = common.VehicleDataItemsWithData.myKey.params
myKeyParams.e911Override.value = "ON"
common.VehicleDataItemsWithData.myKey.APItype = "VEHICLEDATA_MYKEY"
local seatOccupancyParams = common.VehicleDataItemsWithData.seatOccupancy.params
seatOccupancyParams.seatsOccupied.value = {
{ seatLocation = { grid = { col = 53, row = 53, level = 53, colspan = 53, rowspan = 53, levelspan = 53 }},
conditionActive = true }}
seatOccupancyParams.seatsBelted.value = {
{ seatLocation = { grid = { col = 54, row = 54, level = 54, colspan = 54, rowspan = 54, levelspan = 54 }},
conditionActive = false }}
common.VehicleDataItemsWithData.seatOccupancy.APItype = "VEHICLEDATA_SEATOCCUPANCY"
else
utils.cprint(31, "VehicleDataItemsWithData are missed in preloaded file")
end
Expand Down
3 changes: 2 additions & 1 deletion test_scripts/API/VehicleData/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ m.vd = {
handsOffSteering = "VEHICLEDATA_HANDSOFFSTEERING",
stabilityControlsStatus = "VEHICLEDATA_STABILITYCONTROLSSTATUS",
gearStatus = "VEHICLEDATA_GEARSTATUS",
windowStatus = "VEHICLEDATA_WINDOWSTATUS"
windowStatus = "VEHICLEDATA_WINDOWSTATUS",
seatOccupancy = "VEHICLEDATA_SEATOCCUPANCY"
}

m.operator = {
Expand Down

0 comments on commit b8c7ddd

Please sign in to comment.