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

Add possibility to specify non-mandatory timeout, length and offset params #78

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
5 changes: 3 additions & 2 deletions app/controller/NavigationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SDL.NavigationController = Em.Object.create(
* @param {Object} request
*/
sendLocation: function(request) {
this.model.push(
this.model.LocationDetails.push(
{
coordinate: {
latitudeDegrees: request.params.latitudeDegrees,
Expand Down Expand Up @@ -109,7 +109,8 @@ SDL.NavigationController = Em.Object.create(
FFW.Navigation.wayPointSend(
SDL.SDLModel.data.resultCode.SUCCESS,
SDL.NavigationModel.LocationDetails,
request.id
request.id,
request.params.appID
);
SDL.NavigationModel.appReqPull.splice(
SDL.NavigationModel.appReqPull.indexOf(request.params.appID), 1
Expand Down
21 changes: 6 additions & 15 deletions app/controller/SettingsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,21 +341,12 @@ SDL.SettingsController = Em.Object.create(
1000;
SDL.SDLModel.data.policyUpdateRetry.timer = setTimeout(
function() {
if(FLAGS.ExternalPolicies === true) {
FFW.ExternalPolicies.pack({
type: 'PROPRIETARY',
policyUpdateFile: SDL.SettingsController.policyUpdateFile,
url: SDL.SDLModel.data.policyURLs[0].url,
appID: SDL.SDLModel.data.policyURLs[0].appID
})
} else {
FFW.BasicCommunication.OnSystemRequest(
'PROPRIETARY',
SDL.SettingsController.policyUpdateFile,
SDL.SDLModel.data.policyURLs[0].url,
SDL.SDLModel.data.policyURLs[0].appID
);
}
FFW.BasicCommunication.OnSystemRequest(
'PROPRIETARY',
SDL.SettingsController.policyUpdateFile,
SDL.SDLModel.data.policyURLs[0].url,
SDL.SDLModel.data.policyURLs[0].appID
);
SDL.SettingsController.policyUpdateRetry();
}, SDL.SDLModel.data.policyUpdateRetry.oldTimer
);
Expand Down
39 changes: 39 additions & 0 deletions app/controller/sdl/RPCController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,39 @@ SDL.RPCController = Em.Object.create(
};
return this.resultStruct;
},
/**
* Validate method for request SetGlobalProperties
*
* @param {Object}
* params
*/
SetGlobalProperties: function(params) {
if (params == null) {
this.resultStruct = {
'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA,
'resultMessage': 'Parameter \'params\' does not exists!'
};
return this.resultStruct;
}
if (params.appID == null) {
this.resultStruct = {
'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA,
'resultMessage': 'Parameter \'appID\' does not exists!'
};
return this.resultStruct;
}
if (typeof params.appID != 'number') {
this.resultStruct = {
'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA,
'resultMessage': 'Wrong type of parameter \'appID\'!'
};
return this.resultStruct;
}
this.resultStruct = {
'resultCode': SDL.SDLModel.data.resultCode.SUCCESS
};
return this.resultStruct;
},
/**
* Validate method for request IsReady
*
Expand Down Expand Up @@ -1229,6 +1262,12 @@ SDL.RPCController = Em.Object.create(
return this.resultStruct;
}
},
SendHapticData: function(params) {
this.resultStruct = {
'resultCode': SDL.SDLModel.data.resultCode.SUCCESS
};
return this.resultStruct;
},
/**
* Validate method for request Show
*
Expand Down
12 changes: 6 additions & 6 deletions app/model/NavigationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ SDL.NavigationModel = Em.Object.create({
longitudeDegrees: 0
},
locationName: 'locationName',
addressLines: 'addressLines',
addressLines: ['addressLines'],
locationDescription: 'locationDescription',
phoneNumber: 'phoneNumber',
locationImage: {
value: '',
value: 'images/common/defaultButtonImage.png',
imageType: 'DYNAMIC'
},
searchAddress: {
Expand All @@ -102,7 +102,7 @@ SDL.NavigationModel = Em.Object.create({
longitudeDegrees: 0
},
locationName: 'locationName',
addressLines: 'addressLines',
addressLines: ['addressLines'],
locationDescription: 'locationDescription',
phoneNumber: 'phoneNumber',
locationImage: {
Expand All @@ -127,11 +127,11 @@ SDL.NavigationModel = Em.Object.create({
longitudeDegrees: 0
},
locationName: 'locationName',
addressLines: 'addressLines',
addressLines: ['addressLines'],
locationDescription: 'locationDescription',
phoneNumber: 'phoneNumber',
locationImage: {
value: '',
value: 'images/common/defaultButtonImage.png',
imageType: 'DYNAMIC'
},
searchAddress: {
Expand All @@ -152,7 +152,7 @@ SDL.NavigationModel = Em.Object.create({
longitudeDegrees: 0
},
locationName: 'locationName',
addressLines: 'addressLines',
addressLines: ['addressLines'],
locationDescription: 'locationDescription',
phoneNumber: 'phoneNumber',
locationImage: {
Expand Down
5 changes: 5 additions & 0 deletions app/model/sdl/Abstract/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,13 @@ SDL.SDLModelData = Em.Object.create(
{
name: 'FOTA',
id: 19
},
{
name: 'OEM_SPECIFIC',
id: 20
}
],

/**
* Data for AudioPassThruPopUp that contains params for visualisation
*
Expand Down
10 changes: 7 additions & 3 deletions app/model/sdl/VehicleInfoModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,18 @@ SDL.SDLVehicleInfoModel = Em.Object.create(
var data = {};
text = 'Params ', result = true;
for (var key in message.params) {
oldKey = key;
if (key === 'clusterModeStatus') {
key = 'clusterModes';
}
if (key != 'appID') {
if (this.vehicleData[key]) {
data[key] = this.vehicleData[key];
data[oldKey] = this.vehicleData[key];
} else {
if (!result) {
text += ', ' + key;
text += ', ' + oldKey;
} else {
text += key;
text += oldKey;
result = false;
}
}
Expand Down
Loading