summaryrefslogtreecommitdiff
path: root/src/components/HMI/app/controller/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/HMI/app/controller/sdl')
-rw-r--r--src/components/HMI/app/controller/sdl/AppController.js6
-rw-r--r--src/components/HMI/app/controller/sdl/Controller.js31
-rw-r--r--src/components/HMI/app/controller/sdl/RPCController.js108
3 files changed, 110 insertions, 35 deletions
diff --git a/src/components/HMI/app/controller/sdl/AppController.js b/src/components/HMI/app/controller/sdl/AppController.js
index 8f37fa51f0..784e7e8d1c 100644
--- a/src/components/HMI/app/controller/sdl/AppController.js
+++ b/src/components/HMI/app/controller/sdl/AppController.js
@@ -107,10 +107,11 @@ SDL.SDLAppController = Em.Object.create({
*/
VRPerformAction: function (element) {
+ SDL.SDLController.vrInteractionResponse(SDL.SDLModel.resultCode["SUCCESS"], element.commandID);
+
if (SDL.SDLModel.VRActive) {
SDL.SDLModel.toggleProperty('VRActive');
}
- SDL.SDLController.vrInteractionResponse(SDL.SDLModel.resultCode["SUCCESS"], element.commandID);
},
/**
@@ -143,9 +144,6 @@ SDL.SDLAppController = Em.Object.create({
*/
onVRCommand: function (element) {
- if (SDL.SDLModel.VRActive) {
- SDL.SDLModel.toggleProperty('VRActive');
- }
FFW.VR.onCommand(element.commandID, element.appID);
},
diff --git a/src/components/HMI/app/controller/sdl/Controller.js b/src/components/HMI/app/controller/sdl/Controller.js
index a6dc92fc0d..76fbb7e059 100644
--- a/src/components/HMI/app/controller/sdl/Controller.js
+++ b/src/components/HMI/app/controller/sdl/Controller.js
@@ -55,7 +55,7 @@ SDL.SDLController = Em.Object
*/
sysContext: function() {
- if (SDL.SDLModel.VRActive) {
+ if (SDL.VRPopUp.VRActive) {
return 'VRSESSION';
}
if (SDL.AlertPopUp.active) {
@@ -78,7 +78,7 @@ SDL.SDLController = Em.Object
}.property('SDL.OptionsView.active',
'SDL.SliderView.active',
'SDL.SDLModel.AudioPassThruState',
- 'SDL.SDLModel.VRActive',
+ 'SDL.VRPopUp.VRActive',
'SDL.AlertPopUp.active',
'SDL.States.info.nonMedia.active',
'SDL.States.media.sdlmedia.active',
@@ -200,9 +200,7 @@ SDL.SDLController = Em.Object
SDL.VRHelpListView.deactivate();
}
}
- } else if (SDL.VRHelpListView.active) {
- SDL.VRHelpListView.deactivate();
- }
+ }
}.observes('SDL.SDLModel.VRActive', 'SDL.SDLModel.interactionData.vrHelp'),
/**
@@ -416,15 +414,6 @@ SDL.SDLController = Em.Object
FFW.BasicCommunication.ExitAllApplications(state);
},
/**
- * OnAwakeSDL from HMI returns SDL to normal operation
- * after OnExitAllApplications(SUSPEND)
- *
- */
- onAwakeSDLNotificationSend: function() {
- FFW.BasicCommunication.OnAwakeSDL();
- },
-
- /**
* Method to sent notification with selected reason of OnSystemRequest
*
* @param {String}
@@ -469,8 +458,6 @@ SDL.SDLController = Em.Object
if (choiceID && SDL.TTSPopUp.active && FFW.TTS.requestId == null) {
SDL.TTSPopUp.DeactivateTTS();
}
-
- SDL.SDLModel.interactionData.helpPrompt = null;
},
/**
* Method to sent notification for Alert
@@ -601,7 +588,7 @@ SDL.SDLController = Em.Object
deviceName: params.deviceName,
appType: params.appType
}));
-
+/*Uncomment to show useless add command buttons
var exitCommand = {
"id": -10,
"params": {
@@ -614,7 +601,7 @@ SDL.SDLController = Em.Object
}
};
- SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
+ SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
exitCommand = {
"id": -10,
@@ -629,6 +616,7 @@ SDL.SDLController = Em.Object
};
SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand);
+*/
},
/**
* Unregister application
@@ -653,10 +641,6 @@ SDL.SDLController = Em.Object
if (SDL.SDLModel.stateLimited == appID) {
SDL.SDLModel.set('stateLimited', null);
}
-
- if (SDL.VRHelpListView.active) {
- this.showVRHelpItems();
- }
},
/**
* SDL Driver Distraction ON/OFF switcher
@@ -751,9 +735,6 @@ SDL.SDLController = Em.Object
*/
onActivateSDLApp: function(element) {
- if (SDL.SDLModel.VRActive) {
- SDL.SDLModel.toggleProperty('VRActive');
- }
FFW.BasicCommunication.ActivateApp(element.appID);
},
/**
diff --git a/src/components/HMI/app/controller/sdl/RPCController.js b/src/components/HMI/app/controller/sdl/RPCController.js
index 27dd2ec087..d7ab4b2d01 100644
--- a/src/components/HMI/app/controller/sdl/RPCController.js
+++ b/src/components/HMI/app/controller/sdl/RPCController.js
@@ -72,21 +72,41 @@ SDL.RPCController = Em.Object
capabilitiesCheck: function(key, value) {
if (key == "imageType" && value == "STATIC") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "PRE_RECORDED") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "SAPI_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "LHPLUS_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
if (key == "type" && value == "SILENCE") {
- SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
+ SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
}
- return value;
+ },
+
+ /**
+ * Method to check supported image type in request
+ *
+ * @param {Object}
+ * array
+ */
+ checkImagesArray: function(array) {
+
+ var error = false;
+ if (array instanceof Array) {
+ for ( var i = 0; i < array.length; i++) {
+ if (array[i].image &&
+ ((array[i].image.imageType !== "DYNAMIC") &&
+ (array[i].image.imageType !== "STATIC"))) {
+
+ }
+ }
+ }
+ return error;
},
/**
@@ -1073,6 +1093,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("turnIcon" in params
&& ((params.turnIcon.imageType !== "DYNAMIC") && (params.turnIcon.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1152,6 +1183,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("turnList" in params) {
for ( var i = 0; i < params.turnList.length; i++) {
@@ -1235,6 +1277,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.alertStrings == null) {
this.resultStruct = {
@@ -1369,6 +1422,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("graphic" in params
&& ((params.graphic.imageType !== "DYNAMIC") && (params.graphic.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1870,6 +1934,16 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("vrHelp" in params) {
+ if (SDL.RPCController.checkImagesArray(params.vrHelp)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.appID == null) {
this.resultStruct = {
@@ -2204,6 +2278,17 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
+ if ("softButtons" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.softButtons)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if (params.messageText == null) {
this.resultStruct = {
@@ -2349,6 +2434,17 @@ SDL.RPCController = Em.Object
ShowVrHelp: function(params) {
if (params) {
+ if ("vrHelp" in params) {
+ if (SDL.RPCController
+ .checkImagesArray(params.vrHelp)) {
+ this.resultStruct = {
+ "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
+ "resultMessage": "Unsupported image type!"
+ };
+
+ return this.resultStruct;
+ }
+ }
if ("appID" in params) {
if (typeof params.appID != 'number') {