Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL 0269] Feature/New vehicle data ClimateData #2491

Merged
merged 17 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ local function VehicleDataItemsWithDataTableCreation()
end
end

common.VehicleDataItemsWithData.engineTorque.APItype = "VEHICLEDATA_ENGINETORQUE"
local gpsParams = common.VehicleDataItemsWithData.gps.params
gpsParams.longitudeDegrees.value = 100
gpsParams.latitudeDegrees.value = 20.5
Expand Down Expand Up @@ -137,35 +136,34 @@ local function VehicleDataItemsWithDataTableCreation()
common.VehicleDataItemsWithData.fuelRange.APItype = "VEHICLEDATA_FUELRANGE"
common.VehicleDataItemsWithData.externalTemperature.value = 24.1
common.VehicleDataItemsWithData.externalTemperature.APItype = "VEHICLEDATA_EXTERNTEMP"
local climateDataParams = common.VehicleDataItemsWithData.climateData.params
climateDataParams.externalTemperature.params.value.value = 25.5
climateDataParams.externalTemperature.params.unit.value = "CELSIUS"
climateDataParams.cabinTemperature.params.value.value = 20.5
climateDataParams.cabinTemperature.params.unit.value = "CELSIUS"
climateDataParams.atmosphericPressure.value = 1024
common.VehicleDataItemsWithData.climateData.APItype = "VEHICLEDATA_CLIMATEDATA"
common.VehicleDataItemsWithData.turnSignal.value = "OFF"
common.VehicleDataItemsWithData.turnSignal.APItype = "VEHICLEDATA_TURNSIGNAL"
common.VehicleDataItemsWithData.vin.value = "SJFHSIGD4058569"
common.VehicleDataItemsWithData.vin.APItype = "VEHICLEDATA_VIN"
common.VehicleDataItemsWithData.prndl.value = "PARK"
common.VehicleDataItemsWithData.prndl.APItype = "VEHICLEDATA_PRNDL"
if common.VehicleDataItemsWithData.handsOffSteering then
common.VehicleDataItemsWithData.handsOffSteering.value = true
common.VehicleDataItemsWithData.handsOffSteering.APItype = "VEHICLEDATA_HANDSOFFSTEERING"
end
if common.VehicleDataItemsWithData.stabilityControlsStatus then
common.VehicleDataItemsWithData.stabilityControlsStatus.value = {
escSystem = "ON" , trailerSwayControl = "OFF" }
common.VehicleDataItemsWithData.stabilityControlsStatus.APItype = "VEHICLEDATA_STABILITYCONTROLSSTATUS"
end
if common.VehicleDataItemsWithData.gearStatus then
local gearStatusParams = common.VehicleDataItemsWithData.gearStatus.params
gearStatusParams.userSelectedGear.value = "NINTH"
gearStatusParams.actualGear.value = "TENTH"
gearStatusParams.transmissionType.value = "MANUAL"
common.VehicleDataItemsWithData.gearStatus.APItype = "VEHICLEDATA_GEARSTATUS"
end
if common.VehicleDataItemsWithData.windowStatus then
common.VehicleDataItemsWithData.windowStatus.value = {
{ location = { col = 49, row = 49, level = 49, colspan = 49, rowspan = 49, levelspan = 49 },
state = { approximatePosition = 50, deviation = 50 }
}}
common.VehicleDataItemsWithData.handsOffSteering.value = true
common.VehicleDataItemsWithData.handsOffSteering.APItype = "VEHICLEDATA_HANDSOFFSTEERING"
common.VehicleDataItemsWithData.stabilityControlsStatus.value = {
escSystem = "ON" , trailerSwayControl = "OFF" }
common.VehicleDataItemsWithData.stabilityControlsStatus.APItype = "VEHICLEDATA_STABILITYCONTROLSSTATUS"
local gearStatusParams = common.VehicleDataItemsWithData.gearStatus.params
gearStatusParams.userSelectedGear.value = "NINTH"
gearStatusParams.actualGear.value = "TENTH"
gearStatusParams.transmissionType.value = "MANUAL"
common.VehicleDataItemsWithData.gearStatus.APItype = "VEHICLEDATA_GEARSTATUS"
common.VehicleDataItemsWithData.windowStatus.value = {
{ location = { col = 49, row = 49, level = 49, colspan = 49, rowspan = 49, levelspan = 49 },
state = { approximatePosition = 50, deviation = 50 }
}}
common.VehicleDataItemsWithData.windowStatus.APItype = "VEHICLEDATA_WINDOWSTATUS"
end
local tirePressureParams = common.VehicleDataItemsWithData.tirePressure.params
tirePressureParams.pressureTelltale.value = "OFF"
local leftFrontParams = tirePressureParams.leftFront.params
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 @@ -92,7 +92,8 @@ m.vd = {
stabilityControlsStatus = "VEHICLEDATA_STABILITYCONTROLSSTATUS",
gearStatus = "VEHICLEDATA_GEARSTATUS",
windowStatus = "VEHICLEDATA_WINDOWSTATUS",
seatOccupancy = "VEHICLEDATA_SEATOCCUPANCY"
seatOccupancy = "VEHICLEDATA_SEATOCCUPANCY",
climateData = "VEHICLEDATA_CLIMATEDATA"
}

m.operator = {
Expand Down