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

[Internal] GPS Shift support #2141

Conversation

TMyza
Copy link
Contributor

@TMyza TMyza commented Nov 8, 2018

ATF Test Scripts to check #2639

This PR is not ready for review.

Summary

Adding-GPS-Shift-support

CLA

@TMyza TMyza changed the title Script 1-2 GPS Shift for review GPS Shift for review Nov 8, 2018
@@ -0,0 +1,44 @@
---------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0192-button_subscription_response_from_hmi.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong proposal link

-- 2) SDL transfers this request to HMI
-- 3) HMI sends "shifted" item (boolean) in "gps" parameter (Common.GPSData) of GetVehicleData response
-- SDL does:
-- 1) Sends GetVehicleData response to mobile with "shifted" item in "gps" parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Send

runner.testSettings.isSelfIncluded = false

--[[ Local Functions ]]
local function pTUpdateFunc(tbl)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function will be used not in one script, so can be defined in common

-- In case:
-- 1) Mobile sends GetVehicleData(gps(shifted=true/false)) request
-- 2) SDL transfers this request to HMI
-- 3) HMI sends "shifted" item (boolean) in "gps" parameter (Common.GPSData) of GetVehicleData response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t think that (Common.GPSData) is redundant info

--
-- Description:
-- In case:
-- 1) Mobile sends GetVehicleData(gps(shifted=true/false)) request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear for me the struct GetVehicleData(gps(shifted=true/false)). in GetVehicleData is defined only gps, so (gps(shifted=true/false)) can mislead the reader.

altitude = 7.7,
heading = 173.99,
speed = 2.78,
shifted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to define empty shifted, please remove

@@ -0,0 +1,46 @@
---------------------------------------------------------------------------------------------------
-- Proposal:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update script according to comments in 001 script

@dboltovskyi dboltovskyi changed the title GPS Shift for review [WIP] GPS Shift support Nov 12, 2018
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("Register App", common.registerAppWOPTU)
runner.Step("Activate App", common.activateApp)
runner.Step("Subscribe on InteriorVehicleData, RADIO module", common.getInteriorVehicleData, { _,true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza _ can't be used as a parameter. Use nil instead.

:Do(function(_, data)
m.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { gps = m.gpsParams })
end)
m.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", gps = m.gpsParams })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza In case of missing shifted parameter we have to check explicitly that it's not transferred to mobile

moduleData = m.radioData
})
:ValidIf(function(_, data)
return m.checkShifted(data.payload.moduleData.shifted, pShiftValue)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza Please check if data.payload.moduleData.shifted is a correct path for shifted parameter

@dboltovskyi dboltovskyi merged commit 4ac2d10 into smartdevicelink:feature/gps_shift_support Nov 12, 2018
@dboltovskyi dboltovskyi changed the title [WIP] GPS Shift support [Internal] GPS Shift support Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants