diff options
Diffstat (limited to 'src/components/HMI/app')
28 files changed, 416 insertions, 235 deletions
diff --git a/src/components/HMI/app/AppViews.js b/src/components/HMI/app/AppViews.js index 19f1b4879a..ec31c13399 100644 --- a/src/components/HMI/app/AppViews.js +++ b/src/components/HMI/app/AppViews.js @@ -37,9 +37,15 @@ SDL.AppViews = Em.ContainerView.extend( { elementId: 'app',
childViews: [
+ SDL.HomeView,
SDL.MediaView,
+ SDL.NavigationAppView,
SDL.InfoView,
+ SDL.PhoneView,
+ SDL.ClimateView,
+ SDL.NavigationView,
SDL.ControlButtons,
+ SDL.SettingsView,
SDL.TurnByTurnView,
SDL.TBTTurnList,
SDL.OptionsView,
@@ -48,7 +54,12 @@ SDL.AppViews = Em.ContainerView.extend( { SDL.VRHelpListView,
SDL.ScrollableMessage,
SDL.SliderView,
+ SDL.StatusClimateView,
+ SDL.StatusMediaView,
+ SDL.StatusNavigationView,
SDL.StatusInfoView,
+ SDL.StatusPhoneView,
+ SDL.TopControls,
SDL.BottomControls,
SDL.TTSPopUp,
SDL.AlertPopUp,
diff --git a/src/components/HMI/app/SDLApp.js b/src/components/HMI/app/SDLApp.js index c1f40ad588..bbe4644008 100644 --- a/src/components/HMI/app/SDLApp.js +++ b/src/components/HMI/app/SDLApp.js @@ -48,7 +48,7 @@ SDL = Em.Application.create( { helpMode: false,
// determine home view {string}
- homeView: 'info_view',
+ homeView: 'home',
/** Set language for localization */
localization: 'eng',
@@ -77,4 +77,4 @@ SDL = Em.Application.create( { /** container for all views */
SDL.views = SDL.AppViews.create().appendTo('body');
}
-});
+});
\ No newline at end of file diff --git a/src/components/HMI/app/controller/SettingsController.js b/src/components/HMI/app/controller/SettingsController.js index a9a5d1a004..d40d5827d9 100644 --- a/src/components/HMI/app/controller/SettingsController.js +++ b/src/components/HMI/app/controller/SettingsController.js @@ -206,9 +206,13 @@ SDL.SettingsController = Em.Object.create( { * @param {Object} message
*
*/
- permissionsFriendlyMessageUpdate: function(message, appID) {
+ permissionsFriendlyMessageUpdate: function(message) {
+
+
+ SDL.SettingsController.simpleParseUserFriendlyMessageData(message);
SDL.States.goToStates('settings.policies.appPermissions');
+
},
updateSDL: function() {
@@ -221,34 +225,23 @@ SDL.SettingsController = Em.Object.create( { AllowSDLFunctionality: function(messages) {
- var str = '';
-
- if (messages[0].line1) {
- str += messages[0].line1;
- }
-
- if (messages[0].line2) {
- str += messages[0].line2;
- }
-
- if (messages[0].textBody) {
- str += messages[0].textBody;
- }
-
- if (str) {
- SDL.PopUp.create().appendTo('body').popupActivate(messages[0].textBody, SDL.SettingsController.OnAllowSDLFunctionality);
+ if (messages.length > 0) {
+ SDL.SettingsController.simpleParseUserFriendlyMessageData(messages, SDL.SettingsController.OnAllowSDLFunctionality);
} else {
- SDL.PopUp.create().appendTo('body').popupActivate('WARNING!!!!!!!!!!!!!! There is no text from SDL in GetUserFriendlyMessage for DataConsent parameter!!! Please allow the device...', SDL.SettingsController.OnAllowSDLFunctionality);
+ SDL.PopUp.create().appendTo('body').popupActivate(
+ 'WARNING!!!!!!!!!!!!!! '
+ + 'There is no text from SDL in GetUserFriendlyMessage for DataConsent parameter!!! Please allow the device...',
+ SDL.SettingsController.OnAllowSDLFunctionality);
}
},
userFriendlyMessagePopUp: function(appId, messageCode) {
- FFW.BasicCommunication.GetUserFriendlyMessage(function(message){SDL.PopUp.create().appendTo('body').popupActivate(message)}, appId, messageCode);
+ FFW.BasicCommunication.GetUserFriendlyMessage(SDL.SettingsController.simpleParseUserFriendlyMessageData, appId, messageCode);
},
- simpleParseUserFriendlyMessageData: function (messages) {
+ simpleParseUserFriendlyMessageData: function (messages, func) {
var tts = "",
text = "";
@@ -273,7 +266,7 @@ SDL.SettingsController = Em.Object.create( { if (text) {
- SDL.PopUp.create().appendTo('body').popupActivate(text);
+ SDL.PopUp.create().appendTo('body').popupActivate(text, func);
}
},
diff --git a/src/components/HMI/app/controller/sdl/AppController.js b/src/components/HMI/app/controller/sdl/AppController.js index 784e7e8d1c..9e0101dd03 100644 --- a/src/components/HMI/app/controller/sdl/AppController.js +++ b/src/components/HMI/app/controller/sdl/AppController.js @@ -144,6 +144,9 @@ 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 76fbb7e059..e33656ecf4 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.VRPopUp.VRActive) { + if (SDL.SDLModel.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.VRPopUp.VRActive', + 'SDL.SDLModel.VRActive', 'SDL.AlertPopUp.active', 'SDL.States.info.nonMedia.active', 'SDL.States.media.sdlmedia.active', @@ -200,6 +200,8 @@ SDL.SDLController = Em.Object SDL.VRHelpListView.deactivate(); } } + } else if (SDL.VRHelpListView.active) { + SDL.VRHelpListView.deactivate(); } }.observes('SDL.SDLModel.VRActive', 'SDL.SDLModel.interactionData.vrHelp'), @@ -287,7 +289,15 @@ SDL.SDLController = Em.Object */ activateVRPopUp: function() { + if (FFW.TTS.requestId) { + FFW.TTS.aborted = true; + SDL.TTSPopUp.DeactivateTTS(); + } + if (SDL.AlertPopUp.active) { + SDL.AlertPopUp.deactivate('ABORTED'); + } SDL.SDLModel.toggleProperty('VRActive'); + }, /** * Action for SoftButtons that closes popUp or window and opens @@ -414,6 +424,15 @@ 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} @@ -458,6 +477,8 @@ 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 @@ -582,13 +603,28 @@ SDL.SDLController = Em.Object */ registerApplication: function(params, applicationType) { - SDL.SDLModel.get('registeredApps').pushObject(this.applicationModels[applicationType].create( { - appID: params.appID, - appName: params.appName, - deviceName: params.deviceName, - appType: params.appType - })); -/*Uncomment to show useless add command buttons + if (applicationType === undefined || applicationType === null) { + + SDL.SDLModel.get('registeredApps').pushObject(this.applicationModels[0].create( { //Magic number 0 - Default media model for not initialized applications + appID: params.appID, + appName: params.appName, + deviceName: params.deviceName, + isMedia: 0, + disabledToActivate: params.disabled ? true : false + })); + } else { + + SDL.SDLModel.get('registeredApps').pushObject(this.applicationModels[applicationType].create( { + appID: params.appID, + appName: params.appName, + deviceName: params.deviceName, + appType: params.appType, + isMedia: applicationType == 0 ? true : false, + initialized: true, + disabledToActivate: params.disabled ? true : false + })); + } + var exitCommand = { "id": -10, "params": { @@ -601,7 +637,7 @@ SDL.SDLController = Em.Object } }; - SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand); + SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand); exitCommand = { "id": -10, @@ -616,7 +652,6 @@ SDL.SDLController = Em.Object }; SDL.SDLController.getApplicationModel(params.appID).addCommand(exitCommand); -*/ }, /** * Unregister application @@ -641,6 +676,10 @@ 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 @@ -735,6 +774,9 @@ SDL.SDLController = Em.Object */ onActivateSDLApp: function(element) { + if (SDL.SDLModel.VRActive) { + SDL.SDLModel.toggleProperty('VRActive'); + } FFW.BasicCommunication.ActivateApp(element.appID); }, /** @@ -834,6 +876,16 @@ SDL.SDLController = Em.Object } }, /** + * Method to send OnEmergencyEvent to SDL + * + * @param {String} + */ + OnEmergencyEventNotificationSend: function(element) { + + FFW.BasicCommunication.OnEmergencyEvent(element.enabled); + element.set('enabled', !element.enabled); + }, + /** * Method sent softButtons pressed and event status to RPC * * @param {String} @@ -859,21 +911,23 @@ SDL.SDLController = Em.Object if ((appID && SDL.SDLController.getApplicationModel(appID) != SDL.SDLAppController.model) || this.backgroundAlertAppID){ - if (SDL.SDLAppController.model - && SDL.SDLAppController.model.appID != appID - && this.backgroundAlertAppID == null) { + if (SDL.SDLAppController.model == null + || (SDL.SDLAppController.model.appID != appID + && this.backgroundAlertAppID == null)) { this.backgroundAlertAppID = appID; FFW.UI.OnSystemContext(sysContextValue, appID); - FFW.UI.OnSystemContext('HMI_OBSCURED', SDL.SDLAppController.model.appID); + if (SDL.SDLAppController.model) { + FFW.UI.OnSystemContext('HMI_OBSCURED', SDL.SDLAppController.model.appID); + } - } else if (SDL.SDLAppController.model + } else if (SDL.SDLAppController.model != null && SDL.SDLAppController.model.appID != appID && this.backgroundAlertAppID != null && SDL.SDLAppController.model.appID != this.backgroundAlertAppID) { FFW.UI.OnSystemContext('MAIN', this.backgroundAlertAppID); - FFW.UI.OnSystemContext(sysContextValue, SDL.SDLAppController.model.appID); + FFW.UI.OnSystemContext(sysContextValue, appID); } } else { if (SDL.SDLAppController.model) { diff --git a/src/components/HMI/app/controller/sdl/RPCController.js b/src/components/HMI/app/controller/sdl/RPCController.js index d7ab4b2d01..27dd2ec087 100644 --- a/src/components/HMI/app/controller/sdl/RPCController.js +++ b/src/components/HMI/app/controller/sdl/RPCController.js @@ -72,41 +72,21 @@ SDL.RPCController = Em.Object capabilitiesCheck: function(key, value) { if (key == "imageType" && value == "STATIC") { - SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE'; + SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value}; } if (key == "type" && value == "PRE_RECORDED") { - SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE'; + SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value}; } if (key == "type" && value == "SAPI_PHONEMES") { - SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE'; + SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value}; } if (key == "type" && value == "LHPLUS_PHONEMES") { - SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE'; + SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value}; } if (key == "type" && value == "SILENCE") { - SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE'; + SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: 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; + return value; }, /** @@ -1093,17 +1073,6 @@ 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 = { @@ -1183,17 +1152,6 @@ 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++) { @@ -1277,17 +1235,6 @@ 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 = { @@ -1422,17 +1369,6 @@ 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 = { @@ -1934,16 +1870,6 @@ 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 = { @@ -2278,17 +2204,6 @@ 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 = { @@ -2434,17 +2349,6 @@ 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') { diff --git a/src/components/HMI/app/model/media/CDModel.js b/src/components/HMI/app/model/media/CDModel.js index 43836cb6dc..9ded512c5d 100644 --- a/src/components/HMI/app/model/media/CDModel.js +++ b/src/components/HMI/app/model/media/CDModel.js @@ -40,4 +40,4 @@ SDL.CDModel = Em.Object.create( { this.set('active', true);
}
-});
+});
\ No newline at end of file diff --git a/src/components/HMI/app/model/sdl/AppModel.js b/src/components/HMI/app/model/sdl/AppModel.js index 6f93e2d668..682eee592b 100644 --- a/src/components/HMI/app/model/sdl/AppModel.js +++ b/src/components/HMI/app/model/sdl/AppModel.js @@ -62,6 +62,37 @@ SDL.SDLAppModel = Em.Object.extend({ appName: '', /** + * Flag to define if application was initialized (registered) correctly + * Has correct application type + * + * @type {Boolean} + */ + initialized: false, + + /** + * Media application flag + * If application was successfully initialized this flag it set into correct value + * + * @type {Boolean} + */ + isMedia: null, + + /** + * Flag to determine if app in application list can not be activated from HMI + * + * @type {Boolean} + */ + disabledToActivate: false, + + /** + * Application type + * If application was successfully initialized this parameter it set into correct value + * + * @type {String} + */ + appType: "", + + /** * Navigation streaming url */ navigationStream: null, diff --git a/src/components/HMI/app/model/sdl/MediaModel.js b/src/components/HMI/app/model/sdl/MediaModel.js index fa8d8e2a83..0feceb2119 100644 --- a/src/components/HMI/app/model/sdl/MediaModel.js +++ b/src/components/HMI/app/model/sdl/MediaModel.js @@ -333,13 +333,15 @@ SDL.SDLMediaModel = SDL.SDLAppModel.extend({ } } else { - //this.appInfo.set('alignment', "text-align:center"); + this.appInfo.set('alignment', "text-align:center"); } - if (params.graphic && params.graphic.value != '') { - this.appInfo.set('trackIcon', params.graphic.value); - } else { - this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg'); + if (params.graphic != null) { + if (params.graphic.value != "") { + this.appInfo.set('trackIcon', params.graphic.value); + } else { + this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg'); + } } if ("softButtons" in params) { diff --git a/src/components/HMI/app/model/sdl/Model.js b/src/components/HMI/app/model/sdl/Model.js index a902e649ec..d47ecf023b 100644 --- a/src/components/HMI/app/model/sdl/Model.js +++ b/src/components/HMI/app/model/sdl/Model.js @@ -593,7 +593,7 @@ SDL.SDLModel = Em.Object.create({ messageCodes.push("AppPermissionsRevoked"); - FFW.BasicCommunication.GetUserFriendlyMessage(function(message){SDL.SettingsController.simpleParseUserFriendlyMessageData(message)}, appID, messageCodes); + FFW.BasicCommunication.GetUserFriendlyMessage(SDL.SettingsController.simpleParseUserFriendlyMessageData, appID, messageCodes); }, @@ -826,10 +826,33 @@ SDL.SDLModel = Em.Object.create({ * * @param {Object} */ - startStream: function(params) { + startStream: function(request) { + + var text = "Would you like to start Video stream?"; + + SDL.PopUp.create().appendTo('body').popupActivate(text, function(result){ + if (result) { + + SDL.SDLController.getApplicationModel(request.params.appID).set('navigationStream', request.params.url); + SDL.SDLModel.playVideo(request.params.appID); + + FFW.Navigation.sendNavigationResult( + SDL.SDLModel.resultCode["SUCCESS"], + request.id, + request.method + ); + + } else if (result === false) { + + FFW.Navigation.sendError( + SDL.SDLModel.resultCode["REJECTED"], + request.id, + request.method, + "Ignored by USER!" + ); + } + }); - SDL.SDLController.getApplicationModel(params.appID).set('navigationStream', params.url); - SDL.SDLModel.playVideo(params.appID); }, /** @@ -866,8 +889,30 @@ SDL.SDLModel = Em.Object.create({ */ startAudioStream: function(params) { - SDL.SDLController.getApplicationModel(params.appID).set('navigationAudioStream', params.url); - SDL.StreamAudio.play(params.url); + var text = "Would you like to start Audio stream?"; + + SDL.PopUp.create().appendTo('body').popupActivate(text, function(result){ + if (result) { + + SDL.SDLController.getApplicationModel(params.appID).set('navigationAudioStream', params.url); + SDL.StreamAudio.play(params.url); + + FFW.Navigation.sendNavigationResult( + SDL.SDLModel.resultCode["SUCCESS"], + request.id, + request.method + ); + + } else if (result === false) { + + FFW.Navigation.sendError( + SDL.SDLModel.resultCode["REJECTED"], + request.id, + request.method, + "Ignored by USER!" + ); + } + }); }, /** @@ -947,11 +992,17 @@ SDL.SDLModel = Em.Object.create({ * * @type {String} lang */ - changeRegistrationUI: function (lang, appID) { + changeRegistrationUI: function (lang, appID, appName) { if (SDL.SDLController.getApplicationModel(appID)) { SDL.SDLController.getApplicationModel(appID).set('UILanguage', lang); } + + if (appName) { + SDL.SDLMediaController.currentAppId = 0; + SDL.SDLController.getApplicationModel(appID).appName = appName; + SDL.SDLMediaController.set('currentAppId', appID); + } }, /** @@ -975,31 +1026,55 @@ SDL.SDLModel = Em.Object.create({ */ onAppRegistered: function (params) { - var applicationType = 1; + var applicationType = null,//Default value - NonMediaModel see SDL.SDLController.applicationModels + app = SDL.SDLController.getApplicationModel(params.appID); + + if (app != undefined && app.initialized == false) { - if (SDL.SDLController.getApplicationModel(params.application.appID)) { + if (app.isMedia != params.isMediaApplication) { // If current not initialized model doe not matches the registered application type + this.convertModel(params); // then model should be changed + } else { + app.disabledToActivate = params.disabled; + } return; + } else if (app != undefined && app.initialized == true) { + console.error("Application with appID " + params.appID + " already registered!"); + return; // if application already registered and correctly initialized and BC.UpdateAppList came from SDL than nothing shoul happend } if (params.vrSynonyms) { - var message = {"cmdID": 0, "vrCommands": params.vrSynonyms, "appID": params.application.appID, "type": "Application"}; + var message = {"cmdID": 0, "vrCommands": params.vrSynonyms, "appID": params.appID, "type": "Application"}; this.addCommandVR(message); } - if (params.application.isMediaApplication) { + if (params.isMediaApplication === true) { + applicationType = 0; + } else if (params.isMediaApplication === false) { + + applicationType = 1; } - SDL.SDLController.registerApplication(params.application, applicationType); + SDL.SDLController.registerApplication(params, applicationType); - if (SDL.SDLModel.unRegisteredApps.indexOf(params.application.appID) >= 0) { - setTimeout(function(){ SDL.PopUp.create().appendTo('body').popupActivate("Connection with " + params.application.appName + " is re-established.")}, 1000); - this.unRegisteredApps.pop(params.application.appID); + if (SDL.SDLModel.unRegisteredApps.indexOf(params.appID) >= 0) { + setTimeout(function(){ SDL.PopUp.create().appendTo('body').popupActivate("Connection with " + params.appName + " is re-established.")}, 1000); + this.unRegisteredApps.pop(params.appID); } }, /** + * Method to convert existed model to registered type + */ + convertModel: function(params) { + + SDL.SDLModel.get('registeredApps').removeObjects(SDL.SDLModel.get('registeredApps').filterProperty('appID', params.appID)); + + this.onAppRegistered(params); + }, + + /** * Method to delete activation button from VR commands and delete device * parameters from model * @@ -1224,7 +1299,6 @@ SDL.SDLModel = Em.Object.create({ setTimeout(function(){ if (SDL.SDLModel.vrActiveRequests.vrPerformInteraction) { SDL.SDLModel.onPrompt(message.params.timeoutPrompt); - SDL.SDLModel.interactionData.helpPrompt = null; } }, message.params.timeout - 2000); //Magic numer is a platform depended HMI behavior: -2 seconds for timeout prompt diff --git a/src/components/HMI/app/model/sdl/NonMediaModel.js b/src/components/HMI/app/model/sdl/NonMediaModel.js index d9a14b32f2..42ac14bc0c 100644 --- a/src/components/HMI/app/model/sdl/NonMediaModel.js +++ b/src/components/HMI/app/model/sdl/NonMediaModel.js @@ -198,10 +198,12 @@ SDL.SDLNonMediaModel = SDL.SDLAppModel.extend({ this.appInfo.set('alignment', "text-align:center"); } - if (params.graphic) { - this.appInfo.set('mainImage', params.graphic.value); - } else { - this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg'); + if (params.graphic != null) { + if (params.graphic.value != "") { + this.appInfo.set('mainImage', params.graphic.value); + } else { + this.appInfo.set('mainImage', 'images/sdl/audio_icon.jpg'); + } } // Magic number is a count of Preset Buttons on HMI = 8 diff --git a/src/components/HMI/app/model/sdl/VehicleInfoModel.js b/src/components/HMI/app/model/sdl/VehicleInfoModel.js index f2b896190e..f9fe33d97c 100644 --- a/src/components/HMI/app/model/sdl/VehicleInfoModel.js +++ b/src/components/HMI/app/model/sdl/VehicleInfoModel.js @@ -132,10 +132,10 @@ SDL.SDLVehicleInfoModel = Em.Object 'width': 800, 'height': 480 }, - 'speed': 80.0, - 'fuelLevel': 0.2, + 'speed': 80.08E0, + 'fuelLevel': 0.2E0, 'fuelLevel_State': "UNKNOWN", - 'instantFuelConsumption': 2.2, + 'instantFuelConsumption': 2.2E0, 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { @@ -203,9 +203,9 @@ SDL.SDLVehicleInfoModel = Em.Object "highBeamsOn": false, "ambientLightSensorStatus": "NIGHT" }, - 'engineTorque': 2.5, - 'accPedalPosition': 10.5, - 'steeringWheelAngle': 1.2, + 'engineTorque': 2.5E0, + 'accPedalPosition': 10.5E0, + 'steeringWheelAngle': 1.2E0, 'myKey': { "e911Override": "NO_DATA_EXISTS" }, @@ -222,8 +222,8 @@ SDL.SDLVehicleInfoModel = Em.Object 'satRadioESN': "165165650", 'rainSensor': 165165650, 'gps': { - 'longitudeDegrees': 42, - 'latitudeDegrees': -83, + 'longitudeDegrees': 42.5E0, + 'latitudeDegrees': -83.3E0, 'utcYear': 2013, 'utcMonth': 2, 'utcDay': 14, @@ -231,15 +231,15 @@ SDL.SDLVehicleInfoModel = Em.Object 'utcMinutes': 16, 'utcSeconds': 54, 'compassDirection': 'SOUTHWEST', - 'pdop': 8, - 'hdop': 5, - 'vdop': 3, + 'pdop': 8.4E0, + 'hdop': 5.9E0, + 'vdop': 3.2E0, 'actual': false, 'satellites': 8, 'dimension': '2D', - 'altitude': 7, - 'heading': 173, - 'speed': 2 + 'altitude': 7.7E0, + 'heading': 173.99E0, + 'speed': 2.78E0 }, 'eCallInfo': { 'eCallNotificationStatus': 'NORMAL', diff --git a/src/components/HMI/app/view/WarningView.js b/src/components/HMI/app/view/WarningView.js index 1db0b6f6c0..8fa40b4547 100644 --- a/src/components/HMI/app/view/WarningView.js +++ b/src/components/HMI/app/view/WarningView.js @@ -88,7 +88,11 @@ SDL.warningView = Em.ContainerView appLoaded: function() {
var self = this;
- self.set('isReady', true);
+ /** Show OK Button after 2 second delay */
+ setTimeout(function() {
+
+ self.set('isReady', true);
+ }, 2000);
var components = Em.ContainerView.create({
@@ -317,8 +321,15 @@ SDL.warningView = Em.ContainerView var self = this;
- self._parentView.set('hide', true);
+ this._parentView.set('fade', this
+ .checkForCCS3AnimationSupport());
+
+ setTimeout(function() {
+
+ self._parentView.set('hide', true);
+ }, 1000);
+
SDL.RPCController.ConnectToSDL();
}
})
- });
+ });
\ No newline at end of file diff --git a/src/components/HMI/app/view/home/controlButtons.js b/src/components/HMI/app/view/home/controlButtons.js index cb3ff44ed5..3b32d47368 100644 --- a/src/components/HMI/app/view/home/controlButtons.js +++ b/src/components/HMI/app/view/home/controlButtons.js @@ -52,7 +52,8 @@ SDL.ControlButtons = Em.ContainerView 'appUILanguagesLabel', 'appTTSVRLanguagesLabel', 'appUILang', - 'appTTSVRLang' + 'appTTSVRLang', + 'phoneCall' ], /** @@ -575,4 +576,4 @@ SDL.ControlButtons = Em.ContainerView templateName: 'text' }) }) - }); + });
\ No newline at end of file diff --git a/src/components/HMI/app/view/home/statusMediaView.js b/src/components/HMI/app/view/home/statusMediaView.js index 4996b4ce1d..bc94c9e22f 100644 --- a/src/components/HMI/app/view/home/statusMediaView.js +++ b/src/components/HMI/app/view/home/statusMediaView.js @@ -96,4 +96,4 @@ SDL.StatusMediaView = Em.ContainerView SDL.States.goToStates(SDL.MediaController.activeState);
}
}
- });
+ });
\ No newline at end of file diff --git a/src/components/HMI/app/view/info/appsView.js b/src/components/HMI/app/view/info/appsView.js index c1d123c0b2..1e0b7dc9ff 100644 --- a/src/components/HMI/app/view/info/appsView.js +++ b/src/components/HMI/app/view/info/appsView.js @@ -73,7 +73,8 @@ SDL.InfoAppsView = Em.ContainerView appID: apps[i].appID,
classNames: 'list-item button',
iconBinding: 'SDL.SDLModel.registeredApps.' + appIndex
- + '.appIcon'
+ + '.appIcon',
+ disabled: apps[i].disabledToActivate
}));
}
diff --git a/src/components/HMI/app/view/infoView.js b/src/components/HMI/app/view/infoView.js index 8740bf455b..397553d9fa 100644 --- a/src/components/HMI/app/view/infoView.js +++ b/src/components/HMI/app/view/infoView.js @@ -47,9 +47,13 @@ SDL.InfoView = Em.ContainerView.create( { /** Settings components */
childViews:
[
+ 'leftMenu',
+ SDL.InfoServicesView,
+ SDL.InfoTravelLinkView,
+ SDL.InfoCalendarView,
SDL.InfoAppsView,
- SDL.DeviceListView,
- SDL.InfoNonMedia
+ SDL.InfoNonMedia,
+ SDL.DeviceListView
],
/** Left menu */
@@ -78,8 +82,12 @@ SDL.InfoView = Em.ContainerView.create( { childViews:
[
+ 'servicesButton',
+ 'travelLinkButton',
+ 'calendarButton',
'appsButton',
- 'sdlButton'
+ 'sdlButton',
+ 'goToCD'
],
servicesButton: SDL.Button.extend( {
@@ -179,4 +187,4 @@ SDL.InfoView = Em.ContainerView.create( { } )
} )
} )
-} );
+} );
\ No newline at end of file diff --git a/src/components/HMI/app/view/media/common/LeftMenuView.js b/src/components/HMI/app/view/media/common/LeftMenuView.js index ce44d8a85b..ba4495681f 100644 --- a/src/components/HMI/app/view/media/common/LeftMenuView.js +++ b/src/components/HMI/app/view/media/common/LeftMenuView.js @@ -40,6 +40,7 @@ SDL.LeftMenuView = Em.ContainerView.extend( { childViews:
[
'border',
+ 'cdButton',
'sdlButton'
],
/** Border decoration */
diff --git a/src/components/HMI/app/view/media/sdl/controllsView.js b/src/components/HMI/app/view/media/sdl/controllsView.js index b7b8f59d7f..8e73f0ba0e 100644 --- a/src/components/HMI/app/view/media/sdl/controllsView.js +++ b/src/components/HMI/app/view/media/sdl/controllsView.js @@ -38,7 +38,7 @@ SDL.SDLMediaControlls = Em.ContainerView.create( { [ 'info', 'Controls', - 'tuneButtons' // Uncomment to see preset buttons on sdl screen + 'tuneButtons' ], /** @@ -235,4 +235,4 @@ SDL.SDLMediaControlls = Em.ContainerView.create( { } ) } ) } ) -} ); +} );
\ No newline at end of file diff --git a/src/components/HMI/app/view/media/sdlmediaView.js b/src/components/HMI/app/view/media/sdlmediaView.js index a880de8a3f..78371e7ea7 100644 --- a/src/components/HMI/app/view/media/sdlmediaView.js +++ b/src/components/HMI/app/view/media/sdlmediaView.js @@ -98,7 +98,7 @@ SDL.sdlView = Em.ContainerView ], optionsButton: SDL.Button.extend( { - text: 'Menu', + text: 'Options', templateName: 'arrow', @@ -107,4 +107,4 @@ SDL.sdlView = Em.ContainerView }) }) }) - }); + });
\ No newline at end of file diff --git a/src/components/HMI/app/view/mediaView.js b/src/components/HMI/app/view/mediaView.js index c647f999f4..647b593065 100644 --- a/src/components/HMI/app/view/mediaView.js +++ b/src/components/HMI/app/view/mediaView.js @@ -46,4 +46,4 @@ SDL.MediaView = Em.ContainerView.create( { ],
/** Left Menu view component */
leftMenu: SDL.LeftMenuView
-} );
+} );
\ No newline at end of file diff --git a/src/components/HMI/app/view/sdl/AlertPopUp.js b/src/components/HMI/app/view/sdl/AlertPopUp.js index 20ba5c4fb1..0589da3649 100644 --- a/src/components/HMI/app/view/sdl/AlertPopUp.js +++ b/src/components/HMI/app/view/sdl/AlertPopUp.js @@ -140,7 +140,7 @@ SDL.AlertPopUp = Em.ContainerView.create({ this.set('content2', ''); this.set('content3', ''); - if (reason == 'timeout' && this.softbuttons.buttons._childViews.length > 0) { + if (reason == 'timeout' && this.softbuttons.buttons._childViews.length > 0 && reason === 'ABORTED') { SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['ABORTED'], this.alertRequestId); } else { SDL.SDLController.alertResponse(SDL.SDLModel.resultCode['SUCCESS'], this.alertRequestId); diff --git a/src/components/HMI/app/view/sdl/ExitAppView.js b/src/components/HMI/app/view/sdl/ExitAppView.js index 4f423f06af..81e9c7ad5f 100644 --- a/src/components/HMI/app/view/sdl/ExitAppView.js +++ b/src/components/HMI/app/view/sdl/ExitAppView.js @@ -47,7 +47,9 @@ SDL.ExitApp = Em.ContainerView.create( { [ 'exitAppViewLabel', 'exitAppViewTitle', - 'exitAppViewSelect' + 'exitAppViewSelect', + 'onAwakeSDLLabel', + 'onAwakeSDLButton' ], /** @@ -104,6 +106,24 @@ SDL.ExitApp = Em.ContainerView.create( { } } ), + onAwakeSDLLabel: SDL.Label.extend( { + + elementId: 'onAwakeSDLLabel', + + classNames: 'onAwakeSDLLabel', + + content: 'onAwakeSDL notification send' + } ), + + onAwakeSDLButton: SDL.Button.extend( { + classNames: 'button onAwakeSDLButton', + text: 'Send onAwakeSDL', + action: 'onAwakeSDLNotificationSend', + target: 'SDL.SDLController', + buttonAction: true, + onDown: false + }), + /** * Trigger function that activates and deactivates tbtClientStateView */ diff --git a/src/components/HMI/app/view/sdl/PopUp.js b/src/components/HMI/app/view/sdl/PopUp.js index b4b429df23..6da36feb4f 100644 --- a/src/components/HMI/app/view/sdl/PopUp.js +++ b/src/components/HMI/app/view/sdl/PopUp.js @@ -114,16 +114,31 @@ SDL.PopUp = Em.ContainerView.extend({ } this.set('callback', null); + this.set('content', ''); this.remove(); }, - popupActivate: function(message, callback) { + /** + * HMI modal window popUp Activation method + * @param textBody - main text to be displayes on PopUp + * @param callback - Callback function handled result parameter made by user action, if null - popUp will be closed by timer + * @param indicator - popUp will not be closed by timer and + * should be deactivated manually by developer in code using method's returned parameter this. + * callback shuld be null if indicator is true + * @param label + * @param line1 + * @param line2 + * @returns {SDL.PopUp} - returns current instance of PopUp + */ + popupActivate: function(textBody, callback, indicator, label, line1, line2) { this.set('active', true); clearTimeout(this.timer); this.timer = null; - if (callback) { + if (indicator) { + this.set('buttons', true); + } else if (callback) { this.set('callback', callback); this.set('buttons', false); } else { @@ -135,8 +150,11 @@ SDL.PopUp = Em.ContainerView.extend({ 5000); } - this.set('content', message); + this.set('content', textBody); + this.set('label', label); + this.set('line1', line1); + this.set('line2', line2); - return ++this.popUpId; + return this; } });
\ No newline at end of file diff --git a/src/components/HMI/app/view/sdl/TTSPopUp.js b/src/components/HMI/app/view/sdl/TTSPopUp.js index 4fc0c7669c..ae45786f5c 100644 --- a/src/components/HMI/app/view/sdl/TTSPopUp.js +++ b/src/components/HMI/app/view/sdl/TTSPopUp.js @@ -45,7 +45,9 @@ SDL.TTSPopUp = Em.ContainerView.create( { 'popUp', 'message', 'okButton', - 'timerText' + 'timerText', + 'checkBoxLabel', + 'checkBox' ], requestId: null, @@ -86,6 +88,25 @@ SDL.TTSPopUp = Em.ContainerView.create( { disabledBinding: 'parentView.buttons' }), + checkBoxLabel: SDL.Label.extend({ + + elementId: 'checkBoxLabel', + + classNames: 'checkBoxLabel', + + content: 'Send response' + }), + + checkBox: Em.Checkbox.extend( { + + elementId: 'checkBoxTTS', + + classNames: 'checkBoxTTS', + + checked: true + + }), + timerText: SDL.Label.extend({ elementId: 'timerText', @@ -95,10 +116,11 @@ SDL.TTSPopUp = Em.ContainerView.create( { contentBinding: 'parentView.timerSeconds' }), + + resetTimeout: function () { this.set('timerSeconds', 10); FFW.TTS.OnResetTimeout(this.appID, "TTS.Speak"); - this.appID = null; }, ActivateTTS: function(msg, appID) { @@ -126,9 +148,14 @@ SDL.TTSPopUp = Em.ContainerView.create( { DeactivateTTS: function() { clearInterval(this.timer); this.set('active', false); - this.set('timerSeconds', 10); - SDL.SDLController.TTSResponseHandler(); - FFW.TTS.Stopped(); + this.appID = null; + this.set('timerSeconds', 5); + this.checkBox.set('checked', true); + + if (this.checkBox.checked) { + SDL.SDLController.TTSResponseHandler(); + FFW.TTS.Stopped(); + } }, /** diff --git a/src/components/HMI/app/view/sdl/VehicleInfoView.js b/src/components/HMI/app/view/sdl/VehicleInfoView.js index a42efac4d4..915d416d76 100644 --- a/src/components/HMI/app/view/sdl/VehicleInfoView.js +++ b/src/components/HMI/app/view/sdl/VehicleInfoView.js @@ -54,7 +54,8 @@ SDL.VehicleInfo = Em.ContainerView.create( { 'ecu1Data', 'ecu2Data', 'odometrTitle', - 'odometrInput' + 'odometrInput', + 'onAwakeSDLButton' ], /** @@ -187,6 +188,21 @@ SDL.VehicleInfo = Em.ContainerView.create( { } ), /** + * Button to send OnEmergencyEvent to SDL + */ + onAwakeSDLButton: SDL.Button.extend( { + classNames: 'button onEmergencyEvent', + textBinding: 'this.displayText', + action: 'OnEmergencyEventNotificationSend', + target: 'SDL.SDLController', + enabled: false, + onDown: false, + displayText: function () { + return this.enabled ? 'Send OnEmergencyEvent On' : 'Send OnEmergencyEvent Off'; + }.property('this.enabled') + }), + + /** * Trigger function that activates and deactivates VehicleInfo PopUp */ toggleActivity: function() { diff --git a/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js b/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js index d01165dd14..288031ab17 100644 --- a/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js +++ b/src/components/HMI/app/view/sdl/shared/interactionChoicesView.js @@ -86,8 +86,10 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({ ], click: function() { - SDL.InteractionChoicesView.timerUpdate(); - SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction"); + if (this._parentView.active) { + SDL.InteractionChoicesView.timerUpdate(); + SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction"); + } }, naviChoises: Em.ContainerView.extend({ @@ -119,8 +121,10 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({ itemsOnPage: 5, items: [], click: function() { - SDL.InteractionChoicesView.timerUpdate(); - SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction"); + if (this._parentView.active) { + SDL.InteractionChoicesView.timerUpdate(); + SDL.SDLController.onResetTimeout(SDL.SDLAppController.model.appID, "UI.PerformInteraction"); + } } }), @@ -143,7 +147,7 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create({ * Method updates popup timer when data changes through keyboard */ timerUpdate: function (){ - if (this.timeout && this.input.value !== null) { + if (this.timeout) { clearTimeout(this.timer); var self = this; this.timer = setTimeout(function () { diff --git a/src/components/HMI/app/view/sdl/shared/turnByTurnView.js b/src/components/HMI/app/view/sdl/shared/turnByTurnView.js index 21d51ca6b1..1cb7ddfad0 100644 --- a/src/components/HMI/app/view/sdl/shared/turnByTurnView.js +++ b/src/components/HMI/app/view/sdl/shared/turnByTurnView.js @@ -79,29 +79,29 @@ SDL.TurnByTurnView = SDL.SDLAbstractView.create( { for ( var i = 0; i < naviParams.navigationTexts.length; i++) { switch (naviParams.navigationTexts[i].fieldName) { - case 'navigationText1': { - this.set('captionText.content', - naviParams.navigationTexts[i].fieldText); - break; - } - case 'navigationText2': { - this.set('navigationText2', - naviParams.navigationTexts[i].fieldText); - break; - } - case 'ETA': { - this.set('eta', naviParams.navigationTexts[i].fieldText); - break; - } - case 'totalDistance': { - this.set('totalDistance', - naviParams.navigationTexts[i].fieldText); - break; - } + case 'navigationText1': { + this.set('captionText.content', + naviParams.navigationTexts[i].fieldText); + break; + } + case 'navigationText2': { + this.set('navigationText2', + naviParams.navigationTexts[i].fieldText); + break; + } + case 'ETA': { + this.set('eta', naviParams.navigationTexts[i].fieldText); + break; + } + case 'totalDistance': { + this.set('totalDistance', + naviParams.navigationTexts[i].fieldText); + break; + } } } - this.softButtons.addItems(naviParams.softButtons); + this.softButtons.addItems(naviParams.softButtons, appID); if (naviParams.maneuverComplete) { this.set('maneuverComplete', naviParams.maneuverComplete); |