From 3ff207ceb90f9564f6c7769b072357fe7e4f50f0 Mon Sep 17 00:00:00 2001 From: Andrii Kalinich Date: Wed, 21 Mar 2018 11:17:31 -0400 Subject: [PATCH 001/102] Implement behaviour for apps with PROJECTION hmi type Assumed that in most cases behaviour for mobile projection applications is the same as for navi applications. Also added catch blocks and improved flow control while starting/stopping audio/video streaming. --- app/controller/InfoController.js | 3 +- app/controller/MediaController.js | 3 +- app/model/sdl/Abstract/Model.js | 88 ++++++++++++++++++------------- app/util/StreamAudio.js | 22 ++++++-- 4 files changed, 73 insertions(+), 43 deletions(-) diff --git a/app/controller/InfoController.js b/app/controller/InfoController.js index 9e6ceed74..82eb7fe87 100644 --- a/app/controller/InfoController.js +++ b/app/controller/InfoController.js @@ -61,7 +61,8 @@ SDL.InfoController = Em.Object.create( */ if (SDL.SDLController.model.appType) { for (var i = 0; i < SDL.SDLController.model.appType.length; i++) { - if (SDL.SDLController.model.appType[i] == 'NAVIGATION') { + if (SDL.SDLController.model.appType[i] == 'NAVIGATION' || + SDL.SDLController.model.appType[i] == 'PROJECTION') { SDL.BaseNavigationView.update(); SDL.States.goToStates('navigationApp.baseNavigation'); return; diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 5f6754935..951afbf2c 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -89,7 +89,8 @@ SDL.MediaController = Em.Object.create( */ if (SDL.SDLController.model.appType) { for (var i = 0; i < SDL.SDLController.model.appType.length; i++) { - if (SDL.SDLController.model.appType[i] == 'NAVIGATION') { + if (SDL.SDLController.model.appType[i] == 'NAVIGATION' || + SDL.SDLController.model.appType[i] == 'PROJECTION') { SDL.BaseNavigationView.update(); SDL.States.goToStates('navigationApp.baseNavigation'); return; diff --git a/app/model/sdl/Abstract/Model.js b/app/model/sdl/Abstract/Model.js index 2ff22668e..ef8b4ff3f 100644 --- a/app/model/sdl/Abstract/Model.js +++ b/app/model/sdl/Abstract/Model.js @@ -392,17 +392,13 @@ SDL.SDLModel = Em.Object.extend({ var appID = null; - if (SDL.SDLController.model && - this.appTypeComparison(SDL.SDLController.model, 'NAVIGATION')) { - + if (SDL.SDLController.model && this.isStreamingSupported(SDL.SDLController.model)) { appID = SDL.SDLController.model.appID; - } else if (SDL.SDLModel.data.stateLimited && - this.appTypeComparison( - SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited), - 'NAVIGATION' - )) { - - appID = SDL.SDLModel.data.stateLimited; + } else if (SDL.SDLModel.data.stateLimited) { + var model = SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited); + if (this.isStreamingSupported(model)) { + appID = SDL.SDLModel.data.stateLimited; + } } SDL.SDLModel.playVideo(appID); @@ -429,6 +425,17 @@ SDL.SDLModel = Em.Object.extend({ return result; }, + /** + * Function to verify if model supports audio/video streaming + * + * @param type + * @returns {boolean} + */ + isStreamingSupported: function(model) { + return this.appTypeComparison(model, 'NAVIGATION') || + this.appTypeComparison(model, 'PROJECTION'); + }, + /** * Method to stop playing video streaming * @@ -436,6 +443,12 @@ SDL.SDLModel = Em.Object.extend({ */ stopStream: function(appID) { + if (SDL.SDLModel.data.naviVideo) { + SDL.SDLModel.data.naviVideo.pause(); + SDL.SDLModel.data.naviVideo.src = ''; + SDL.SDLModel.data.naviVideo = null; + } + var createVideoView = Ember.View.create({ templateName: 'video', template: Ember.Handlebars.compile('') @@ -462,17 +475,13 @@ SDL.SDLModel = Em.Object.extend({ var appID = null; - if (SDL.SDLController.model && - this.appTypeComparison(SDL.SDLController.model, 'NAVIGATION')) { - + if (SDL.SDLController.model && this.isStreamingSupported(SDL.SDLController.model)) { appID = SDL.SDLController.model.appID; - } else if (SDL.SDLModel.data.stateLimited && - this.appTypeComparison( - SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited), - 'NAVIGATION' - )) { - - appID = SDL.SDLModel.data.stateLimited; + } else if (SDL.SDLModel.data.stateLimited) { + var model = SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited); + if (this.isStreamingSupported(model)) { + appID = SDL.SDLModel.data.stateLimited; + } } SDL.StreamAudio.play( @@ -489,15 +498,13 @@ SDL.SDLModel = Em.Object.extend({ var appID = null; - if (SDL.SDLController.model && - SDL.SDLController.model.appType == 'NAVIGATION') { - + if (SDL.SDLController.model && this.isStreamingSupported(SDL.SDLController.model)) { appID = SDL.SDLController.model.appID; - } else if (SDL.SDLModel.data.stateLimited && - SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited - ).appType == 'NAVIGATION') { - - appID = SDL.SDLModel.data.stateLimited; + } else if (SDL.SDLModel.data.stateLimited) { + var model = SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited); + if (this.isStreamingSupported(model)) { + appID = SDL.SDLModel.data.stateLimited; + } } SDL.StreamAudio.stop(); @@ -514,7 +521,17 @@ SDL.SDLModel = Em.Object.extend({ SDL.SDLModel.data.naviVideo.src = SDL.SDLController.getApplicationModel( appID ).navigationStream; - SDL.SDLModel.data.naviVideo.play(); + + var playPromise = SDL.SDLModel.data.naviVideo.play(); + if (playPromise !== undefined) { + playPromise.then(_ => { + console.log('Video playback started OK'); + }) + .catch(error => { + console.log('Video playback start failed: ' + error); + SDL.SDLModel.data.naviVideo = null; + }); + } } }, @@ -1252,13 +1269,12 @@ SDL.SDLModel = Em.Object.extend({ } } - if (SDL.SDLModel.data.stateLimited && - reason === 'AUDIO' && - SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited). - appType.indexOf('NAVIGATION') < 0) { - - SDL.SDLModel.data.stateLimited = null; - SDL.SDLModel.data.set('limitedExist', false); + if (SDL.SDLModel.data.stateLimited && reason === 'AUDIO') { + var model = SDL.SDLController.getApplicationModel(SDL.SDLModel.data.stateLimited); + if (!this.isStreamingSupported(model)) { + SDL.SDLModel.data.stateLimited = null; + SDL.SDLModel.data.set('limitedExist', false); + } } SDL.TurnByTurnView.deactivate(); diff --git a/app/util/StreamAudio.js b/app/util/StreamAudio.js index 006088909..81927ce15 100644 --- a/app/util/StreamAudio.js +++ b/app/util/StreamAudio.js @@ -36,14 +36,26 @@ SDL.StreamAudio = { audio: new Audio(), play: function(path) { - + console.log('Start playing audio: ' + path); this.audio.src = path; - this.audio.play(); + var playPromise = this.audio.play(); + + if (playPromise !== undefined) { + playPromise.then(_ => { + console.log('Audio playback started OK'); + }) + .catch(error => { + console.log('Audio playback failed: ' + error); + this.audio.src = ''; + }); + } }, stop: function() { - - this.audio.src = ''; - this.audio.pause(); + if (this.audio.src != '') { + console.log('Stop playing audio: ' + this.audio.src); + this.audio.src = ''; + this.audio.pause(); + } } }; From f366022752318b8dc421713ba34eec73591ba62f Mon Sep 17 00:00:00 2001 From: Andrii Kalinich Date: Fri, 23 Mar 2018 12:08:42 -0400 Subject: [PATCH 002/102] Fixed navi video streaming initial value --- app/model/sdl/Abstract/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index dc0972919..ce779ad4f 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -146,7 +146,7 @@ SDL.SDLModelData = Em.Object.create( * * @type {Object} */ - naviVideo: {}, + naviVideo: null, /** * Array of strings came in SDL.GetURLS response * From 9651468da500fa3641a252a4d0b007b0c7f5ca46 Mon Sep 17 00:00:00 2001 From: ypostolov Date: Wed, 28 Mar 2018 15:51:12 +0300 Subject: [PATCH 003/102] Adding a new RPC GetSystemTime to get accurate system time information --- app/BasicCommunicationRPC.js | 6 ++-- app/controller/sdl/Abstract/Controller.js | 2 +- ffw/BasicCommunicationRPC.js | 42 ++++++++++++++++++++++- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/app/BasicCommunicationRPC.js b/app/BasicCommunicationRPC.js index 039b77a6b..95e93c3b7 100644 --- a/app/BasicCommunicationRPC.js +++ b/app/BasicCommunicationRPC.js @@ -124,7 +124,7 @@ FFW.BasicCommunication = FFW.RPCObserver .subscribeToNotification(this.onSDLConsentNeededNotification); this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); - }, + }, /** * Client is unregistered - no more requests */ @@ -511,7 +511,7 @@ FFW.BasicCommunication = FFW.RPCObserver this.sendBCResult( SDL.SDLModel.data.resultCode.SUCCESS, request.id, request.method ); - } + } } }, /********************* Requests BEGIN *********************/ @@ -899,7 +899,7 @@ FFW.BasicCommunication = FFW.RPCObserver 'method': 'BasicCommunication.OnReady' }; this.client.send(JSONMessage); - }, + }, /** * Sent notification to SDL when HMI closes */ diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index ce3522f1b..482e196cf 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -408,7 +408,7 @@ SDL.SDLController = Em.Object.extend( } } FFW.BasicCommunication.onReady(); - }.observes('SDL.SDLModel.data.registeredComponents.@each.state'), + }.observes('SDL.SDLModel.data.registeredComponents.@each.state'), /** * Show VrHelpItems popup with necessary params * if VRPopUp is active - show data from Global Properties diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 6fb65b082..c3840580a 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -124,7 +124,9 @@ FFW.BasicCommunication = FFW.RPCObserver .subscribeToNotification(this.onSDLConsentNeededNotification); this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); - }, + setTimeout(function() {FFW.BasicCommunication.onSystemTimeReady();}, + 500); + }, /** * Client is unregistered - no more requests */ @@ -516,6 +518,33 @@ FFW.BasicCommunication = FFW.RPCObserver SDL.SDLModel.data.resultCode.SUCCESS, request.id, request.method ); } + if (request.method == 'BasicCommunication.GetSystemTime') { + var date = new Date(); + var systemTime={ + millisecond: date.getMilliseconds(), + second: date.getSeconds(), + minute: date.getMinutes(), + hour: date.getHours(), + day: date.getDay(), + month: date.getMonth()+1, + year: date.getFullYear(), + tz_hour: Math.floor(date.getTimezoneOffset()/-60), + tz_minute: Math.abs(date.getTimezoneOffset()%60) + }; + + var JSONMessage = { + 'jsonrpc': '2.0', + 'id': id, + 'result': { + 'code': resultCode, // type (enum) from SDL protocol + 'method': method, + 'systemTime':systemTime + } + }; + + this.client.send(JSONMessage); + + } } }, /********************* Requests BEGIN *********************/ @@ -904,6 +933,17 @@ FFW.BasicCommunication = FFW.RPCObserver }; this.client.send(JSONMessage); }, + /** + * notification that HMI is ready to provide system time + */ + onSystemTimeReady: function() { + Em.Logger.log('FFW.BasicCommunication.onSystemTimeReady'); + var JSONMessage = { + 'jsonrpc': '2.0', + 'method': 'BasicCommunication.onSystemTimeReady' + }; + this.client.send(JSONMessage); + }, /** * Sent notification to SDL when HMI closes */ From bc8c6e6e1820fe9984f106e9cc93494d8c58816e Mon Sep 17 00:00:00 2001 From: ypostolov Date: Sat, 31 Mar 2018 14:31:41 +0300 Subject: [PATCH 004/102] Fix case issue "OnSystemTimeReady" --- ffw/BasicCommunicationRPC.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index c3840580a..1f5b73e28 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -124,7 +124,7 @@ FFW.BasicCommunication = FFW.RPCObserver .subscribeToNotification(this.onSDLConsentNeededNotification); this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); - setTimeout(function() {FFW.BasicCommunication.onSystemTimeReady();}, + setTimeout(function() {FFW.BasicCommunication.OnSystemTimeReady();}, 500); }, /** @@ -936,11 +936,11 @@ FFW.BasicCommunication = FFW.RPCObserver /** * notification that HMI is ready to provide system time */ - onSystemTimeReady: function() { - Em.Logger.log('FFW.BasicCommunication.onSystemTimeReady'); + OnSystemTimeReady: function() { + Em.Logger.log('FFW.BasicCommunication.OnSystemTimeReady'); var JSONMessage = { 'jsonrpc': '2.0', - 'method': 'BasicCommunication.onSystemTimeReady' + 'method': 'BasicCommunication.OnSystemTimeReady' }; this.client.send(JSONMessage); }, From 1da4b4fea684f04190de2c3574396ff6207f2ba4 Mon Sep 17 00:00:00 2001 From: ypostolov Date: Sat, 31 Mar 2018 17:20:45 +0300 Subject: [PATCH 005/102] Fix case issue HMI resiving and responding "GetSystemTime" --- app/controller/sdl/RPCController.js | 6 ++++++ ffw/BasicCommunicationRPC.js | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index de6ece571..704471b7e 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -419,6 +419,12 @@ SDL.RPCController = Em.Object.create( }; return this.resultStruct; }, + GetSystemTime: function(params) { + this.resultStruct = { + 'resultCode': SDL.SDLModel.data.resultCode.SUCCESS + }; + return this.resultStruct; + }, /** * Validate method for request MixingAudioSupported * diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 1f5b73e28..2fa0158d8 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -525,7 +525,7 @@ FFW.BasicCommunication = FFW.RPCObserver second: date.getSeconds(), minute: date.getMinutes(), hour: date.getHours(), - day: date.getDay(), + day: date.getDate(), month: date.getMonth()+1, year: date.getFullYear(), tz_hour: Math.floor(date.getTimezoneOffset()/-60), @@ -534,16 +534,16 @@ FFW.BasicCommunication = FFW.RPCObserver var JSONMessage = { 'jsonrpc': '2.0', - 'id': id, + 'id': request.id, 'result': { - 'code': resultCode, // type (enum) from SDL protocol - 'method': method, + 'code': SDL.SDLModel.data.resultCode.SUCCESS, // type (enum) from SDL protocol + 'method': request.method, 'systemTime':systemTime } }; this.client.send(JSONMessage); - + } } }, From c0a349e86e9e0b4e938a94593a79605f3154a79e Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Wed, 11 Apr 2018 16:42:15 -0400 Subject: [PATCH 006/102] Fix PTU retry flow with `PROPRIETARY` SystemRequests Timeout sequence is managed by Core for PROPRIETARY mode, and HTTP header is only added to snapshot on the first attempt. --- app/controller/SettingsController.js | 21 ++++++--------------- ffw/BasicCommunicationRPC.js | 12 +++++++++--- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/app/controller/SettingsController.js b/app/controller/SettingsController.js index 7b0d1f315..338eebe50 100644 --- a/app/controller/SettingsController.js +++ b/app/controller/SettingsController.js @@ -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 ); diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 6fb65b082..c5081a37b 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -243,7 +243,10 @@ FFW.BasicCommunication = FFW.RPCObserver } else { this.OnSystemRequest('PROPRIETARY'); } - SDL.SettingsController.policyUpdateRetry(); + + if (FLAGS.ExternalPolicies === true) { + SDL.SettingsController.policyUpdateRetry(); + } } }, /** @@ -289,6 +292,11 @@ FFW.BasicCommunication = FFW.RPCObserver case 'UP_TO_DATE': { messageCode = 'StatusUpToDate'; + //Update is complete, stop retry sequence + if (FLAGS.ExternalPolicies === true) { + SDL.SettingsController.policyUpdateRetry('ABORT'); + } + SDL.SettingsController.policyUpdateFile = null; break; } case 'UPDATING': @@ -397,13 +405,11 @@ FFW.BasicCommunication = FFW.RPCObserver SDL.InfoAppsView.showAppList(); } if (request.method == 'BasicCommunication.SystemRequest') { - SDL.SettingsController.policyUpdateRetry('ABORT'); if(FLAGS.ExternalPolicies === true) { FFW.ExternalPolicies.unpack(request.params.fileName); } else { this.OnReceivedPolicyUpdate(request.params.fileName); } - SDL.SettingsController.policyUpdateFile = null; this.sendBCResult( SDL.SDLModel.data.resultCode.SUCCESS, request.id, From a5209ce25dd11c2e21fe5d238426bed68a9fdca0 Mon Sep 17 00:00:00 2001 From: Yurii Date: Thu, 19 Apr 2018 01:07:59 -0400 Subject: [PATCH 007/102] Updated WebHMI to support Expandable design for proprietary data exchange --- app/model/sdl/Abstract/data.js | 5 +++++ app/view/sdl/SystemRequestView.js | 23 ++++++++++++++++++++++- css/sdl.css | 12 ++++++++++++ ffw/BasicCommunicationRPC.js | 10 +++++++++- 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index dc0972919..fa191c796 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -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 * diff --git a/app/view/sdl/SystemRequestView.js b/app/view/sdl/SystemRequestView.js index 0b2ff639a..28c7cbd70 100644 --- a/app/view/sdl/SystemRequestView.js +++ b/app/view/sdl/SystemRequestView.js @@ -44,7 +44,9 @@ SDL.SystemRequest = Em.ContainerView.create( 'systemRequestViewTitle', 'systemRequestViewSelect', 'urlsLabel', + 'systemRequestLabel', 'urlsInput', + 'requestSubTypeInput', 'appIDSelect', 'appIDSelectTitle', 'sendButton', @@ -97,6 +99,16 @@ SDL.SystemRequest = Em.ContainerView.create( content: 'URL' } ), + /** + * Label for System Request Input + */ + systemRequestLabel: SDL.Label.extend( + { + elementId: 'systemRequestLabel', + classNames: 'systemRequestLabel', + content: 'System Request' + } + ), /** * Input for urls value changes */ @@ -109,6 +121,14 @@ SDL.SystemRequest = Em.ContainerView.create( ) } ), + + requestSubTypeInput: Ember.TextField.extend( + { + elementId: 'requestSubTypeInput', + classNames: 'requestSubTypeInput', + value: 'OEM specific request' + } + ), /** * Title of appID group of parameters */ @@ -173,7 +193,8 @@ SDL.SystemRequest = Em.ContainerView.create( element._parentView.systemRequestViewSelect.selection.name, element._parentView.fileNameInput.value, element._parentView.urlsInput.value, - element._parentView.appIDSelect.selection + element._parentView.appIDSelect.selection, + element._parentView.requestSubTypeInput.value ); }, onDown: false diff --git a/css/sdl.css b/css/sdl.css index 19d4dae12..81dc77fff 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -775,6 +775,7 @@ #VehicleInfo .speedInput, #VehicleInfo .fuelLevelInput, #systemRequestView .urlsInput, +#systemRequestView .requestSubTypeInput, #systemRequestView .policyAppIdInput, #systemRequestView .fileNameInput, #policies_settings_get_urls .listInput { @@ -799,6 +800,7 @@ } #systemRequestView .urlsInput, +#systemRequestView .requestSubTypeInput, #systemRequestView .policyAppIdInput, #systemRequestView .fileNameInput { height: 30px; @@ -813,6 +815,11 @@ left: 60px; } +#systemRequestView .systemRequestLabel { + top: 224px; + left: 13px; +} + #systemRequestView .policyAppIdLabel { top: 223px; left: 30px; @@ -827,6 +834,11 @@ top: 180px; } +#systemRequestView .requestSubTypeInput { + top: 217px; + +} + #systemRequestView .policyAppIdInput { top: 217px; } diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 6fb65b082..070e416cf 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -1122,7 +1122,7 @@ FFW.BasicCommunication = FFW.RPCObserver /** * Initiated by HMI. */ - OnSystemRequest: function(type, fileName, url, appID) { + OnSystemRequest: function(type, fileName, url, appID, subType) { Em.Logger.log('FFW.BasicCommunication.OnSystemRequest'); // send request var JSONMessage = { @@ -1143,6 +1143,14 @@ FFW.BasicCommunication = FFW.RPCObserver if (appID) { JSONMessage.params.appID = appID; } + if(subType.length > 0){ + if (type == 'OEM_SPECIFIC'|| + type == 'HTTP'|| + type == 'PROPRIETARY') { + JSONMessage.params.requestSubType = subType; + } + } + this.client.send(JSONMessage); }, /** From f4bd98670f0b53330aa8816bbf2343f8fb39cd81 Mon Sep 17 00:00:00 2001 From: Valerii Date: Thu, 19 Apr 2018 14:29:28 +0300 Subject: [PATCH 008/102] Bugfix error at the OnSystemRequest method and change name systemRequest Label Bugfix error at the ffw/BasicCommunication OnSystemRequest method with subType parameter which was null and which was calling. Change name systemRequest Label from 'System request' to 'requestSubType'. --- app/view/sdl/SystemRequestView.js | 2 +- ffw/BasicCommunicationRPC.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/sdl/SystemRequestView.js b/app/view/sdl/SystemRequestView.js index 28c7cbd70..018744364 100644 --- a/app/view/sdl/SystemRequestView.js +++ b/app/view/sdl/SystemRequestView.js @@ -106,7 +106,7 @@ SDL.SystemRequest = Em.ContainerView.create( { elementId: 'systemRequestLabel', classNames: 'systemRequestLabel', - content: 'System Request' + content: 'requestSubType' } ), /** diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 070e416cf..ecdca1979 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -1143,7 +1143,7 @@ FFW.BasicCommunication = FFW.RPCObserver if (appID) { JSONMessage.params.appID = appID; } - if(subType.length > 0){ + if(subType && subType.length > 0){ if (type == 'OEM_SPECIFIC'|| type == 'HTTP'|| type == 'PROPRIETARY') { From 5aa7f2177372b0071e59e61c907e6d8259d00b07 Mon Sep 17 00:00:00 2001 From: Yurii Date: Thu, 19 Apr 2018 01:07:59 -0400 Subject: [PATCH 009/102] Updated WebHMI to support Expandable design for proprietary data exchange --- app/model/sdl/Abstract/data.js | 5 +++++ app/view/sdl/SystemRequestView.js | 23 ++++++++++++++++++++++- css/sdl.css | 12 ++++++++++++ ffw/BasicCommunicationRPC.js | 10 +++++++++- 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index dc0972919..fa191c796 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -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 * diff --git a/app/view/sdl/SystemRequestView.js b/app/view/sdl/SystemRequestView.js index 0b2ff639a..018744364 100644 --- a/app/view/sdl/SystemRequestView.js +++ b/app/view/sdl/SystemRequestView.js @@ -44,7 +44,9 @@ SDL.SystemRequest = Em.ContainerView.create( 'systemRequestViewTitle', 'systemRequestViewSelect', 'urlsLabel', + 'systemRequestLabel', 'urlsInput', + 'requestSubTypeInput', 'appIDSelect', 'appIDSelectTitle', 'sendButton', @@ -97,6 +99,16 @@ SDL.SystemRequest = Em.ContainerView.create( content: 'URL' } ), + /** + * Label for System Request Input + */ + systemRequestLabel: SDL.Label.extend( + { + elementId: 'systemRequestLabel', + classNames: 'systemRequestLabel', + content: 'requestSubType' + } + ), /** * Input for urls value changes */ @@ -109,6 +121,14 @@ SDL.SystemRequest = Em.ContainerView.create( ) } ), + + requestSubTypeInput: Ember.TextField.extend( + { + elementId: 'requestSubTypeInput', + classNames: 'requestSubTypeInput', + value: 'OEM specific request' + } + ), /** * Title of appID group of parameters */ @@ -173,7 +193,8 @@ SDL.SystemRequest = Em.ContainerView.create( element._parentView.systemRequestViewSelect.selection.name, element._parentView.fileNameInput.value, element._parentView.urlsInput.value, - element._parentView.appIDSelect.selection + element._parentView.appIDSelect.selection, + element._parentView.requestSubTypeInput.value ); }, onDown: false diff --git a/css/sdl.css b/css/sdl.css index 19d4dae12..81dc77fff 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -775,6 +775,7 @@ #VehicleInfo .speedInput, #VehicleInfo .fuelLevelInput, #systemRequestView .urlsInput, +#systemRequestView .requestSubTypeInput, #systemRequestView .policyAppIdInput, #systemRequestView .fileNameInput, #policies_settings_get_urls .listInput { @@ -799,6 +800,7 @@ } #systemRequestView .urlsInput, +#systemRequestView .requestSubTypeInput, #systemRequestView .policyAppIdInput, #systemRequestView .fileNameInput { height: 30px; @@ -813,6 +815,11 @@ left: 60px; } +#systemRequestView .systemRequestLabel { + top: 224px; + left: 13px; +} + #systemRequestView .policyAppIdLabel { top: 223px; left: 30px; @@ -827,6 +834,11 @@ top: 180px; } +#systemRequestView .requestSubTypeInput { + top: 217px; + +} + #systemRequestView .policyAppIdInput { top: 217px; } diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index c5081a37b..21f3febad 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -1128,7 +1128,7 @@ FFW.BasicCommunication = FFW.RPCObserver /** * Initiated by HMI. */ - OnSystemRequest: function(type, fileName, url, appID) { + OnSystemRequest: function(type, fileName, url, appID, subType) { Em.Logger.log('FFW.BasicCommunication.OnSystemRequest'); // send request var JSONMessage = { @@ -1149,6 +1149,14 @@ FFW.BasicCommunication = FFW.RPCObserver if (appID) { JSONMessage.params.appID = appID; } + if(subType && subType.length > 0){ + if (type == 'OEM_SPECIFIC'|| + type == 'HTTP'|| + type == 'PROPRIETARY') { + JSONMessage.params.requestSubType = subType; + } + } + this.client.send(JSONMessage); }, /** From bbbc3758ccf998773b6058724bd025e77835438b Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 19 Apr 2018 11:03:04 -0400 Subject: [PATCH 010/102] Fix error reading from VehicleInfo model with `clusterModeStatus` field --- app/model/sdl/VehicleInfoModel.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 80255c19c..f4ebb4f44 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -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; } } From f3ff580fb6a9b31bc7fc0c4238226540ed572a35 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 19 Apr 2018 11:21:01 -0400 Subject: [PATCH 011/102] Add missing validation method for UI.SetGlobalProperties --- app/controller/sdl/RPCController.js | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index de6ece571..c93e5716a 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -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 * From ca4d2e51d21c84ad8aabeb377aa3e2c46b3698ae Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 19 Apr 2018 10:43:39 -0400 Subject: [PATCH 012/102] Add basic handling of SendHapticData messages --- app/controller/sdl/RPCController.js | 6 ++++++ ffw/UIRPC.js | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index de6ece571..dd58d110a 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -1229,6 +1229,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 * diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index b645de375..6b3b314ff 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -321,6 +321,14 @@ FFW.UI = FFW.RPCObserver.create( } break; } + case 'UI.SendHapticData': + { + this.sendError( + SDL.SDLModel.data.resultCode.UNSUPPORTED_REQUEST, request.id, + request.method, 'Haptic data is not supported' + ); + break; + } case 'UI.ChangeRegistration': { if (request.params.appName) { From e7ea2f7d83ed5bae79be6a4449f27f25f26846d4 Mon Sep 17 00:00:00 2001 From: KVGrygoriev Date: Fri, 11 May 2018 13:19:09 +0300 Subject: [PATCH 013/102] Extend the tire pressure API by adding new parameter to the tirePressure structure --- app/model/sdl/VehicleInfoModel.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index f4ebb4f44..47fb2f179 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -170,22 +170,34 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'rightFront': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'leftRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'rightRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'innerLeftRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'innerRightRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 } }, 'odometer': 23, From b10f0821f2585def5e8c847534319657745eb762 Mon Sep 17 00:00:00 2001 From: Andrii Kalinich Date: Mon, 14 May 2018 17:00:31 +0300 Subject: [PATCH 014/102] Implementation of ttsChunks audio playback Added AudioPlayer class for playing audio chunks sequence from request. Updated TTS popup window logic. Added new TTS capability type. --- app/model/sdl/Abstract/Model.js | 11 +++- app/util/AudioPlayer.js | 101 ++++++++++++++++++++++++++++++++ app/view/home/controlButtons.js | 28 +++++---- app/view/sdl/TTSPopUp.js | 15 ++++- ffw/TTSRPC.js | 3 +- index.html | 1 + 6 files changed, 143 insertions(+), 16 deletions(-) create mode 100644 app/util/AudioPlayer.js diff --git a/app/model/sdl/Abstract/Model.js b/app/model/sdl/Abstract/Model.js index 2ff22668e..fc4cdc8b1 100644 --- a/app/model/sdl/Abstract/Model.js +++ b/app/model/sdl/Abstract/Model.js @@ -1092,12 +1092,17 @@ SDL.SDLModel = Em.Object.extend({ */ onPrompt: function(ttsChunks, appID) { - var message = ''; + var message = '', files = ''; if (ttsChunks) { for (var i = 0; i < ttsChunks.length; i++) { - message += ttsChunks[i].text + '\n'; + if ('TEXT' == ttsChunks[i].type) { + message += ttsChunks[i].text + '\n'; + } + if ('FILE' == ttsChunks[i].type) { + files += ttsChunks[i].text + '\n'; + } } - SDL.TTSPopUp.ActivateTTS(message, appID); + SDL.TTSPopUp.ActivateTTS(message, files, appID); } }, diff --git a/app/util/AudioPlayer.js b/app/util/AudioPlayer.js new file mode 100644 index 000000000..7606dce76 --- /dev/null +++ b/app/util/AudioPlayer.js @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/** + * @name SDL.AudioPlayer + * @desc HTML5 Audio player + * @category utils + * @filesource app/util/AudioPlayer.js + * @version 1.0 + */ + +SDL.AudioPlayer = Em.Object.extend({ + + /** + * Array of audio files to play + */ + playlist: [], + + /** + * Audio player component + */ + audio: new Audio(), + + /** + * Add audio file to the playlist + */ + addFile: function(path) { + if (path != '') { + this.playlist.push(path); + } + }, + + /** + * Clear audio files playlist + */ + clearFiles: function() { + this.set('playlist', []); + }, + + /** + * Start playlist playing + */ + playFiles: function() { + if (this.playlist.length == 0) { + Em.Logger.log('Playing has finished'); + this.stopPlaying(); + return; + } + if (!this.audio.paused) { + Em.Logger.log('Audio is already playing'); + return; + } + + var path = this.playlist[0]; + this.playlist.shift(); + + Em.Logger.log('Playing: ' + path); + var self = this; + this.audio.onended = function() { + self.audio.src = ''; + self.playFiles(); + } + this.audio.src = path; + this.audio.play(); + }, + + /** + * Stop playlist playing + */ + stopPlaying: function() { + this.audio.onended = null; + if (!this.audio.paused) { + Em.Logger.log('Playing has stopped'); + this.audio.pause(); + this.audio.src = ''; + } + } + +}); diff --git a/app/view/home/controlButtons.js b/app/view/home/controlButtons.js index cac639e22..e595ad5a3 100644 --- a/app/view/home/controlButtons.js +++ b/app/view/home/controlButtons.js @@ -338,12 +338,15 @@ SDL.ControlButtons = Em.ContainerView.create({ var str = ''; if (SDL.SDLController.model && SDL.SDLController.model.globalProperties.helpPrompt) { - var i = 0; - for (i = 0; i < - SDL.SDLController.model.globalProperties.helpPrompt.length; i++) { - str += SDL.SDLController.model.globalProperties.helpPrompt[i].text + - ' '; + var items = SDL.SDLController.model.globalProperties.helpPrompt; + for (var i = 0; i < items.length; ++i) { + var item = items[i]; + if ('FILE' == item.type) { + str += '[Audio File] '; + } else { + str += item.text + ' '; + } } } return str; @@ -366,12 +369,15 @@ SDL.ControlButtons = Em.ContainerView.create({ var str = ''; if (SDL.SDLController.model && SDL.SDLController.model.globalProperties.timeoutPrompt) { - var i = 0; - for (i = 0; i < - SDL.SDLController.model.globalProperties.timeoutPrompt.length; i++) { - str += - SDL.SDLController.model.globalProperties.timeoutPrompt[i].text + - ' '; + + var items = SDL.SDLController.model.globalProperties.timeoutPrompt; + for (var i = 0; i < items.length; ++i) { + var item = items[i]; + if ('FILE' == item.type) { + str += '[Audio File] '; + } else { + str += item.text + ' '; + } } } diff --git a/app/view/sdl/TTSPopUp.js b/app/view/sdl/TTSPopUp.js index 20e197d47..3da09e11b 100644 --- a/app/view/sdl/TTSPopUp.js +++ b/app/view/sdl/TTSPopUp.js @@ -52,6 +52,7 @@ SDL.TTSPopUp = Em.ContainerView.create( timer: null, appID: null, timerSeconds: 5, + player: SDL.AudioPlayer.create(), popUp: Ember.TextArea.extend( { elementId: 'popUp', @@ -101,13 +102,22 @@ SDL.TTSPopUp = Em.ContainerView.create( this.set('timerSeconds', 10); FFW.TTS.OnResetTimeout(this.appID, 'TTS.Speak'); }, - ActivateTTS: function(msg, appID) { + ActivateTTS: function(msg, files, appID) { if (this.timer || this.active) { this.DeactivateTTS(); } var self = this; this.set('appID', appID); this.set('content', msg); + + if (files != '') { + var files_to_play = files.split('\n'); + for (var i = 0; i < files_to_play.length; ++i) { + this.player.addFile(files_to_play[i]); + } + this.player.playFiles(); + } + this.set('active', true); clearInterval(this.timer); this.timer = setInterval( @@ -115,6 +125,7 @@ SDL.TTSPopUp = Em.ContainerView.create( self.set('timerSeconds', self.timerSeconds - 1); }, 1000 ); // timeout for TTS popUp timer interval in milliseconds + FFW.TTS.Started(); }, timerHandler: function() { @@ -125,6 +136,8 @@ SDL.TTSPopUp = Em.ContainerView.create( DeactivateTTS: function() { clearInterval(this.timer); this.timer = null; + this.player.stopPlaying(); + this.player.clearFiles(); this.set('active', false); this.appID = null; this.set('timerSeconds', 5); diff --git a/ffw/TTSRPC.js b/ffw/TTSRPC.js index 5ba271dd2..96401a30a 100644 --- a/ffw/TTSRPC.js +++ b/ffw/TTSRPC.js @@ -213,7 +213,8 @@ FFW.TTS = FFW.RPCObserver.create( 'result': { 'speechCapabilities': [ 'TEXT', - 'PRE_RECORDED' + 'PRE_RECORDED', + 'FILE' ], 'prerecordedSpeechCapabilities': [ 'HELP_JINGLE', diff --git a/index.html b/index.html index bbf7cf161..1bd467929 100644 --- a/index.html +++ b/index.html @@ -90,6 +90,7 @@ + From 10ebe26ab1d9af94113c47e9f3b25f47a584bce7 Mon Sep 17 00:00:00 2001 From: KVGrygoriev Date: Thu, 17 May 2018 19:32:29 +0300 Subject: [PATCH 015/102] Add suport for submenu icon --- app/controller/sdl/RPCController.js | 10 ++++++++++ app/model/sdl/Abstract/AppModel.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index 98d91d98c..21fd8063f 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -1425,6 +1425,16 @@ SDL.RPCController = Em.Object.create( }; return this.resultStruct; } + if ('menuIcon' in params && + ( + params.menuIcon.imageType !== 'DYNAMIC' && + params.menuIcon.imageType !== 'STATIC')) { + this.resultStruct = { + 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, + 'resultMessage': 'Unsupported image type!' + }; + return this.resultStruct; + } if (params.cmdID == null) { this.resultStruct = { 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, diff --git a/app/model/sdl/Abstract/AppModel.js b/app/model/sdl/Abstract/AppModel.js index a6caef0e9..9a9573119 100644 --- a/app/model/sdl/Abstract/AppModel.js +++ b/app/model/sdl/Abstract/AppModel.js @@ -403,7 +403,7 @@ SDL.ABSAppModel = Em.Object.extend( parent: 0, position: request.params.menuParams.position ? request.params.menuParams.position : 0, - icon: request.params.subMenuIcon ? request.params.subMenuIcon.value : null + icon: request.params.menuIcon ? request.params.menuIcon.value : null }; if (SDL.SDLController.getApplicationModel(request.params.appID) && SDL.OptionsView.active) { From 7c42ed3bc22712606cd19ae8b34153cfaad6152e Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Mon, 21 May 2018 14:57:32 +0300 Subject: [PATCH 016/102] Added PopUp when activate App whis RCFunctionality = false. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HMI show pop up “Enable remote control feature for all mobile apps? Please press Yes to enable remote control or No to cancel. See Settings to disable.” If user presses Yes, enable Remote Control. --- app/controller/sdl/Abstract/Controller.js | 30 ++++++++++++++++++++--- app/view/info/appsView.js | 9 +++++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index ce3522f1b..dd18563b3 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -1071,11 +1071,33 @@ SDL.SDLController = Em.Object.extend( * * @param {Object} */ - onActivateSDLApp: function(element) { - if (SDL.SDLModel.data.VRActive) { - SDL.SDLModel.data.toggleProperty('VRActive'); + onActivateSDLApp: function(element) { + reverseFunctionalityEnabled = SDL.SDLModel.get('reverseFunctionalityEnabled'); + function ActivateSDLApp(enable_rc){ + if(enable_rc && !reverseFunctionalityEnabled){ + SDL.SDLController.toggleRSDLFunctionality(); + } + + if (SDL.SDLModel.data.VRActive) { + SDL.SDLModel.data.toggleProperty('VRActive'); + } + FFW.BasicCommunication.ActivateApp(element.appID); + } + + if (reverseFunctionalityEnabled){ + ActivateSDLApp(true); + return; } - FFW.BasicCommunication.ActivateApp(element.appID); + + popUp = SDL.PopUp.create(); + popUp.buttonOk.text = "Yes"; + popUp.buttonCancel.text = "No"; + + popUp.appendTo('body').popupActivate( + 'Enable remote control feature for all mobile apps?' + + 'Please press Yes to enable remote control or No to cancel.', + ActivateSDLApp + ); }, /** * Method sent custom softButtons pressed and event status to RPC diff --git a/app/view/info/appsView.js b/app/view/info/appsView.js index 5420029fa..8a0e09fd4 100644 --- a/app/view/info/appsView.js +++ b/app/view/info/appsView.js @@ -83,7 +83,12 @@ SDL.InfoAppsView = Em.ContainerView.create({ } ) ); - } else if (apps[i].appType.indexOf('REMOTE_CONTROL') != -1) { + } else if (apps[i].appType.indexOf('REMOTE_CONTROL') != -1 && + apps[i].level != 'NONE' && + apps[i].level != 'BACKGROUND' || + SDL.SDLModel.driverDeviceInfo && + apps[i].deviceName === SDL.SDLModel.driverDeviceInfo.name) { + var driverDevice = ( SDL.SDLModel.driverDeviceInfo && apps[i].deviceName == SDL.SDLModel.driverDeviceInfo.name); @@ -101,7 +106,7 @@ SDL.InfoAppsView = Em.ContainerView.create({ classNames: 'list-item button', iconBinding: 'SDL.SDLModel.data.registeredApps.' + appIndex + '.appIcon', - disabled: SDL.InfoAppsView.isRcAppDisabled(apps[i], driverDevice) + disabled: false }) ); } From 68b5b558911cded7a275735c2999b88db6e7524c Mon Sep 17 00:00:00 2001 From: Valerii Date: Tue, 22 May 2018 15:24:04 +0300 Subject: [PATCH 017/102] Fix bug when the HMI freezed after switching from active app to another media source --- app/StateManager.js | 3 +++ app/view/home/statusMediaView.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/StateManager.js b/app/StateManager.js index f546e11ef..718e7173f 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -325,6 +325,9 @@ var StateManager = Em.StateManager.extend( enter: function() { if (SDL.SDLModel.data.mediaPlayerActive) { SDL.SDLController.onEventChanged('player', false); + SDL.MediaController.deactivateCD(); + SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateRadio(); } SDL.MediaController.set('activeState', SDL.States.nextState); diff --git a/app/view/home/statusMediaView.js b/app/view/home/statusMediaView.js index 92cd67dc9..554801cf5 100644 --- a/app/view/home/statusMediaView.js +++ b/app/view/home/statusMediaView.js @@ -101,7 +101,11 @@ SDL.StatusMediaView = Em.ContainerView.extend({ if (SDL.MediaController.activeState.indexOf('media.sdlmedia') >= 0) { SDL.SDLMediaController.activateCurrentApp(); - } else { + } + else if (SDL.MediaController.activeState.indexOf('navigationApp.baseNavigation') >= 0) { + SDL.SDLMediaController.activateCurrentApp(); + } + else { SDL.States.goToStates(SDL.MediaController.activeState); } } From a3781a729b37c8fdc064263155dd3aa5142a3129 Mon Sep 17 00:00:00 2001 From: KVGrygoriev Date: Tue, 22 May 2018 18:01:47 +0300 Subject: [PATCH 018/102] Add support for submenu icon --- app/controller/sdl/RPCController.js | 9 +++++++++ app/model/sdl/Abstract/AppModel.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index 98d91d98c..067102cdd 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -1425,6 +1425,15 @@ SDL.RPCController = Em.Object.create( }; return this.resultStruct; } + if ('menuIcon' in params && + (params.menuIcon.imageType !== 'DYNAMIC' && + params.menuIcon.imageType !== 'STATIC')) { + this.resultStruct = { + 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, + 'resultMessage': 'Unsupported image type!' + }; + return this.resultStruct; + } if (params.cmdID == null) { this.resultStruct = { 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, diff --git a/app/model/sdl/Abstract/AppModel.js b/app/model/sdl/Abstract/AppModel.js index a6caef0e9..9a9573119 100644 --- a/app/model/sdl/Abstract/AppModel.js +++ b/app/model/sdl/Abstract/AppModel.js @@ -403,7 +403,7 @@ SDL.ABSAppModel = Em.Object.extend( parent: 0, position: request.params.menuParams.position ? request.params.menuParams.position : 0, - icon: request.params.subMenuIcon ? request.params.subMenuIcon.value : null + icon: request.params.menuIcon ? request.params.menuIcon.value : null }; if (SDL.SDLController.getApplicationModel(request.params.appID) && SDL.OptionsView.active) { From 0c4e8c348ef2b8d2126256bfbc2bc45612f6ed6b Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Tue, 22 May 2018 11:15:37 -0400 Subject: [PATCH 019/102] Add secondaryGraphic to UI Capabilities --- ffw/UIRPC.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index 6b3b314ff..4139dc22e 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -665,6 +665,18 @@ FFW.UI = FFW.RPCObserver.create( 'resolutionHeight': 64 } }, + { + 'name': 'secondaryGraphic', + 'imageTypeSupported': [ + 'GRAPHIC_BMP', + 'GRAPHIC_JPEG', + 'GRAPHIC_PNG' + ], + 'imageResolution': { + 'resolutionWidth': 64, + 'resolutionHeight': 64 + } + }, { 'name': 'showConstantTBTIcon', 'imageTypeSupported': [ @@ -1201,6 +1213,18 @@ FFW.UI = FFW.RPCObserver.create( 'resolutionHeight': 64 } }, + { + 'name': 'secondaryGraphic', + 'imageTypeSupported': [ + 'GRAPHIC_BMP', + 'GRAPHIC_JPEG', + 'GRAPHIC_PNG' + ], + 'imageResolution': { + 'resolutionWidth': 64, + 'resolutionHeight': 64 + } + }, { 'name': 'showConstantTBTIcon', 'imageTypeSupported': [ From a7005daa0b2b446e71fea0fa1d400f85d4252ce5 Mon Sep 17 00:00:00 2001 From: KVGrygoriev Date: Tue, 22 May 2018 18:30:23 +0300 Subject: [PATCH 020/102] Revert changes merged mistakenly Was merged two PR with wrong flow. As the result this PR reverts changes https://github.com/smartdevicelink/sdl_hmi/pull/79 https://github.com/smartdevicelink/sdl_hmi/pull/82 --- app/controller/sdl/RPCController.js | 10 ---------- app/model/sdl/Abstract/AppModel.js | 2 +- app/model/sdl/VehicleInfoModel.js | 24 ++++++------------------ 3 files changed, 7 insertions(+), 29 deletions(-) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index 21fd8063f..98d91d98c 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -1425,16 +1425,6 @@ SDL.RPCController = Em.Object.create( }; return this.resultStruct; } - if ('menuIcon' in params && - ( - params.menuIcon.imageType !== 'DYNAMIC' && - params.menuIcon.imageType !== 'STATIC')) { - this.resultStruct = { - 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, - 'resultMessage': 'Unsupported image type!' - }; - return this.resultStruct; - } if (params.cmdID == null) { this.resultStruct = { 'resultCode': SDL.SDLModel.data.resultCode.INVALID_DATA, diff --git a/app/model/sdl/Abstract/AppModel.js b/app/model/sdl/Abstract/AppModel.js index 9a9573119..a6caef0e9 100644 --- a/app/model/sdl/Abstract/AppModel.js +++ b/app/model/sdl/Abstract/AppModel.js @@ -403,7 +403,7 @@ SDL.ABSAppModel = Em.Object.extend( parent: 0, position: request.params.menuParams.position ? request.params.menuParams.position : 0, - icon: request.params.menuIcon ? request.params.menuIcon.value : null + icon: request.params.subMenuIcon ? request.params.subMenuIcon.value : null }; if (SDL.SDLController.getApplicationModel(request.params.appID) && SDL.OptionsView.active) { diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 47fb2f179..f4ebb4f44 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -170,34 +170,22 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' }, 'rightFront': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' }, 'leftRear': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' }, 'rightRear': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' }, 'innerLeftRear': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' }, 'innerRightRear': { - 'status': 'UNKNOWN', - 'tpms' : 'UNKNOWN', - 'pressure' : 0 + 'status': 'UNKNOWN' } }, 'odometer': 23, From 13a010fd9ef35650c47622c9a4760dd8dc3d34e6 Mon Sep 17 00:00:00 2001 From: KVGrygoriev Date: Tue, 22 May 2018 18:45:59 +0300 Subject: [PATCH 021/102] Extend the tire pressure API by adding new parameter to the tirePressure struct --- app/model/sdl/VehicleInfoModel.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index f4ebb4f44..47fb2f179 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -170,22 +170,34 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'rightFront': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'leftRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'rightRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'innerLeftRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 }, 'innerRightRear': { - 'status': 'UNKNOWN' + 'status': 'UNKNOWN', + 'tpms' : 'UNKNOWN', + 'pressure' : 0 } }, 'odometer': 23, From 511f644f977fb601f0473d968a40b52c4cc7db21 Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 25 May 2018 12:41:52 +0300 Subject: [PATCH 022/102] Fix bug HMI showed popUp when the application type isn't `REMOTE_CONTROL` --- app/controller/sdl/Abstract/Controller.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index dd18563b3..e4d3e1d3b 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -1089,6 +1089,7 @@ SDL.SDLController = Em.Object.extend( return; } + if(SDL.SDLController.getApplicationModel(element.appID).appType.indexOf('REMOTE_CONTROL')!=-1){ popUp = SDL.PopUp.create(); popUp.buttonOk.text = "Yes"; popUp.buttonCancel.text = "No"; @@ -1097,7 +1098,11 @@ SDL.SDLController = Em.Object.extend( 'Enable remote control feature for all mobile apps?' + 'Please press Yes to enable remote control or No to cancel.', ActivateSDLApp - ); + ); + }else + { + ActivateSDLApp(false); + } }, /** * Method sent custom softButtons pressed and event status to RPC From 684cd3d59b8a99e5a5ec43a3f5e56f5bd33646a9 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 29 May 2018 15:48:00 -0400 Subject: [PATCH 023/102] Add `engineOilLife` and `fuelRange` to vehicle info model --- app/model/sdl/VehicleInfoModel.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index f4ebb4f44..750ec0e83 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -108,6 +108,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'fuelLevel': 'VEHICLEDATA_FUELLEVEL', 'fuelLevel_State': 'VEHICLEDATA_FUELLEVEL_STATE', 'instantFuelConsumption': 'VEHICLEDATA_FUELCONSUMPTION', + 'fuelRange': 'VEHICLEDATA_FUELRANGE', 'externalTemperature': 'VEHICLEDATA_EXTERNTEMP', 'vin': 'VEHICLEDATA_VIN', 'prndl': 'VEHICLEDATA_PRNDL', @@ -127,7 +128,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'engineTorque': 'VEHICLEDATA_ENGINETORQUE', 'accPedalPosition': 'VEHICLEDATA_ACCPEDAL', 'steeringWheelAngle': 'VEHICLEDATA_STEERINGWHEEL', - 'fuelRange': 'VEHICLEDATA_FUELRANGE', + 'engineOilLife': 'VEHICLEDATA_ENGINEOILLIFE', 'abs_State': 'VEHICLEDATA_ABS_STATE', 'turnSignal': 'VEHICLEDATA_TURNSIGNAL', 'tirePressureValue': 'VEHICLEDATA_TIREPRESSURE_VALUE', @@ -188,6 +189,12 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'status': 'UNKNOWN' } }, + 'fuelRange': [ + { + 'type':'GASOLINE', + 'range': 400 + } + ], 'odometer': 23, 'beltStatus': { 'driverBeltDeployed': 'NOT_SUPPORTED', @@ -269,7 +276,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'engineTorque': 2.5E0, 'accPedalPosition': 10.5E0, 'steeringWheelAngle': 1.2E0, - 'fuelRange': 10.5E0, + 'engineOilLife': 20.4E0, 'abs_State': 'ACTIVE', 'turnSignal': 'ACTIVE', 'tirePressureValue': { From 442872780cab88e3eb0ec9a64e8c6efc3f724f19 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 1 Jun 2018 11:17:45 +0300 Subject: [PATCH 024/102] Fix style issues --- css/sdl.css | 1 - ffw/BasicCommunicationRPC.js | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/css/sdl.css b/css/sdl.css index 81dc77fff..179bac85b 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -836,7 +836,6 @@ #systemRequestView .requestSubTypeInput { top: 217px; - } #systemRequestView .policyAppIdInput { diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 21f3febad..468020b5f 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -1149,14 +1149,14 @@ FFW.BasicCommunication = FFW.RPCObserver if (appID) { JSONMessage.params.appID = appID; } - if(subType && subType.length > 0){ - if (type == 'OEM_SPECIFIC'|| - type == 'HTTP'|| - type == 'PROPRIETARY') { - JSONMessage.params.requestSubType = subType; + if (subType && subType.length > 0) { + if (type == 'OEM_SPECIFIC'|| + type == 'HTTP'|| + type == 'PROPRIETARY') { + JSONMessage.params.requestSubType = subType; } } - + this.client.send(JSONMessage); }, /** From 300388142dec1b953bca9a00c2553c4009edbf5f Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Thu, 7 Jun 2018 13:29:57 +0300 Subject: [PATCH 025/102] Fix condition for including requestSubType parameter --- ffw/BasicCommunicationRPC.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 468020b5f..3a4db33d8 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -1149,12 +1149,12 @@ FFW.BasicCommunication = FFW.RPCObserver if (appID) { JSONMessage.params.appID = appID; } - if (subType && subType.length > 0) { - if (type == 'OEM_SPECIFIC'|| - type == 'HTTP'|| - type == 'PROPRIETARY') { - JSONMessage.params.requestSubType = subType; - } + + var requestSubTypeNotApplicable = + (JSONMessage.params.fileType == 'BINARY' && type == "HTTP") || + (JSONMessage.params.fileType == 'JSON' && type == "PROPRIETARY"); + if (subType && subType.length > 0 && !requestSubTypeNotApplicable) { + JSONMessage.params.requestSubType = subType; } this.client.send(JSONMessage); From 2971868d394721120afb77bddb38d4e57e92a481 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Thu, 14 Jun 2018 18:24:25 +0300 Subject: [PATCH 026/102] Style issues fixes --- app/BasicCommunicationRPC.js | 2 +- app/controller/sdl/Abstract/Controller.js | 2 +- ffw/BasicCommunicationRPC.js | 29 ++++++++++++----------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/BasicCommunicationRPC.js b/app/BasicCommunicationRPC.js index 95e93c3b7..4b814beed 100644 --- a/app/BasicCommunicationRPC.js +++ b/app/BasicCommunicationRPC.js @@ -124,7 +124,7 @@ FFW.BasicCommunication = FFW.RPCObserver .subscribeToNotification(this.onSDLConsentNeededNotification); this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); - }, + }, /** * Client is unregistered - no more requests */ diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index 482e196cf..ce3522f1b 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -408,7 +408,7 @@ SDL.SDLController = Em.Object.extend( } } FFW.BasicCommunication.onReady(); - }.observes('SDL.SDLModel.data.registeredComponents.@each.state'), + }.observes('SDL.SDLModel.data.registeredComponents.@each.state'), /** * Show VrHelpItems popup with necessary params * if VRPopUp is active - show data from Global Properties diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 2fa0158d8..115079ae5 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -124,9 +124,11 @@ FFW.BasicCommunication = FFW.RPCObserver .subscribeToNotification(this.onSDLConsentNeededNotification); this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); - setTimeout(function() {FFW.BasicCommunication.OnSystemTimeReady();}, - 500); - }, + setTimeout(function() { + FFW.BasicCommunication.OnSystemTimeReady(); + }, 500 + ); + }, /** * Client is unregistered - no more requests */ @@ -520,7 +522,7 @@ FFW.BasicCommunication = FFW.RPCObserver } if (request.method == 'BasicCommunication.GetSystemTime') { var date = new Date(); - var systemTime={ + var systemTime = { millisecond: date.getMilliseconds(), second: date.getSeconds(), minute: date.getMinutes(), @@ -533,17 +535,16 @@ FFW.BasicCommunication = FFW.RPCObserver }; var JSONMessage = { - 'jsonrpc': '2.0', - 'id': request.id, - 'result': { - 'code': SDL.SDLModel.data.resultCode.SUCCESS, // type (enum) from SDL protocol - 'method': request.method, - 'systemTime':systemTime - } - }; - - this.client.send(JSONMessage); + 'jsonrpc': '2.0', + 'id': request.id, + 'result': { + 'code': SDL.SDLModel.data.resultCode.SUCCESS, // type (enum) from SDL protocol + 'method': request.method, + 'systemTime':systemTime + } + }; + this.client.send(JSONMessage); } } }, From e82f3f63b2b67cf5d53bb519e55971d23b76c268 Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Mon, 18 Jun 2018 12:59:12 -0400 Subject: [PATCH 027/102] Style fix --- ffw/BasicCommunicationRPC.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ffw/BasicCommunicationRPC.js b/ffw/BasicCommunicationRPC.js index 115079ae5..907cf0b54 100644 --- a/ffw/BasicCommunicationRPC.js +++ b/ffw/BasicCommunicationRPC.js @@ -125,9 +125,8 @@ FFW.BasicCommunication = FFW.RPCObserver this.onResumeAudioSourceSubscribeRequestID = this.client .subscribeToNotification(this.onResumeAudioSourceNotification); setTimeout(function() { - FFW.BasicCommunication.OnSystemTimeReady(); - }, 500 - ); + FFW.BasicCommunication.OnSystemTimeReady(); + }, 500); }, /** * Client is unregistered - no more requests From 8737e15ffb634a974459bb69bdbd4386a1874891 Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 18 Apr 2018 17:50:27 +0300 Subject: [PATCH 028/102] Add implementation template images on the HMI for next RPC: - SetGlobalProperties - AddCommand - Show - ShowConstantTBT - SendLocation - UpdateTurnList - Alert - ScrollableMessage - AlertManeuver - CreateInteractionChoiceSet --- app/controller/sdl/Abstract/Controller.js | 20 +- app/controlls/Button.js | 22 ++- app/controlls/Label.js | 25 ++- app/controlls/MenuList.js | 9 +- app/model/sdl/Abstract/AppModel.js | 18 +- app/model/sdl/Abstract/Model.js | 8 +- app/model/sdl/Abstract/data.js | 5 + app/model/sdl/MediaModel.js | 26 ++- app/view/home/controlButtons.js | 57 +++++- app/view/info/appsView.js | 13 +- app/view/media/sdl/controllsView.js | 3 +- app/view/sdl/AlertPopUp.js | 15 +- app/view/sdl/shared/interactionChoicesView.js | 22 ++- app/view/sdl/shared/optionsView.js | 6 +- app/view/sdl/shared/scrollableMessage.js | 7 + app/view/sdl/shared/tbtTurnList.js | 18 +- app/view/sdl/shared/turnByTurnView.js | 54 +++-- css/buttonControls.css | 15 ++ css/general.css | 87 +++++++- css/sdl.css | 187 +++++++++++++++++- ffw/NavigationRPC.js | 71 ++++++- images/list/list_item_bg_day.png | Bin 0 -> 3565 bytes images/list/list_item_bg_night.png | Bin 0 -> 3539 bytes images/sdl/new_apps.png | Bin 1424 -> 1625 bytes images/template/imagetype-pattern-day.png | Bin 0 -> 2022 bytes .../imagetype-pattern-highlighted.png | Bin 0 -> 1313 bytes images/template/imagetype-pattern-night.png | Bin 0 -> 1237 bytes 27 files changed, 635 insertions(+), 53 deletions(-) create mode 100644 images/list/list_item_bg_day.png create mode 100644 images/list/list_item_bg_night.png create mode 100644 images/template/imagetype-pattern-day.png create mode 100644 images/template/imagetype-pattern-highlighted.png create mode 100644 images/template/imagetype-pattern-night.png diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index e4d3e1d3b..18239dbeb 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -50,6 +50,7 @@ SDL.SDLController = Em.Object.extend( * Active application model binding type {SDLAppModel} */ model: null, + isWarning:false, /** * Function to add application to application list */ @@ -177,7 +178,11 @@ SDL.SDLController = Em.Object.extend( * SDL.Button */ onChoiceInteraction: function(element) { + if(!SDL.InteractionChoicesView.get('warning')){ SDL.InteractionChoicesView.deactivate('SUCCESS', element.choiceID); + }else{ + SDL.InteractionChoicesView.deactivate('WARNINGS', element.choiceID); + } }, /** * Call Keyboard view activation method @@ -511,7 +516,12 @@ SDL.SDLController = Em.Object.extend( switch (element.groupName) { case 'AlertPopUp': { + if(!this.isWarning){ SDL.AlertPopUp.deactivate(); + }else{ + SDL.AlertPopUp.deactivate(this.isWarning); + this.set('isWarning',false); + } break; } case 'ScrollableMessage': @@ -731,7 +741,14 @@ SDL.SDLController = Em.Object.extend( messageRequestId, 'UI.ScrollableMessage' ); - } else { + }else if(result == SDL.SDLModel.data.resultCode.WARNINGS) { + FFW.UI.sendUIResult( + result, + messageRequestId, + 'UI.ScrollableMessage' + ); + } + else { FFW.UI.sendError( result, messageRequestId, @@ -739,6 +756,7 @@ SDL.SDLController = Em.Object.extend( 'ScrollableMessage aborted!' ); } + SDL.ScrollableMessage.set('warning',false); }, /** * Method to do necessary actions when user navigate throught the menu diff --git a/app/controlls/Button.js b/app/controlls/Button.js index 0b692f1a3..340f2c51b 100644 --- a/app/controlls/Button.js +++ b/app/controlls/Button.js @@ -38,7 +38,8 @@ SDL.Button = Em.View.extend(Ember.TargetActionSupport, ], classNameBindings: [ - 'pressed', 'disabled', 'hidden' + 'pressed', 'disabled', 'hidden', + 'dayMode','nightMode','highLightedMode' ], /** Pressed state binding */ @@ -47,6 +48,9 @@ SDL.Button = Em.View.extend(Ember.TargetActionSupport, /** Disable actions on button */ disabled: false, + dayMode:false, + nightMode:false, + highLightedMode:false, /** Button icon class */ icon: null, @@ -75,6 +79,17 @@ SDL.Button = Em.View.extend(Ember.TargetActionSupport, helpMode: false, /** */ targetElement: null, + setMode:function(mode){ + this.set('dayMode',false); + this.set('nightMode',false); + this.set('highLightedMode',false); + switch(mode){ + case SDL.SDLModel.data.imageModeList[0]:this.set('dayMode',true);break; + case SDL.SDLModel.data.imageModeList[1]:this.set('nightMode',true);break; + case SDL.SDLModel.data.imageModeList[2]:this.set('highLightedMode',true);break; + default:this.set('dayMode',true); + } + }, actionDown: function(event) { @@ -165,6 +180,11 @@ SDL.Button = Em.View.extend(Ember.TargetActionSupport, '' + '{{view.text}}' ), + rightTextOverLay: Em.Handlebars.compile( + '' + + '' + + '{{view.text}}' + ), arrow: Em.Handlebars.compile( '' + diff --git a/app/controlls/Label.js b/app/controlls/Label.js index 183c1f287..9ff8e9bc8 100644 --- a/app/controlls/Label.js +++ b/app/controlls/Label.js @@ -33,10 +33,24 @@ SDL.Label = Em.View.extend({ classNameBindings: [ - 'disabled' + 'disabled','dayMode','nightMode', + 'highLightedMode' ], classNames: 'label', - + dayMode:false, + nightMode:false, + highLightedMode:false, + setMode:function(mode){ + this.set('dayMode',false); + this.set('nightMode',false); + this.set('highLightedMode',false); + switch(mode){ + case SDL.SDLModel.data.imageModeList[0]:this.set('dayMode',true);break; + case SDL.SDLModel.data.imageModeList[1]:this.set('nightMode',true);break; + case SDL.SDLModel.data.imageModeList[2]:this.set('highLightedMode',true);break; + default:this.set('dayMode',true); + } + }, // component default template defaultTemplate: Em.Handlebars.compile('{{view.content}}'), @@ -44,7 +58,12 @@ SDL.Label = Em.View.extend({ icon: Em.Handlebars.compile( '' + '{{view.content}}' - ) + ), + iconOverLay: Em.Handlebars.compile( + '' + + '' + + '{{view.content}}' + ), } /** Define button template */ diff --git a/app/controlls/MenuList.js b/app/controlls/MenuList.js index 3a2232522..e8adeeb32 100644 --- a/app/controlls/MenuList.js +++ b/app/controlls/MenuList.js @@ -49,14 +49,19 @@ SDL.MenuList = Em.ContainerView.extend({ pushObject(SDL.Button.create(SDL.PresetEventsCustom, { text: buttons[i].text, icon: buttons[i].image ? buttons[i].image.value : '', - templateName: buttons[i].image ? 'rightText' : 'text', groupName: 'AlertPopUp', - classNameBindings: ['isHighlighted:isHighlighted'], + classNameBindings: ['isHighlighted:isHighlighted', + 'getCurrentDisplayModeClass'], + getCurrentDisplayModeClass: function() { + return SDL.ControlButtons.getCurrentDisplayModeClass( + SDL.ControlButtons.imageMode.selection); + }.property('SDL.ControlButtons.imageMode.selection'), isHighlighted: buttons[i].isHighlighted ? true : false, softButtonID: buttons[i].softButtonID, systemAction: buttons[i].systemAction, groupName: this.groupName, classNames: 'softButton', + templateName: buttons[i].image ? buttons[i].image.isTemplate ? 'rightTextOverLay' : 'rightText' : 'text', appID: appID } ) diff --git a/app/model/sdl/Abstract/AppModel.js b/app/model/sdl/Abstract/AppModel.js index a6caef0e9..71588c797 100644 --- a/app/model/sdl/Abstract/AppModel.js +++ b/app/model/sdl/Abstract/AppModel.js @@ -331,7 +331,10 @@ SDL.ABSAppModel = Em.Object.extend( name: request.params.menuParams.menuName, parent: parentID, position: request.params.menuParams.position ? - request.params.menuParams.position : 0, + request.params.menuParams.position : 0, + isTemplate:request.params.cmdIcon ? + request.params.cmdIcon.isTemplate ?request.params.cmdIcon.isTemplate : null + : null, icon: request.params.cmdIcon ? request.params.cmdIcon.value : null }; if (SDL.SDLController.getApplicationModel(request.params.appID) && @@ -340,6 +343,19 @@ SDL.ABSAppModel = Em.Object.extend( SDL.OptionsView.commands.refreshItems(); } console.log(commands.length); + if(request.params.cmdIcon){ + var image = request.params.cmdIcon.value; + var length=image.length; + str='.png'; + var isPng=image.includes(str,length-5); + if(!isPng){ + FFW.UI.sendUIResult( + SDL.SDLModel.data.resultCode.WARNINGS, request.id, + request.method + ); + return; + } + } if (request.id >= 0) { FFW.UI.sendUIResult( SDL.SDLModel.data.resultCode.SUCCESS, request.id, diff --git a/app/model/sdl/Abstract/Model.js b/app/model/sdl/Abstract/Model.js index fc23ec808..bfc2d0434 100644 --- a/app/model/sdl/Abstract/Model.js +++ b/app/model/sdl/Abstract/Model.js @@ -569,7 +569,7 @@ SDL.SDLModel = Em.Object.extend({ set('constantTBTParams', params); SDL.SDLController.getApplicationModel(params.appID). set('tbtActivate', true); - + if (SDL.SDLController.model) { SDL.SDLController.activateTBT(); } @@ -898,10 +898,10 @@ SDL.SDLModel = Em.Object.extend({ var img = new Image(); img.onload = function() { - + var model=SDL.SDLController.getApplicationModel(message.appID); // code to set the src on success - SDL.SDLController.getApplicationModel(message.appID). - set('appIcon', message.syncFileName.value); + model.set('appIcon', message.syncFileName.value); + model.set('isTemplateIcon', message.syncFileName.isTemplate === true); FFW.UI.sendUIResult(SDL.SDLModel.data.resultCode.SUCCESS, id, method); }; img.onerror = function(event) { diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index 45d672710..7fa6659a3 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -630,6 +630,11 @@ SDL.SDLModelData = Em.Object.create( 'HU-HU', 'FI-FI', 'SK-SK' + ], + imageModeList:[ + 'Day mode', + 'Night mode', + 'Highlighted mode' ] } ); diff --git a/app/model/sdl/MediaModel.js b/app/model/sdl/MediaModel.js index 624c65a21..462d3c67a 100644 --- a/app/model/sdl/MediaModel.js +++ b/app/model/sdl/MediaModel.js @@ -66,7 +66,7 @@ SDL.SDLMediaModel = SDL.ABSAppModel.extend({ '', '' ], - alignment: 'text-align:center' + alignment:['text-align:center','top:100px'], } ) ); @@ -103,7 +103,9 @@ SDL.SDLMediaModel = SDL.ABSAppModel.extend({ * @param {Boolean} */ isPlaying: false, - + isTemplate:false, + mode:'', + /** * Flag for model active state currently used for status bar * @@ -137,6 +139,17 @@ SDL.SDLMediaModel = SDL.ABSAppModel.extend({ * * @param {Number} */ + setMode:function(mode){ + if(this.isTemplate){ + switch(mode){ + case SDL.SDLModel.data.imageModeList[0]:this.set('mode','day-mode');break; + case SDL.SDLModel.data.imageModeList[1]:this.set('mode','night-mode');break; + case SDL.SDLModel.data.imageModeList[2]:this.set('mode','high-lighted-mode');break; + default:this.set('mode',''); + } + } + else this.set('mode',''); + }, onDeleteApplication: function(appID) { SDL.SDLMediaController.onDeleteApplication(appID); @@ -341,14 +354,21 @@ SDL.SDLMediaModel = SDL.ABSAppModel.extend({ this.appInfo.set('alignment', 'text-align:center'); } - + if (params.graphic != null) { + var image = params.graphic.value; + var length=image.length; + str='.png'; + var isPng=image.includes(str,length-5); + if(isPng){ if (params.graphic.value != '') { this.appInfo.set('trackIcon', params.graphic.value); } else { this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg'); } + this.set('isTemplate', 'DYNAMIC' == params.graphic.imageType && params.graphic.isTemplate === true); } + } if ('softButtons' in params) { this.updateSoftButtons(params.softButtons); diff --git a/app/view/home/controlButtons.js b/app/view/home/controlButtons.js index e595ad5a3..f947a621e 100644 --- a/app/view/home/controlButtons.js +++ b/app/view/home/controlButtons.js @@ -53,8 +53,63 @@ SDL.ControlButtons = Em.ContainerView.create({ 'appUILang', 'appTTSVRLang', 'phoneCall', - 'keyboard' + 'keyboard', + 'imageMode', + 'imageModeLabel' ], + imageModeLabel: SDL.Label.extend({ + elementId: 'imageModeLabel', + classNames: 'imageModeLabel', + content: 'Display mode:' + } +), + +getCurrentDisplayModeClass: function() { + switch(SDL.ControlButtons.imageMode.selection){ + case SDL.SDLModel.data.imageModeList[0]: return 'day-mode'; + case SDL.SDLModel.data.imageModeList[1]: return 'night-mode'; + case SDL.SDLModel.data.imageModeList[2]: return 'high-lighted-mode'; + default: return ''; + } +}, +/** + * HMI element Select with list of supported image mode + */ + imageMode:Em.Select.extend({ + elementId: 'imageMode', + classNames: 'imageModeSelect', + contentBinding: 'SDL.SDLModel.data.imageModeList', + selection: 'Highlighted mode', + change:function(){ + SDL.InfoAppsView.findNewApps.setMode(this.selection); + SDL.InfoAppsView.Asist911.setMode(this.selection); + SDL.InfoAppsView.vehicleHealthReport.setMode(this.selection); + SDL.InfoAppsView.getDeviceList.setMode(this.selection); + SDL.InfoView.leftMenu.items.servicesButton.setMode(this.selection); + SDL.InfoView.leftMenu.items.appsButton.setMode(this.selection); + SDL.InfoView.leftMenu.items.calendarButton.setMode(this.selection); + SDL.InfoView.leftMenu.items.goToCD.setMode(this.selection); + SDL.InfoView.leftMenu.items.travelLinkButton.setMode(this.selection); + SDL.InfoView.leftMenu.items.sdlButton.setMode(this.selection); + SDL.TurnByTurnView.nextTurnIconImage.setMode(this.selection); + SDL.TurnByTurnView.turnIconImage.setMode(this.selection); + SDL.InteractionChoicesView.set('imageMode',this.selection); + SDL.InteractionChoicesView.updateIcons(); + if (SDL.SDLController.model) { + SDL.SDLController.model.setMode(this.selection); + length=SDL.OptionsView.commands.items.length; + var commands = SDL.SDLController.model.get('currentCommandsList'); + for(var i=0;i{{SDL.SDLController.model.appInfo.field2}}' + '
{{SDL.SDLController.model.appInfo.field3}}
' + '
{{SDL.SDLController.model.appInfo.mediaClock}}
' + - '' + + '' + + '' + '' + '{{/with}}' ) } diff --git a/app/view/sdl/AlertPopUp.js b/app/view/sdl/AlertPopUp.js index f50e3c1d5..a65b6a76e 100644 --- a/app/view/sdl/AlertPopUp.js +++ b/app/view/sdl/AlertPopUp.js @@ -122,7 +122,11 @@ SDL.AlertPopUp = Em.ContainerView.create( SDL.SDLController.alertResponse( SDL.SDLModel.data.resultCode['ABORTED'], this.alertRequestId ); - } else { + }else if(reason=='WARNINGS'){ + SDL.SDLController.alertResponse( + SDL.SDLModel.data.resultCode.WARNINGS, this.alertRequestId + ); + }else { SDL.SDLController.alertResponse( SDL.SDLModel.data.resultCode.SUCCESS, this.alertRequestId ); @@ -175,14 +179,19 @@ SDL.AlertPopUp = Em.ContainerView.create( SDL.PresetEventsCustom, { systemAction: params[i].systemAction, groupName: 'AlertPopUp', - classNameBindings: ['isHighlighted:isHighlighted'], + classNameBindings: ['isHighlighted:isHighlighted', + 'getCurrentDisplayModeClass'], + getCurrentDisplayModeClass: function() { + return SDL.ControlButtons.getCurrentDisplayModeClass( + SDL.ControlButtons.imageMode.selection); + }.property('SDL.ControlButtons.imageMode.selection'), isHighlighted: params[i].isHighlighted ? true : false, softButtonID: params[i].softButtonID, icon: params[i].image ? params[i].image.value : '', text: params[i].text, classNames: 'list-item softButton ' + softButtonsClass, elementId: 'softButton' + i, - templateName: params[i].image ? 'rightText' : 'text', + templateName: params[i].image ? params[i].image.isTemplate ? 'rightTextOverLay' : 'rightText' : 'text', appID: appID } ) diff --git a/app/view/sdl/shared/interactionChoicesView.js b/app/view/sdl/shared/interactionChoicesView.js index 04c065d1c..0d4cd2167 100644 --- a/app/view/sdl/shared/interactionChoicesView.js +++ b/app/view/sdl/shared/interactionChoicesView.js @@ -41,6 +41,7 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create( 'input', 'listWrapper' ], + warning:false, didInsertElement: function() { SDL.SDLModel.data.interactionListWrapper = new iScroll( 'listWrapper', { @@ -287,6 +288,14 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create( ); break; } + case 'WARNINGS': + { + SDL.SDLController.interactionChoiseCloseResponse( + this.appID, SDL.SDLModel.data.resultCode.WARNINGS, choiceID, + this.input.value + ); + break; + } default: { // default action @@ -355,6 +364,11 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create( * @param data: * Array */ + imageMode:'', + updateIcons:function(){ + for(var i=0;i= 0) { template = 'arrow'; - } else { + }else if(commands[i].isTemplate){ + template = commands[i].isTemplate ? + 'rightTextOverLay' : + 'rightText'; + }else { template = commands[i].icon ? 'rightText' : 'text'; } this.items.push( diff --git a/app/view/sdl/shared/scrollableMessage.js b/app/view/sdl/shared/scrollableMessage.js index 4da543d5e..a939f163f 100644 --- a/app/view/sdl/shared/scrollableMessage.js +++ b/app/view/sdl/shared/scrollableMessage.js @@ -49,6 +49,7 @@ SDL.ScrollableMessage = SDL.SDLAbstractView.create( appID: null, timer: null, timeout: null, + warning:false, childViews: [ 'backButton', 'captionText', 'softButtons', 'listOfCommands' ], @@ -63,10 +64,16 @@ SDL.ScrollableMessage = SDL.SDLAbstractView.create( this.set('active', false); this.softButtons.set('page', 0); this.timeout = null; + if(!this.warning){ SDL.SDLController.scrollableMessageResponse( ABORTED ? SDL.SDLModel.data.resultCode['ABORTED'] : SDL.SDLModel.data.resultCode.SUCCESS, this.messageRequestId ); + }else{ + SDL.SDLController.scrollableMessageResponse( + ABORTED ? SDL.SDLModel.data.resultCode['ABORTED'] : + SDL.SDLModel.data.resultCode.WARNINGS, this.messageRequestId + );} SDL.SDLController.onSystemContextChange(); }, activate: function(appName, params, messageRequestId) { diff --git a/app/view/sdl/shared/tbtTurnList.js b/app/view/sdl/shared/tbtTurnList.js index 82cd30703..260902d05 100644 --- a/app/view/sdl/shared/tbtTurnList.js +++ b/app/view/sdl/shared/tbtTurnList.js @@ -92,8 +92,13 @@ SDL.TBTTurnList = SDL.SDLAbstractView.create( turnListArray[i].turnIcon.value : '', content: turnListArray[i].navigationText ? turnListArray[i].navigationText.fieldText : '', - classNames: 'list-item', - templateName: turnListArray[i].turnIcon ? 'icon' : '' + classNames:turnListArray[i].turnIcon ? turnListArray[i].turnIcon.isTemplate ? ['list-item','ico-overlay'] : 'list-item':'' , + classNameBindings: 'getCurrentDisplayModeClass', + getCurrentDisplayModeClass: function() { + return SDL.ControlButtons.getCurrentDisplayModeClass( + SDL.ControlButtons.imageMode.selection); + }.property('SDL.ControlButtons.imageMode.selection'), + templateName: turnListArray[i].turnIcon ? turnListArray[i].turnIcon.isTemplate ? 'iconOverLay' : 'icon' : '' } ) ); @@ -109,15 +114,20 @@ SDL.TBTTurnList = SDL.SDLAbstractView.create( systemAction: turnListArray[i].systemAction, groupName: 'TBTList', classNameBindings: [ - 'isHighlighted:isHighlighted' + 'isHighlighted:isHighlighted', + 'getCurrentDisplayModeClass' ], + getCurrentDisplayModeClass: function() { + return SDL.ControlButtons.getCurrentDisplayModeClass( + SDL.ControlButtons.imageMode.selection); + }.property('SDL.ControlButtons.imageMode.selection'), isHighlighted: turnListArray[i].isHighlighted ? true : false, softButtonID: turnListArray[i].softButtonID, icon: turnListArray[i].image ? turnListArray[i].image.value : '', text: turnListArray[i].text, classNames: 'list-item softButton', elementId: 'softButton' + i, - templateName: turnListArray[i].image ? 'rightIcon' : 'text', + templateName: turnListArray[i].image ? 'rightTextOverLay' : 'text', appID: appID } ) diff --git a/app/view/sdl/shared/turnByTurnView.js b/app/view/sdl/shared/turnByTurnView.js index 8bac84332..26fea3415 100644 --- a/app/view/sdl/shared/turnByTurnView.js +++ b/app/view/sdl/shared/turnByTurnView.js @@ -64,6 +64,9 @@ SDL.TurnByTurnView = SDL.SDLAbstractView.create( distanceToManeuverScaletext: null, timeToDestinationtext: null, maneuverComplete: null, + isTemplateTurnIcon:false, + isTemplateNextTurnIcon:false, + mode:'day-mode', activate: function(appID) { var naviParams = SDL.SDLController.getApplicationModel( appID @@ -110,9 +113,20 @@ SDL.TurnByTurnView = SDL.SDLAbstractView.create( if (naviParams.turnIcon) { this.set('turnIcon', naviParams.turnIcon.value); } + if (naviParams.turnIcon) { + this.set('turnIcon', naviParams.turnIcon.value); + if (naviParams.turnIcon.isTemplate!=null) { + this.turnIconImage.setMode(SDL.ControlButtons.imageMode.selection); + } + this.set('isTemplateTurnIcon', naviParams.turnIcon.isTemplate === true); + } if (naviParams.nextTurnIcon) { this.set('nextTurnIcon', naviParams.nextTurnIcon.value); - } + if (naviParams.nextTurnIcon.isTemplate!=null) { + this.nextTurnIconImage.setMode(SDL.ControlButtons.imageMode.selection); + } + this.set('isTemplateNextTurnIcon', naviParams.nextTurnIcon.isTemplate === true); + } this.set('distanceToManeuvertext', naviParams.distanceToManeuver); this.set( 'distanceToManeuverScaletext', naviParams.distanceToManeuverScale @@ -170,36 +184,38 @@ SDL.TurnByTurnView = SDL.SDLAbstractView.create( templateName: 'arrow' } ), - turnIconImage: Em.View.create( + turnIconImage: SDL.Button.create( { classNames: 'turnIcon btn', - attributeBindings: [ - 'style' + classNameBindings: [ + 'this.parentView.isTemplateTurnIcon:is-template' ], - style: function() { - if (this._parentView.turnIcon) { - return 'background-image: URL(' + this._parentView.turnIcon + - ');'; + templateName: 'rightTextOverLay', + iconBinding: 'getIcon', + getIcon: function() { + if (this._parentView != null && this._parentView.turnIcon) { + return this._parentView.turnIcon; } else { return ''; - } - }.property('this.parentView.turnIcon') + } + }.property('this.parentView.turnIcon') } ), - nextTurnIconImage: Em.View.create( + nextTurnIconImage: SDL.Button.create( { classNames: 'nextTurnIcon btn', - attributeBindings: [ - 'style' + classNameBindings: [ + 'this.parentView.isTemplateNextTurnIcon:is-template' ], - style: function() { - if (this._parentView.nextTurnIcon) { - return 'background-image: URL(' + this._parentView.nextTurnIcon + - ');'; + templateName: 'rightTextOverLay', + iconBinding: 'getIcon', + getIcon: function() { + if (null!=this._parentView && this._parentView.nextTurnIcon) { + return this._parentView.nextTurnIcon; } else { return ''; - } - }.property('this.parentView.nextTurnIcon') + } + }.property('this.parentView.nextTurnIcon') } ), navigationText2: SDL.Label.extend( diff --git a/css/buttonControls.css b/css/buttonControls.css index d85aef717..59702c20b 100644 --- a/css/buttonControls.css +++ b/css/buttonControls.css @@ -495,7 +495,22 @@ margin-top: 10px; } +#app_controlButtons .imageModeSelect{ + position: absolute; + width: 150px; + height: 30px; + top: 252px; + left: 1215px; + color: white; + background: #393939; } + +#app_controlButtons .imageModeLabel { + top: 234px; + left: 1215px; + width: 150px; +} + #app_controlButtons .languageSelect { position: absolute; width: 150px; diff --git a/css/general.css b/css/general.css index dff15de59..6118c513b 100644 --- a/css/general.css +++ b/css/general.css @@ -41,6 +41,42 @@ div { padding: 0; } +#tbtTurnListView .list-item.high-lighted-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-highlighted.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + +#tbtTurnListView .list-item.day-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-day.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + +#tbtTurnListView .list-item.night-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-night.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + .ffw-button { cursor: pointer; background: url(../images/common/button.png) repeat-x; @@ -826,8 +862,8 @@ margin-top: 90px; height: 49px; float: left; width: 50px; - position: relative; - + position: absolute; + left:inherit; } .list-item span { @@ -1694,3 +1730,50 @@ to { border: 1px solid #fff; padding: 5px 15px 5px 15px; } + +.night-mode{ + background-image:url(../images/list/list_item_bg_night.png) !important; +} + +.day-mode{ + background-image:url(../images/list/list_item_bg_day.png) !important; +} + +.ffw-button.high-lighted-mode.is-template .ico-overlay{ + background:url(../images/template/imagetype-pattern-highlighted.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: no-repeat; + opacity: 0.4; + height: 50px; + width: 50px; + z-index: 1001; +} + +.ffw-button.day-mode.is-template .ico-overlay{ + background:url(../images/template/imagetype-pattern-day.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: no-repeat; + opacity: 0.6; + height: 50px; + width: 50px; + z-index: 1001; +} + +.ffw-button.night-mode.is-template .ico-overlay{ + background:url(../images/template/imagetype-pattern-night.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: no-repeat; + opacity: 0.6; + height: 50px; + width: 50px; + z-index: 1001; +} diff --git a/css/sdl.css b/css/sdl.css index 179bac85b..19e7d7288 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -65,6 +65,39 @@ float: left; } +.day-mode .ico-overlay{ + background:url(../images/template/imagetype-pattern-day.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + width: 50px; + height: 49px; + z-index: 1001; +} + +.night-mode .ico-overlay{ + background:url(../images/template/imagetype-pattern-night.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + width: 50px; + height: 49px; + z-index: 1001; +} + +.high-lighted-mode .ico-overlay{ + background:url(../images/template/imagetype-pattern-highlighted.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + width: 50px; + height: 49px; + z-index: 1001; +} + .softButton .right_text { padding-left: 5px !important; } @@ -223,6 +256,36 @@ position: relative; } +#sdl_options .day-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-day.png); + opacity: 0.6; + z-index: 1001; + position: absolute; + height: 49px; + width: 49px; +} + +#sdl_options .night-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-night.png); + opacity: 0.6; + z-index: 1001; + position: absolute; + height: 49px; + width: 49px; +} + +#sdl_options .high-lighted-mode .ico-overlay +{ + background:url(../images/template/imagetype-pattern-highlighted.png); + opacity: 0.6; + z-index: 1001; + position: absolute; + height: 49px; + width: 49px; +} + #info_nonMedia_options_submenu { z-index: 11000; width: 800px; @@ -447,7 +510,7 @@ #tbtTurnListView .list span, #perform_interaction_view .list span, #vr_help_list_view .list span { - margin-left: 15px; + margin-left: 55px; } #tbtTurnListView .list-content, @@ -488,6 +551,44 @@ background-repeat: repeat; } +#perform_interaction_view .naviChoises .ffw-button .ico{ + width: 110px; + height: 110px; +} + +#perform_interaction_view .naviChoises .ffw-button.day-mode .ico-overlay { + width: 110px; + height: 110px; + background:url(../images/template/imagetype-pattern-day.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + +#perform_interaction_view .naviChoises .ffw-button.night-mode .ico-overlay { + width: 110px; + height: 110px; + background:url(../images/template/imagetype-pattern-night.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + +#perform_interaction_view .naviChoises .ffw-button.high-lighted-mode .ico-overlay { + width: 110px; + height: 110px; + background:url(../images/template/imagetype-pattern-highlighted.png); + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + z-index: 1001; +} + #sdl_view_container .cd_logo { position: absolute; top: 90px; @@ -508,6 +609,27 @@ height: 109px; } +#sdl_view_container .is-template.day-mode { + background:url(../images/template/imagetype-pattern-day.png); + opacity: 0.6; + z-index: 1001; + position: absolute; +} + +#sdl_view_container .is-template.night-mode { + background:url(../images/template/imagetype-pattern-night.png); + opacity: 0.6; + z-index: 1001; + position: absolute; +} + +#sdl_view_container .is-template.high-lighted-mode { + background:url(../images/template/imagetype-pattern-highlighted.png); + opacity: 0.6; + z-index: 1001; + position: absolute; +} + #sdl_view_container .timeV2 { top: 155px; } @@ -1288,6 +1410,69 @@ background-repeat: no-repeat; } +#TurnByTurnView .turnIcon, +#TurnByTurnView .nextTurnIcon { + border: 1px solid #222; + left: 540px; + width: 100px; + height: 100px; + background-size: contain; + background-repeat: no-repeat; +} + +#TurnByTurnView .turnIcon .ico, +#TurnByTurnView .nextTurnIcon .ico +{ + width: 100px; + height: 100px; + background-repeat: round; +} + +#TurnByTurnView .turnIcon.high-lighted-mode.is-template .ico-overlay, +#TurnByTurnView .nextTurnIcon.high-lighted-mode.is-template .ico-overlay +{ + background:url(../images/template/imagetype-pattern-highlighted.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.4; + width: 100px; + height: 100px; + z-index: 1001; +} + +#TurnByTurnView .turnIcon.day-mode.is-template .ico-overlay, +#TurnByTurnView .nextTurnIcon.day-mode.is-template .ico-overlay +{ + background:url(../images/template/imagetype-pattern-day.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.6; + width: 100px; + height: 100px; + z-index: 1001; +} + +#TurnByTurnView .turnIcon.night-mode.is-template .ico-overlay, +#TurnByTurnView .nextTurnIcon.night-mode.is-template .ico-overlay +{ + background:url(../images/template/imagetype-pattern-night.png); + top: 0px; + left: 0px; + position: absolute; + background-position: -6px -11px; + background-repeat: round; + opacity: 0.6; + width: 100px; + height: 100px; + z-index: 1001; +} + #TurnByTurnView .distanceToManeuver { top: 80px; left: 419px; diff --git a/ffw/NavigationRPC.js b/ffw/NavigationRPC.js index f7a5a76b3..560d075e6 100644 --- a/ffw/NavigationRPC.js +++ b/ffw/NavigationRPC.js @@ -159,6 +159,56 @@ FFW.Navigation = FFW.RPCObserver.create( } } }, + isPng:function(params){ + var returnValue=true; + if(params.nextTurnIcon){ + var image = params.nextTurnIcon.value; + var length=image.length; + str='.png'; + var isPng=image.includes(str,length-5); + if(!isPng){ + delete params.nextTurnIcon; + returnValue=false; + } + } + if(params.turnIcon){ + var image = params.turnIcon.value; + var length=image.length; + str='.png'; + var isPng=image.includes(str,length-5); + if(!isPng){ + delete params.turnIcon; + returnValue=false; + } + } + if(params.turnList){ + var countList=params.turnList.length; + for(var i=0;iCLx`!4dfIB>Z9U-`%@fn97`QP0IAd^-OXR)0MA{h*IpO2f9#H(myt zuw{NvOgz@v#x~8QS^dzR18Ys5KMBfw`QeDljAKa_uQ#s>$`dB6B=jtV<^nUk#C56lsTcvPQUjyF)=hTc$kE){7;3~h6MhJ1(0FE1&_nsU?XD6}dTi#a0!zN?>!XfNYSkzLEl1NlCV?QiN}Sf^&XRs)C80 ziJpP3Yei<6k&+#kf=y9MnpKdC8`KCO&sHg;q@=(~U%$M(T(8_%FTW^V-_X+1Qs2Nx z-^fT8s6w~6GOr}DLN~8i8Ds>+442g6`2AhRMhC&DEYXhJbC zPHmNp!A2wGB9Y`w4ZxBhe_MIxCZ?x`XQq^7!1N%5JyJ8%Gk~cAS-pQzCeV?IpoC+q zWC%`B3O0}ca7iu7EK5ysE6UFWCnInSTV>)77DK%LQh?}B!5uC}IQ8p;6S_VqWh13@ zPzC~v0do*AL+ZnGBuF*w!Kfu9h4E-`jRqGTqK16Ns32P*U$i=8|}I5;?NKlFdVz`)4m>Eak7aoP2ZchC_B9_E0^moH10 z4lnQ8UBtM@2KrtPh-V=yp|n=g0&UYzRGr?0nt(K9x`zkKJ!CpKGe zZz`H~`}66^ONyey5=@QVjy$WL?KUe?`t|BvHxGi Y=P(?e`a}QGBv7Bo)78&qol`;+08xh*u>b%7 literal 0 HcmV?d00001 diff --git a/images/list/list_item_bg_night.png b/images/list/list_item_bg_night.png new file mode 100644 index 0000000000000000000000000000000000000000..5e63490ae24ba39e50558232e44d9296a11e423e GIT binary patch literal 3539 zcmeAS@N?(olHy`uVBq!ia0vp^%s_0!!2~45a=twPQf*Zs5hX#1CLx`!4dfIB>Z9U-`%@fn97`QP0IAd^-OXR)0MA{h*IpO2f9#H(myt zuw{NvOgz@v#x~8QS^dzR18Ys5KMBfw`QeDljAKa_uQ#s>$`dB6B=jtV<^nUk#C56lsTcvPQUjyF)=hTc$kE){7;3~h6MhJ1(0FE1&_nsU?XD6}dTi#a0!zN?>!XfNYSkzLEl1NlCV?QiN}Sf^&XRs)C80 ziJpP3Yei<6k&+#kf=y9MnpKdC8`KCO&sHg;q@=(~U%$M(T(8_%FTW^V-_X+1Qs2Nx z-^fT8s6w~6GOr}DLN~8i8Ds>+442g6`2AhRMhC&DEYXhJbC zPHmNp!A2wGB9Y`w4ZxBhe_MIxCZ?x`XQq^7!1N%5JyJ8%Gk~cAS-pQzCeV?IpoC+q zWC%`B3O0}ca7iu7EK5ysE6UFWCnInSTV>)77DK%LQh?}B!5uC}IQ8p;6S_VqWh13@ zPzC~v0do*AL+ZnGBuF*w!Kfu9h4E-`jRqGTqK16Ns32P*U$i=8|}I5;?NKlFb9m8MU1EEJ#b z6nR-}*RPzFsF`{*Hv5XyFO?4Euit}Qiu@jTWL^kLJ8<%y$KD4mc7a_Js?2#-ur6E8 z_~ACAp;2tBgd|%O_Z6?T?a^sTA`KS;R|_aFpWc4^n@?o;E`=2jZ9glOG+s%Tnjv1X zz@;j|==^1(7x`3;+UROGiWi|A&vvzmXvre+P6)O+^Rd1Pl@i8%HKzDF6TkOi4sR zR9M5c*L`f2H<9>;;Q}UtLwVC9xY_wzx;kXM}XoZ|HQIdpn-o!XRFmsH;mE^iw zm&DxZ5xJQKEcT&Je+y=-HZBt_89@R;JSYx|f>@ZBS2Q5sN((Zn zu}qbed&*DE3GxFt<#pY--6L+k@!$-$R6w5J_=yU4>+q2lJ-R(;f|wF@PXE}J&j$(M z0l!czu2hATliFOiSgDwa5{|k$G9;65O|sr?;qzpRl;E0uIzffS5+mp329Qw4f0C$Q zk5k@9w}TqOB~+O;a{6zqq}W=wMy(5W`!op+4oHDT7Rw#Al7N^6mPL+sHU1esw>sbx zkZ+?ejHD$#B7zydt2lDK<$0Y+BuP2r@1g%*%SSpcbAs6asIa&$35zU^Jgr`IQat!< zVZE9hu*^8*s&+tqkdV+jWTu`Rf2+(98wz*AVbg3fDfFbA^PCbZP17sps-2EHWgcSg zvf49BRVo~WNja0_x01s^Iz1tw(*0@q*zN-l+Zv-I> zVS{xaS|tYekxl z8vjtHYRJAWvrL1-(c15^e?*=AS_bq=4GmYL7j&pn7I_-HsL7_Z!==wA`IcE;Rv+bM zrBb`p4G!19)pa@KkZ*c0@~6D2)&o{Ym6mSzS>|mu+Qaq&3%zHLjYfl*qT!LrOz!Yt`CizTzkm$6`UL>1mKQe`hVR#TP?Qr>&mU zp-j<`>_NiEE{fUgu~7S`HaMi*gsA_eoaDRS?H>~`-G&H3y`9>UTrh$KF*~dXwY2Hb z?R5J6Wk3lBB;033ttru~1sW4n%w?o{ozx@4*o zUNc#qrXZCZ4uTv@e=Uky9iH`8CWNFQrO|c?H~EoDS3H@Xgn^K$ewcQ&pSD|9W_QCR zf_Ae!?IA_l9kaRr$WPBn+&Xik&Dm{R_^Xh)6}i(CF$LDSHAtJdKO?hMD~#U!&8x$n z&?DKu)P~!z%$okMe!7x5Zi${-?C@T87iqM4Av`X}D^Cwmf4`kn6RrKATHVw~+0%aIyw2n(s%nUmBc5_jH}b{$5`V-A@4G&lvK?$m0j+jG@Rv001R)MObuXVRU6WVPkS-VRU5xGB7bXEig1KF)~y! zI65&fIx;saFf%$ZFuCF3%K!iXC3HntbYx+4WjbwdWNBu305UK!I4v+VEip1wF*rIg dFgh|fD=;%UFfhoxS$6;c002ovPDHLkV1kOI`wsvB delta 1397 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 Date: Wed, 6 Jun 2018 19:01:24 +0300 Subject: [PATCH 029/102] Removed unused code --- app/controller/sdl/Abstract/Controller.js | 11 --------- app/model/sdl/MediaModel.js | 24 +++++++++---------- app/view/sdl/shared/interactionChoicesView.js | 1 - app/view/sdl/shared/scrollableMessage.js | 7 ------ ffw/UIRPC.js | 3 ++- 5 files changed, 14 insertions(+), 32 deletions(-) diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index 18239dbeb..8f94cac55 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -50,7 +50,6 @@ SDL.SDLController = Em.Object.extend( * Active application model binding type {SDLAppModel} */ model: null, - isWarning:false, /** * Function to add application to application list */ @@ -178,11 +177,7 @@ SDL.SDLController = Em.Object.extend( * SDL.Button */ onChoiceInteraction: function(element) { - if(!SDL.InteractionChoicesView.get('warning')){ SDL.InteractionChoicesView.deactivate('SUCCESS', element.choiceID); - }else{ - SDL.InteractionChoicesView.deactivate('WARNINGS', element.choiceID); - } }, /** * Call Keyboard view activation method @@ -516,12 +511,7 @@ SDL.SDLController = Em.Object.extend( switch (element.groupName) { case 'AlertPopUp': { - if(!this.isWarning){ SDL.AlertPopUp.deactivate(); - }else{ - SDL.AlertPopUp.deactivate(this.isWarning); - this.set('isWarning',false); - } break; } case 'ScrollableMessage': @@ -756,7 +746,6 @@ SDL.SDLController = Em.Object.extend( 'ScrollableMessage aborted!' ); } - SDL.ScrollableMessage.set('warning',false); }, /** * Method to do necessary actions when user navigate throught the menu diff --git a/app/model/sdl/MediaModel.js b/app/model/sdl/MediaModel.js index 462d3c67a..bd47c704e 100644 --- a/app/model/sdl/MediaModel.js +++ b/app/model/sdl/MediaModel.js @@ -354,21 +354,21 @@ SDL.SDLMediaModel = SDL.ABSAppModel.extend({ this.appInfo.set('alignment', 'text-align:center'); } - + if (params.graphic != null) { var image = params.graphic.value; - var length=image.length; - str='.png'; - var isPng=image.includes(str,length-5); - if(isPng){ - if (params.graphic.value != '') { - this.appInfo.set('trackIcon', params.graphic.value); - } else { - this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg'); - } - this.set('isTemplate', 'DYNAMIC' == params.graphic.imageType && params.graphic.isTemplate === true); + var length = image.length; + str = '.png'; + var isPng = image.includes(str,length - 5); + if (isPng) { + if (params.graphic.value != '') { + this.appInfo.set('trackIcon', params.graphic.value); + } else { + this.appInfo.set('trackIcon', 'images/sdl/audio_icon.jpg'); + } + this.set('isTemplate', 'DYNAMIC' == params.graphic.imageType && params.graphic.isTemplate === true); + } } - } if ('softButtons' in params) { this.updateSoftButtons(params.softButtons); diff --git a/app/view/sdl/shared/interactionChoicesView.js b/app/view/sdl/shared/interactionChoicesView.js index 0d4cd2167..4f08be93e 100644 --- a/app/view/sdl/shared/interactionChoicesView.js +++ b/app/view/sdl/shared/interactionChoicesView.js @@ -41,7 +41,6 @@ SDL.InteractionChoicesView = SDL.SDLAbstractView.create( 'input', 'listWrapper' ], - warning:false, didInsertElement: function() { SDL.SDLModel.data.interactionListWrapper = new iScroll( 'listWrapper', { diff --git a/app/view/sdl/shared/scrollableMessage.js b/app/view/sdl/shared/scrollableMessage.js index a939f163f..4da543d5e 100644 --- a/app/view/sdl/shared/scrollableMessage.js +++ b/app/view/sdl/shared/scrollableMessage.js @@ -49,7 +49,6 @@ SDL.ScrollableMessage = SDL.SDLAbstractView.create( appID: null, timer: null, timeout: null, - warning:false, childViews: [ 'backButton', 'captionText', 'softButtons', 'listOfCommands' ], @@ -64,16 +63,10 @@ SDL.ScrollableMessage = SDL.SDLAbstractView.create( this.set('active', false); this.softButtons.set('page', 0); this.timeout = null; - if(!this.warning){ SDL.SDLController.scrollableMessageResponse( ABORTED ? SDL.SDLModel.data.resultCode['ABORTED'] : SDL.SDLModel.data.resultCode.SUCCESS, this.messageRequestId ); - }else{ - SDL.SDLController.scrollableMessageResponse( - ABORTED ? SDL.SDLModel.data.resultCode['ABORTED'] : - SDL.SDLModel.data.resultCode.WARNINGS, this.messageRequestId - );} SDL.SDLController.onSystemContextChange(); }, activate: function(appName, params, messageRequestId) { diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index 4139dc22e..de3fe4209 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -1424,7 +1424,8 @@ FFW.UI = FFW.RPCObserver.create( return; } Em.Logger.log('FFW.' + method + 'Response'); - if (resultCode === SDL.SDLModel.data.resultCode.SUCCESS) { + if (resultCode == SDL.SDLModel.data.resultCode.SUCCESS || + resultCode == SDL.SDLModel.data.resultCode.WARNINGS) { // send repsonse var JSONMessage = { From 9e388a7b2f5be3cfcf9a9869541e00354db18b52 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Wed, 20 Jun 2018 16:18:22 -0400 Subject: [PATCH 030/102] Add basic electronic park break status to hmi --- app/model/sdl/VehicleInfoModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 0561a7373..f03d4f6af 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -115,6 +115,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', 'odometer': 'VEHICLEDATA_ODOMETER', 'beltStatus': 'VEHICLEDATA_BELTSTATUS', + 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBREAKSTATUS', 'bodyInformation': 'VEHICLEDATA_BODYINFO', 'deviceStatus': 'VEHICLEDATA_DEVICESTATUS', 'eCallInfo': 'VEHICLEDATA_ECALLINFO', @@ -168,6 +169,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'externalTemperature': null, 'vin': '52-452-52-752', 'prndl': 'PARK', + 'electronicParkBrakeStatus': 'OPEN', 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { From 78e292a1eb05753cee89425e5a975d0770dcc92c Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Thu, 21 Jun 2018 16:54:49 -0400 Subject: [PATCH 031/102] add turn signal to vehicle model --- app/model/sdl/VehicleInfoModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 0561a7373..e40d2f126 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -110,6 +110,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'instantFuelConsumption': 'VEHICLEDATA_FUELCONSUMPTION', 'fuelRange': 'VEHICLEDATA_FUELRANGE', 'externalTemperature': 'VEHICLEDATA_EXTERNTEMP', + 'turnSignal': 'VEHICLEDATA_TURNSIGNAL', 'vin': 'VEHICLEDATA_VIN', 'prndl': 'VEHICLEDATA_PRNDL', 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', @@ -167,6 +168,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'instantFuelConsumption': 2.2E0, 'externalTemperature': null, 'vin': '52-452-52-752', + 'turnSignal': 'OFF', 'prndl': 'PARK', 'tirePressure': { 'pressureTelltale': 'OFF', From 6274fdd9ca8d7c9dd7b4213ce0f52c4a03191d58 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Fri, 22 Jun 2018 11:19:09 -0400 Subject: [PATCH 032/102] get the default value right --- app/model/sdl/VehicleInfoModel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index e40d2f126..0cc1a63e4 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -292,7 +292,6 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'steeringWheelAngle': 1.2E0, 'engineOilLife': 20.4E0, 'abs_State': 'ACTIVE', - 'turnSignal': 'ACTIVE', 'tirePressureValue': { 'leftFront': 2.2E0, 'rightFront': 2.2E0, From 4a5965da4b78469e7183ff39d8fa717b18376c67 Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 16 Mar 2018 16:42:28 +0200 Subject: [PATCH 033/102] Change method signature and implementation onInteriorVehicleDataNotification on the RCRPC --- app/model/ClimateControlModel.js | 2 +- app/model/media/RadioModel.js | 2 +- ffw/RCRPC.js | 13 +++---------- 3 files changed, 5 insertions(+), 12 deletions(-) mode change 100755 => 100644 app/model/media/RadioModel.js diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index f77fc6c6b..8397fdbed 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -222,7 +222,7 @@ SDL.ClimateControlModel = Em.Object.create({ var data = this.getClimateControlData(); data = SDL.SDLController.filterObjectProperty(data, properties); if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('CLIMATE', data, null); + FFW.RC.onInteriorVehicleDataNotification('CLIMATE', {climateControlData: data}); } }, diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js old mode 100755 new mode 100644 index 5ea902265..100ea8411 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -659,7 +659,7 @@ SDL.RadioModel = Em.Object.create({ var data = this.getRadioControlData(false); data = SDL.SDLController.filterObjectProperty(data, properties); if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('RADIO', null, data); + FFW.RC.onInteriorVehicleDataNotification('RADIO', {radioControlData: data}); } }, diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 7e9ea2009..a574d54a9 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -448,24 +448,17 @@ FFW.RC = FFW.RPCObserver.create( /** * @param moduleType */ - onInteriorVehicleDataNotification: function(moduleType, climateControlData, radioControlData) { + onInteriorVehicleDataNotification: function(moduleType, data) { var JSONMessage = { 'jsonrpc': '2.0', 'method': 'RC.OnInteriorVehicleData', 'params': { 'moduleData': { - 'moduleType': moduleType + 'moduleType': moduleType, + 'moduleData': data } } }; - if (climateControlData) { - JSONMessage.params.moduleData.climateControlData = - climateControlData; - } - if (radioControlData) { - JSONMessage.params.moduleData.radioControlData = - radioControlData; - } Em.Logger.log('FFW.RC.OnInteriorVehicleData Notification'); FFW.RC.client.send(JSONMessage); }, From aabf8972917977dd6203986d82e84b0f70fb2f7e Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 16 Mar 2018 16:48:11 +0200 Subject: [PATCH 034/102] Add RC audio modul --- app/StateManager.js | 90 ++++++++- app/controller/MediaController.js | 130 ++++++++++++- app/model/media/BluetoothModel.js | 51 ++++++ app/model/media/CDModel.js | 14 +- app/model/media/IPodModel.js | 51 ++++++ app/model/media/LineInModel.js | 51 ++++++ app/model/media/MediaCDPlayer.js | 2 +- app/model/media/RadioModel.js | 13 ++ app/model/media/USBModel.js | 43 ++++- app/view/media/audioView.js | 244 +++++++++++++++++++++++++ app/view/media/common/LeftMenuView.js | 55 +++++- app/view/media/player/bluetoothView.js | 35 ++++ app/view/media/player/radioView.js | 3 + app/view/media/player/usbView.js | 3 + app/view/mediaView.js | 4 +- css/media.css | 170 ++++++++++++++++- ffw/RCRPC.js | 12 ++ images/media/bl.png | Bin 0 -> 2345 bytes images/media/ico_bluetooth.png | Bin 0 -> 1749 bytes images/media/ico_ipod.png | Bin 0 -> 4350 bytes index.html | 7 + locale/eng.js | 4 + 22 files changed, 971 insertions(+), 11 deletions(-) create mode 100644 app/model/media/BluetoothModel.js create mode 100644 app/model/media/IPodModel.js create mode 100644 app/model/media/LineInModel.js mode change 100644 => 100755 app/model/media/RadioModel.js create mode 100644 app/view/media/audioView.js create mode 100644 app/view/media/player/bluetoothView.js create mode 100644 images/media/bl.png create mode 100644 images/media/ico_bluetooth.png create mode 100644 images/media/ico_ipod.png diff --git a/app/StateManager.js b/app/StateManager.js index 718e7173f..3358856eb 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -235,6 +235,7 @@ var StateManager = Em.StateManager.extend( enter: function() { SDL.MediaController.set('activeState', SDL.States.nextState); + //SDL.RadioModel.sendAudioNotification(); if (!SDL.RadioModel.radioControlStruct.radioEnable) { SDL.RadioModel.radioEnableKeyPress(); } @@ -244,9 +245,13 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateCD(); SDL.MediaController.currentSelectedPlayer.pause(); SDL.MediaController.deactivateUSB(); - if (SDL.RadioModel.radioControlStruct.radioEnable) { - SDL.RadioModel.radioEnableKeyPress(); - } + SDL.MediaController.deactivateBluetooth(); + SDL.MediaController.deactivateLineIn(); + SDL.MediaController.deactivateIPod(); + //SDL.RadioModel.sendAudioNotification(); + // if (SDL.RadioModel.radioControlStruct.radioEnable) { + // SDL.RadioModel.radioEnableKeyPress(); + // } this._super(); } } @@ -256,11 +261,16 @@ var StateManager = Em.StateManager.extend( enter: function() { SDL.MediaController.set('activeState', SDL.States.nextState); + SDL.CDModel.sendAudioNotification(); this._super(); }, exit: function() { SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateBluetooth(); + SDL.MediaController.deactivateLineIn(); + SDL.MediaController.deactivateIPod(); + SDL.RadioModel.sendAudioNotification(); this._super(); }, moreinfo: Em.State.create( @@ -273,12 +283,16 @@ var StateManager = Em.StateManager.extend( enter: function() { SDL.MediaController.set('activeState', SDL.States.nextState); + SDL.USBModel.sendAudioNotification(); this._super(); }, exit: function() { this._super(); SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateCD(); + SDL.MediaController.deactivateBluetooth(); + SDL.MediaController.deactivateLineIn(); + SDL.MediaController.deactivateIPod(); }, moreinfo: Em.State.create( { @@ -289,6 +303,76 @@ var StateManager = Em.StateManager.extend( } ) } + ), + + bluetooth: Em.State.create( + { + enter:function() + { + SDL.MediaController.set('activeState', + SDL.States.nextState); + SDL.BluetoothModel.sendAudioNotification(); + this._super(); + }, + exit:function() + { + this._super(); + SDL.MediaController.deactivateRadio(); + SDL.MediaController.deactivateCD(); + SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateLineIn(); + SDL.MediaController.deactivateIPod(); + }, + moreinfo:Em.State.create( + {} + ) + } + ), + ipod: Em.State.create( + { + enter:function() + { + SDL.MediaController.set('activeState', + SDL.States.nextState); + SDL.IPodModel.sendAudioNotification(); + this._super(); + }, + exit:function() + { + this._super(); + SDL.MediaController.deactivateRadio(); + SDL.MediaController.deactivateCD(); + SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateLineIn(); + SDL.MediaController.deactivateBluetooth(); + }, + moreinfo:Em.State.create( + {} + ) + } + ), + lineIn: Em.State.create( + { + enter:function() + { + SDL.MediaController.set('activeState', + SDL.States.nextState); + SDL.LineInModel.sendAudioNotification(); + this._super(); + }, + exit:function() + { + this._super(); + SDL.MediaController.deactivateRadio(); + SDL.MediaController.deactivateCD(); + SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateBluetooth(); + SDL.MediaController.deactivateIPod(); + }, + moreinfo:Em.State.create( + {} + ) + } ) } ), diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 951afbf2c..4006b5dc5 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -43,7 +43,41 @@ SDL.MediaController = Em.Object.create( /** * Current volume level in percents */ - currentVolume: 50, + currentVolume: 50, + radioControlStruct:{ + source:'AUDIO', + keepContext:true, + equalizerSettings:{ + channelSetting:50, + channelId: 50, + channelName: ' ' + }, + }, + radioControlAudioValue: + { + keepContext:true, + volume:true, + equalizerSettings:{ + channelSetting:true, + channelId:true, + channelName:true + }, + }, + + usbControl:{ + keepContext: false + }, + boolStruct: [ + true, + false + ], + saveButtonPress:function(){ + SDL.MediaController.toggleProperty('optionsEnabled'); + }, + optionsEnabled:false, + toggleOptions:function(){ + SDL.MediaController.toggleProperty('optionsEnabled'); + }, /** * Turn on CD */ @@ -73,6 +107,38 @@ SDL.MediaController = Em.Object.create( SDL.RadioModel.saveCurrentOptions(); SDL.RadioModel.set('active', true); }, + turnOnBluetooth: function(){ + if(!SDL.States.media.player.bluetooth.active) + { + SDL.States.goToStates('media.player.bluetooth'); + } + this.onPlayerEnter(SDL.BluetoothModel,'bluetooth'); + }, + + turnOnLineIn:function(){ + if(!SDL.States.media.player.lineIn.active) + { + SDL.States.goToStates('media.player.lineIn'); + } + this.onPlayerEnter(SDL.LineInModel,'lineIn'); + }, + + turnOnIPod:function(){ + if(!SDL.States.media.player.ipod.active) + { + SDL.States.goToStates('media.player.ipod'); + } + this.onPlayerEnter(SDL.IPodModel,'ipod'); + }, + // turnOnAudioOptions:function(){ + + + // // if(!SDL.States.media.player.audioOptions.active) + // // { + // // SDL.States.goToStates('media.player.audioOptions'); + // // } + // // this.onPlayerEnter(SDL.AudioModel,'audioOptions'); + // }, /** * Switching on Application */ @@ -134,6 +200,16 @@ SDL.MediaController = Em.Object.create( deactivateRadio: function() { SDL.RadioModel.set('active', false); }, + + deactivateBluetooth: function(){ + SDL.BluetoothModel.set('active',false); + }, + deactivateLineIn: function(){ + SDL.LineInModel.set('active',false); + }, + deactivateIPod:function(){ + SDL.IPodModel.set('active',false); + }, /** On player module enter event */ onPlayerEnter: function(data, state) { if (this.currentSelectedPlayer) { @@ -201,6 +277,9 @@ SDL.MediaController = Em.Object.create( this.changeSourceFromUSB(is_background); break; } + case 'media.player.bluetooth':{ + break; + } default: { this.changeSourceFromUnknown(is_background); } @@ -257,6 +336,55 @@ SDL.MediaController = Em.Object.create( SDL.States.goToStates(old_state); } }, + + getAudioControlData:function() + { + if(this.radioControlAudioValue.keepContext || this.radioControlAudioValue.volume + || this.radioControlAudioValue.equalizerSettings.channelId || this.radioControlAudioValue.equalizerSettings.channelName + || this.radioControlAudioValue.equalizerSettings.channelSetting) + { + var result={}; + var equalizer={}; + result.source=this.radioControlStruct.source; + if(this.radioControlAudioValue.volume){ + result.volume=this.currentVolume; + } + if(this.radioControlAudioValue.equalizerSettings.channelId){ + equalizer.channelId=this.radioControlStruct.equalizerSettings.channelId; + result.equalizerSettings=equalizer; + } + if(this.radioControlAudioValue.equalizerSettings.channelName){ + equalizer.channelName=this.radioControlStruct.equalizerSettings.channelName; + result.equalizerSettings=equalizer; + } + if(this.radioControlAudioValue.equalizerSettings.channelSetting){ + equalizer.channelSetting=this.radioControlStruct.equalizerSettings.channelSetting; + result.equalizerSettings=equalizer; + } + return result; + } + return null; + }, + setAudioControlData:function(data){ + if(data.source!=null){ + this.set('radioControlStruct.source',data.source); + } + if(data.equalizerSettings!=null) + { + if(data.equalizerSettings.channelSetting!=null) + { + this.set('radioControlStruct.equalizerSettings.channelSetting',data.equalizerSettings.channelSetting); + } + if(data.equalizerSettings.channelId!=null) + { + this.set('radioControlStruct.equalizerSettings.channelId',data.equalizerSettings.channelId); + } + if(data.equalizerSettings.channelName!=null) + { + this.set('radioControlStruct.equalizerSettings.channelName',data.equalizerSettings.channelName); + } + } + }, /** * turn on scan event */ diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js new file mode 100644 index 000000000..6441dbd02 --- /dev/null +++ b/app/model/media/BluetoothModel.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + SDL.BluetoothModel=Em.Object.create({ +active: false, +selectedIndex: 0, + sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='BLUETOOTH'; + }, +// init:function(){ +// this._super(); +// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); +// this.set('player.name','BLUETOOTH_STEREO_BTST'); +// }, + + + } + +); \ No newline at end of file diff --git a/app/model/media/CDModel.js b/app/model/media/CDModel.js index 2af364748..2c86453ad 100644 --- a/app/model/media/CDModel.js +++ b/app/model/media/CDModel.js @@ -142,6 +142,18 @@ SDL.CDModel = Em.Object.create({ homeWidgetIcon: 'images/media/cd-ico-home.png' } -) +), +sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='CD'; + }, } ); diff --git a/app/model/media/IPodModel.js b/app/model/media/IPodModel.js new file mode 100644 index 000000000..210bf9503 --- /dev/null +++ b/app/model/media/IPodModel.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + SDL.IPodModel=Em.Object.create({ +active: false, +selectedIndex:0, +sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='IPOD'; + }, +// init:function(){ +// this._super(); +// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); +// this.set('player.name','IPOD'); +// }, + + + } + +); \ No newline at end of file diff --git a/app/model/media/LineInModel.js b/app/model/media/LineInModel.js new file mode 100644 index 000000000..a79a1e26d --- /dev/null +++ b/app/model/media/LineInModel.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + SDL.LineInModel=Em.Object.create({ +active: false, +selectedIndex:0, +sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='LINE_IN'; + }, +// init:function(){ +// this._super(); +// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); +// this.set('player.name','LINE_IN'); +// }, + + + } + +); \ No newline at end of file diff --git a/app/model/media/MediaCDPlayer.js b/app/model/media/MediaCDPlayer.js index 07d7c02b4..06fa787e6 100644 --- a/app/model/media/MediaCDPlayer.js +++ b/app/model/media/MediaCDPlayer.js @@ -32,7 +32,7 @@ SDL.MediaCDPlayer = Em.Object.extend({ 'ALL', 'ONE' ], - + //var volume; /** media Player repeat state */ repeat: 'ALL', diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js old mode 100644 new mode 100755 index 100ea8411..911294124 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -77,6 +77,7 @@ SDL.RadioModel = Em.Object.create({ band: 'FM', + availableHDs: 3, hdChannelsStruct: [ @@ -1366,6 +1367,18 @@ SDL.RadioModel = Em.Object.create({ this.updateCurrentFrequencyInfo(); }, + sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='RADIO_TUNER'; + }, sendButtonPress: function() { var currentData = SDL.deepCopy(this.getCurrentOptions()); var changedData = SDL.deepCopy(this.lastOptionParams); diff --git a/app/model/media/USBModel.js b/app/model/media/USBModel.js index 6015257b0..da0f367a9 100644 --- a/app/model/media/USBModel.js +++ b/app/model/media/USBModel.js @@ -33,15 +33,54 @@ SDL.USBModel = Em.Object.create({ active: false, - + optionsEnabled:false, statusBar: 'Luk Marko', - + usbControl:{ + keepContext: false + }, +boolStruct: [ + true, + false + ], + equalizerSettings: { + channelId:10, + channelName:'Station' + }, /** USB Player*/ init: function() { this._super(); this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); this.set('player.name', 'USB'); }, + toggleOptions:function(){ + SDL.USBModel.toggleProperty('optionsEnabled'); + }, + sendAudioNotification:function() + { + this.setSource(); + var data = SDL.MediaController.getAudioControlData(); + if(data){ + FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + } + }, + setSource:function() + { + SDL.MediaController.radioControlStruct.source='USB'; + }, + // sendButton:function(){ + // var properties = {'source':'USB', + // 'equalizerSettings':{ + // 'channelId':this.equalizerSettings.channelId, + // 'channelName':this.equalizerSettings.channelName + // }, + // 'keepContext':this.usbControl.keepContext, + // 'volume':SDL.MediaController.currentVolume + // }; + // FFW.RC.onInteriorVehicleDataNotification('AUDIO',properties); + // }, + + + PlayList: SDL.Playlist.create({ selectedIndex: 0, diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js new file mode 100644 index 000000000..69a425268 --- /dev/null +++ b/app/view/media/audioView.js @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * · Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * · Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * · Neither the name of the Ford Motor Company nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + SDL.audioView= Em.ContainerView.extend( + { + elementId: 'media_options_menu', + // classNameBindings: [ + // 'SDL.States.media.player.audioOptions.active:active_state:inactive_state' + // ], + childViews:[ + 'optionsMenu', + 'preferencesButton' + ], + optionsMenu: Em.ContainerView.create( + { + elementId:'audio_options_view_container', + classNames:'option', + classNameBindings: ['SDL.MediaController.optionsEnabled:active_state:inactive_state'], + + childViews:[ + 'keepContextSelect', + 'keepContextLabel', + 'keepContextCheckBox', + 'volumeInput', + 'volumeLabel', + 'volumeCheckBox', + 'equalizerSettingsLabel', + 'equalizerChannelIdInput', + 'equalizerChannelIdLabel', + 'equalizerChannelIdCheckBox', + 'equalizerChannelNameInput', + 'equalizerChannelNameLabel', + 'equalizerChannelNameCheckBox', + 'equalizerChannelSettingLabel', + 'equalizerChannelSettingCheckBox', + 'equalizerChannelSettingInput', + 'save' + ], + equalizerChannelSettingLabel: SDL.Label.extend( + { + elementId: 'equalizerChannelSettingLabel', + classNames: 'equalizerChannelSettingLabel', + content: 'Channel set:', + } + ), + equalizerChannelSettingCheckBox:Em.Checkbox.extend( + { + elementId: 'equalizerChannelSettingCheckBox', + classNames: 'equalizerChannelSettingCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting' + } + ), + equalizerChannelSettingInput:Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId:'equalizerChannelSettingInput', + classNames:'equalizerChannelSettingInput', + valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelSetting', + isDisabled: function() { + return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting; + }.property( + 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting' + ), + disabledBinding: 'isDisabled' + } + ), + equalizerChannelIdLabel: SDL.Label.extend( + { + elementId: 'equalizerChannelIdLabel', + classNames: 'equalizerChannelIdLabel', + content: 'Channel id:', + } + ), + equalizerSettingsLabel:SDL.Label.extend({ + elementId:'equalizerSettingsLabel', + classNames:'equalizerSettingsLabel', + content:'Equalizer settings:' + } + ), + equalizerChannelNameLabel: SDL.Label.extend( + { + elementId: 'equalizerChannelNameLabel', + classNames: 'equalizerChannelNameLabel', + content: 'Channel name:', + } + ), + equalizerChannelNameInput:Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId:'equalizerChannelNameInput', + classNames:'equalizerChannelNameInput', + valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelName', + isDisabled: function() { + return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName; + }.property( + 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName' + ), + disabledBinding: 'isDisabled' + } + ), + equalizerChannelNameCheckBox:Em.Checkbox.extend( + { + elementId: 'equalizerChannelNameCheckBox', + classNames: 'equalizerChannelNameCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName' + } + ), + equalizerChannelIdInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId:'equalizerChannelIdInput', + classNames:'equalizerChannelIdInput', + valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelId', + isDisabled: function() { + return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId; + }.property( + 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId' + ), + disabledBinding: 'isDisabled' + } + ), + equalizerChannelIdCheckBox:Em.Checkbox.extend( + { + elementId: 'equalizerChannelIdCheckBox', + classNames: 'equalizerChannelIdCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId' + } + ), + keepContextSelect: Em.Select.extend( + { + attributeBindings: ['disabled'], + elementId:'keepContextSelect', + classNames:'keepContextSelect', + valueBinding: 'SDL.MediaController.radioControlStruct.keepContext', + contentBinding: 'SDL.USBModel.boolStruct', + isDisabled: function() { + return !SDL.MediaController.radioControlAudioValue.keepContext; + }.property( + 'SDL.MediaController.radioControlAudioValue.keepContext' + ), + disabledBinding: 'isDisabled' + } + ), + keepContextLabel: SDL.Label.extend( + { + elementId: 'keepContextLabel', + classNames: 'keepContextLabel', + content: 'Keep context:' + } + ), + keepContextCheckBox:Em.Checkbox.extend( + { + elementId: 'keepContextCheckBox', + classNames: 'keepContextCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.keepContext' + } + ), + volumeInput: Ember.TextField.extend( + { + elementId:'volumeInput', + classNames:'volumeInput', + valueBinding: 'SDL.MediaController.currentVolume', + disabled:true + } + ), + volumeLabel: SDL.Label.extend( + { + elementId: 'volumeLabel', + classNames: 'volumeLabel', + content: 'Volume:' + } + ), + volumeCheckBox:Em.Checkbox.extend( + { + elementId: 'volumeCheckBox', + classNames: 'volumeCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.volume' + } + ), + save: SDL.Button.extend( + { + elementId: 'save', + classNames: 'save', + text: 'Save', + onDown: false, + target: 'SDL.MediaController', + action: 'saveButtonPress' + } + ) + } + ), + preferencesButton: Em.ContainerView.extend( + { + elementId:'preferences', + classNames:'pref', + childViews:['optionsButton'], + optionsButton: SDL.Button.extend( + { + + attributeBindings: ['disabled'], + elementId: 'media_optionButton', + classNames: 'media_optionButton', + text: 'Options', + onDown: false, + target: 'SDL.MediaController', + action: 'toggleOptions', + isDisabled: function() { + return SDL.MediaController.optionsEnabled; + }.property( + 'SDL.MediaController.optionsEnabled' + ), + disabledBinding: 'isDisabled' + + } + ), + } + ), +} +); + + diff --git a/app/view/media/common/LeftMenuView.js b/app/view/media/common/LeftMenuView.js index 7920dd94a..8bf4e05ac 100644 --- a/app/view/media/common/LeftMenuView.js +++ b/app/view/media/common/LeftMenuView.js @@ -42,16 +42,23 @@ SDL.LeftMenuView = Em.ContainerView.extend( 'radio', 'cdButton', 'usbButton', + 'bluetoothButton', + 'lineInButton', + 'ipodButton', 'sdlButton' + ], /** Border decoration */ border: Em.View.extend( { elementId: 'media_left_menu_border', + classNames: 'ls_border' } ), - /** CD Station Button */ + + + /** Radio Station Button */ radio: SDL.Button.extend( { classNameBindings: [ @@ -71,6 +78,7 @@ SDL.LeftMenuView = Em.ContainerView.extend( { classNameBindings: [ 'SDL.States.media.player.cd.active:active_state' + ], elementId: 'media_cdButton', classNames: 'media-ls-item', @@ -91,10 +99,55 @@ SDL.LeftMenuView = Em.ContainerView.extend( classNames: 'media-ls-item', action: 'turnOnUSB', icon: 'images/media/ico_usb.png', + target: 'SDL.MediaController', textBinding: Ember.Binding.oneWay('SDL.locale.label.view_media_usb') } ), + bluetoothButton: SDL.Button.extend( + { + classNameBindings: [ + + 'SDL.States.media.player.bluetooth.active:active_state' + ], + action:'turnOnBluetooth', + elementId:'media_bluetoothButton', + classNames: 'media-ls-item', + icon: 'images/media/ico_bluetooth.png', + target:'SDL.MediaController', + textBinding: Ember.Binding.oneWay('SDL.locale.label.view_media_bluetooth') + + } + ), + + lineInButton: SDL.Button.extend( + { + classNameBindings:[ + 'SDL.States.media.player.lineIn.active:active_state' + ], + action:'turnOnLineIn', + elementId:'media_lineInButton', + classNames: 'media-ls-item', + target:'SDL.MediaController', + textBinding:Ember.Binding.oneWay('SDL.locale.label.view_media_lineIn') + }), + + ipodButton: SDL.Button.extend( + { + classNameBindings: [ + + 'SDL.States.media.player.ipod.active:active_state' + ], + action:'turnOnIPod', + elementId:'media_ipodButton', + classNames: 'media-ls-item', + icon: 'images/media/ico_ipod.png', + target:'SDL.MediaController', + textBinding: Ember.Binding.oneWay('SDL.locale.label.view_media_ipod') + } + ), + + /** SDL Button */ sdlButton: SDL.Button.extend( { diff --git a/app/view/media/player/bluetoothView.js b/app/view/media/player/bluetoothView.js new file mode 100644 index 000000000..113d46d04 --- /dev/null +++ b/app/view/media/player/bluetoothView.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +SDL.bluetoothView = Em.ContainerView.create( + { + elementId: 'media_player_bluetooth_view', + classNames: 'media_player_view_wrapper', + classNameBindings: [ + 'SDL.States.media.player.bluetooth.active:active_state:inactive_state' + ] + +} +); diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 5bfa25cdb..1a87c8aa6 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -49,6 +49,9 @@ SDL.RadioView = Em.ContainerView 'tuneButtons', 'optionsMenu' ], + + + optionsMenu: Em.ContainerView.create( { elementId: 'radio_options_view_container', diff --git a/app/view/media/player/usbView.js b/app/view/media/player/usbView.js index 2d657edad..282d0940f 100644 --- a/app/view/media/player/usbView.js +++ b/app/view/media/player/usbView.js @@ -22,6 +22,7 @@ SDL.usbView = Em.ContainerView.create( 'info', 'rightmenu' ], + info: Em.View.extend( { elementId: 'media_player_usb_view_info', @@ -37,6 +38,7 @@ SDL.usbView = Em.ContainerView.create( ) } ), + controlls: Em.ContainerView.extend( { elementId: 'media_player_usb_view_controlls', @@ -138,6 +140,7 @@ SDL.usbView = Em.ContainerView.create( onDown: false } ), + moreInfoButton: SDL.Button.extend( { classNameBindings: ['SDL.helpMode:moreinfoButton_help'], diff --git a/app/view/mediaView.js b/app/view/mediaView.js index 2af2772e8..97cec9f13 100644 --- a/app/view/mediaView.js +++ b/app/view/mediaView.js @@ -40,12 +40,14 @@ SDL.MediaView = Em.ContainerView.create( childViews: [ 'leftMenu', 'volumeMenu', + 'optionsMenu', SDL.playerView, SDL.sdlView ], /** Left Menu view component */ leftMenu: SDL.LeftMenuView, /** Volume Menu view component */ - volumeMenu: SDL.VolumeMenuView + volumeMenu: SDL.VolumeMenuView, + optionsMenu: SDL.audioView } ); diff --git a/css/media.css b/css/media.css index 443ea9854..93c0659c3 100644 --- a/css/media.css +++ b/css/media.css @@ -26,6 +26,27 @@ line-height: 48px; } +#media_bluetoothButton{ + font-size: 15px; + padding-left: 48px; + line-height: 48px; +} + +#media_lineInButton{ + font-size: 18px; + padding-left: 48px; + line-height: 48px; +} +#media_ipodButton{ + font-size: 18px; + padding-left: 48px; + line-height: 48px; +} +#media_audioOption{ + font-size: 13px; + padding-left: 48px; + line-height: 48px; +} #media_sdlButton { font-size: 18px; line-height: 48px; @@ -133,6 +154,11 @@ .media-ls-item.empty { background: #333333; } +#preferences .pref{ + top: 77px; + left: 546px; + z-index: 502; +} #radio_options_view_container.options { width: 458px; @@ -142,7 +168,6 @@ z-index: 1000; padding: 10px; } - #radio_options_view_container .bandCheckbox { position: absolute; left: 10px; @@ -969,6 +994,9 @@ .usbIco { background: url(../images/media/ico_usb.png) no-repeat !important } +/* .audioIco { + background: url(../images/media/ico_audio.png) no-repeat !important +} */ .appIco { background: url(../images/info/info_leftMenu_apps_ico.png) no-repeat !important @@ -981,6 +1009,146 @@ border: 1px solid #393939; } +.option{ + top:50px; + width: 300px; + height: 300px; + background-color: black; + border: 1px solid white; + z-index: 1000; + padding: 10px; + +} + +.pref{ + width: 150px; + height: 40px; + top:77px; + left:480px; + border-radius: 3px; + border: 1px solid #393939; + z-index: 900; +} +.pref .media_optionButton{ + height: 24px; + width: 128px; + float: auto; + padding: 8px; + padding-left: 14px; + z-index: 900; + text-align: center; +} +.option .keepContextLabel{ + left:25px; + top:20px; +} +.option .keepContextSelect{ + + top: 20px; + position: absolute; + width: 150px; + left: 130px; + height: 20px; + color: white; + background: #393939; +} +.option .keepContextCheckBox{ + position: absolute; + left: 5px; + top: 20px; +} +.option .equalizerSettingsLabel +{ + left:5px; + top:80px; +} +.option .equalizerChannelIdLabel{ + left:25px; + top:110px; +} +.option .equalizerChannelSettingLabel{ + left:25px; + top:170px; + font-size: 5; +} +.option .equalizerChannelSettingCheckBox{ + position: absolute; + left: 5px; + top: 170px; +} +.option .equalizerChannelSettingInput{ + top: 170px; + position: absolute; + width: 150px; + left: 130px; + height: 20px; + color: white; + background: #393939; + } +.option .volumeInput{ + top: 50px; + position: absolute; + width: 150px; + left: 130px; + height: 20px; + color: white; + background: #393939; + } +.option .volumeLabel{ + left:25px; + top:50px; + } + .option .volumeCheckBox{ + position: absolute; + left: 5px; + top: 50px; +} +.option .equalizerChannelIdInput{ + top: 110px; + position: absolute; + width: 150px; + left: 130px; + height: 20px; + color: white; + background: #393939; + } + .option .equalizerChannelIdCheckBox{ + position: absolute; + left: 5px; + top: 110px; + } +.option .equalizerChannelIdLabel{ + left:25px; + top:110px; + } + .option .equalizerChannelNameInput{ + top: 140px; + position: absolute; + width: 150px; + left: 130px; + height: 20px; + color: white; + background: #393939; + } + .option .equalizerChannelNameCheckBox{ + position: absolute; + left: 5px; + top: 140px; + } + .option .equalizerChannelNameLabel{ + left:25px; + top:140px; + font-size:14px; + } + .option .save{ + top: 260px; + left: 150px; + width: 70px; + height: 38px; + line-height: 38px; + text-align: center; + } + .calc_container .minus { height: 24px; width: 31px; diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index a574d54a9..e777c6a02 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -221,6 +221,7 @@ FFW.RC = FFW.RPCObserver.create( var newClimateControlData = null; var newRadioControlData = null; + var newAudioControlData= null; if (request.params.moduleData.climateControlData) { newClimateControlData = @@ -235,6 +236,10 @@ FFW.RC = FFW.RPCObserver.create( SDL.RadioModel.saveCurrentOptions(); } } + if(request.params.moduleData.audioControlData){ + newAudioControlData = + SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); + } // send repsonse var JSONMessage = { 'jsonrpc': '2.0', @@ -284,6 +289,7 @@ FFW.RC = FFW.RPCObserver.create( var moduleType = request.params.moduleType; var climateControlData = null; var radioControlData = null; + var audioControlData=null; var app = SDL.SDLController.getApplicationModel( request.params.appID @@ -292,6 +298,8 @@ FFW.RC = FFW.RPCObserver.create( climateControlData = SDL.ClimateController.model.getClimateControlData(); } else if (moduleType === 'RADIO') { radioControlData = SDL.RadioModel.getRadioControlData(false); + } else if (moduleType ==='AUDIO'){ + audioControlData = SDL.MediaController.getAudioControlData(); } var JSONMessage = { @@ -314,6 +322,10 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.climateControlData = climateControlData; } + if (audioControlData) { + JSONMessage.result.moduleData.audioControlData + = audioControlData; + } if (request.params.subscribe !== undefined) { JSONMessage.result.isSubscribed = request.params.subscribe; diff --git a/images/media/bl.png b/images/media/bl.png new file mode 100644 index 0000000000000000000000000000000000000000..8d6ea47a6f1089ca561bce23387364d6c2e13b4f GIT binary patch literal 2345 zcmV+^3D)+BP)fikB7aR~_shYlp614#%SD`}rXq=J-_Mh zdEKuU_xB_Iqes zq`tHAa^oMoCG_Y69wq5t-X1d(x8_Wpp7E^XanVhz92^WB1VADPICcBR*FE=r^N~f> z|CYCb;d8wHu%2)LFX3z9gY4N0vR<)FfQ5m9-?=wrL_i=w;98gOVD&#XUapG%jfe4; z4n(~F!V;8WHnBOrm_763v=u_0CQ(rE+cNYTF=3#fL~z-s?#;Nom=ArI~kkJ56i%auXZcJIA3d32rSN2>z)-)m0X3@V(AtaLuMhK9)tA8pB`igR$Hm0k=ASR}c&%N}o?orHwu6rRl z2$O(q#|xuZQCqxZx0W9}Q`6xOKbr5d8wJgr;ZDDG_WR%;c@z4EA!(3s)AaU)k_}?M zkry$!S$4P--a21@xG3M{;0E5XOPBI3U2`%PaiN z_7b!mJn`A?&OSYFG+0JG^&~7UgaZ&nmAIfbnh{2o=fe73$19>500Miz zOK~~IyJR#qSNjKd*;=7v6XQ-u0>5FCP! zUa8o0AP_AU);*IyQona`IL4Rc9qi$n2_gritn7u$93%9%7lq9|t|-5 z2!H?r(Q1Q1WQQ{&gG?B?5RQld>8DSmtcIh(KXgmv&ab z0s+=--Rjv%vrQ6@Zv-kp9D!>KeUx>GNIPtx&*0Zw_qS_o{j3&+OLt7)^;C zZX^KQBP&sp(^y&6PM`a7-{4iWOF<`96s6B!`SJ~hNr zjg%GjRM}tm$W^%UTXACc@^%P2epDCPUiFm{2rvFcN|F(VvCclIu}TDJoqn%}8GIuO zJzM_e9{DP6EKixgIdv|quxCtve#0v+UbFwu&To7A4K1TLJD`FA0ys3kzpKUQOR2B_ z`@T>mT3$+Aw3a-7GYtuFwF`7&@kDf^=IF7~(;C<9DF}EQI-tZLfQDdQT{NOw=8)+e zH-Prpj$giSnlniH?XbcW5U!oyRt*(h3xub}5Td^wJuUU!h{kdPXb4@tUecL4QZKsh zg5@(w<7+Fd3j>5flR!YvUG!9T^a5L+EMCouLb@k0s?}Dqekel_2Dz>M`jym?dYdJT zoO$m}HjfQR6aavY zskg%ih7der-XeWt>%J$+ls;u<<2i~s8+gd?zj)+ zte^pcqp$PWY4kvjmG&5fA%KoU$9it*9}Mm`2T8MkwsgdYaz@BdE2^D8S$_@QSg?j5 z98vT(R-Zf~M;?G7NLarzcU>qm6i2J6=D-PbATZRThR(tq6r@FQr@9{@#Hg|o?rB=^ zSm7JNq_AQ21$w%^{_5rhv>|jq1Yn?)x5&BKsaeKV%$<|{c)%WkQ7Iu9^zGYyu@p_{ zA0AwXAsiHHSZnoXXQX66*BcO%JuF7!c;WLM*n8qA>fu3j7=8CR$Du+AL>dRul2bDU zLGLjdG(!N;+q-{n=~2|71M=O@-a9igL=g=|>if)6MyA>P!=M<4iLx6_-|YF%Nz|f! zI2(EpfFg=;RIcms1(K7T2?BXg_lpg9gZ}g7yY{wKpbi}f#4g)EipFN=IGvJs_ee^>!FV+4 z?Q3eTtZlxowxJDO@Wra`!$AN679=1YS;&&yIk}JI=4B-&yPP(QAc8AuQ1%b@^tIk< zyXEghH@e`#0A%P7%yIv~5n+K7Nk~Nsl8_*}EH=p`h@4YRi6|ii;KKmC7=Rz)Sfe!x zYWyWaf)zG6;D8MlND#n5p&$YoA;<_rG4kMHAu$~RA|#j~LX4#Y6dE*WL*rNc^+D03~!qSaf7zbY(hYa%Ew3WdJfTF*q$SGc7SRR536*H8(mmFe@-JIxsL3 zJm{VP001R)MObuXVRU6WZEs|0W_bWIFflkSFf%PNG*mG#IyE;sG%zbLGCD9YVqs7s P00000NkvXXu0mjfZ$ literal 0 HcmV?d00001 diff --git a/images/media/ico_bluetooth.png b/images/media/ico_bluetooth.png new file mode 100644 index 0000000000000000000000000000000000000000..f03a174207b58073128b0dbfd01f46dd7eea7b94 GIT binary patch literal 1749 zcmV;`1}gc9P)%jv7000J@Nkl;$SWmaAUxeV48LBx(pz3TKj7c`f>pg0H0<{LGZgkf01 zz`(%2oK7b`Ha6BjK0ZEv_wL>M6B85v9UUEYx!vwAhr_`$o6Ya>`TR(KzwrNpAh}!~ z*Wce?J~}!&IyN>&xLhtYGBScjMn;g+=|oPa^Ves$+l|J@#|ekS@ukUR%44xuVg3#< zSAsAM`yB!S=4; zYHV!W2LR9cJETWWo;;b>+uQq1Pfri>AR!bA?NX`K+1uMo^z`(gLx&D+Eh#C9J9_l! zJ4`0?FplH)U&cJy(a~{Z?b@|}@pn#7%xi9LuIcXXMrN~lh6aP-TRNS7EHX0k1Bpa3 zWHy_Lg9i_8D=#m9?arM$_ww`ecO)hzzOPoR$2`@W&1Tfy-95?Wa&sU6FGNv#z5dJF zw{IgaPGT6=n3R;XE+r+UNFWe&6%-U~Ehs2>ORZK9Zr;2(BR@YsyS=^rp0^%dU0tZD zsi}@mr&IhL_F00Glao{Rdi~coZ{9@SG?`3Dr_3|=PNh;);^X7D zXJuu*aqHHt&d$zG!dH*h*4En$1|y(8{dw8h+1svPzy46K*CStcbaWtt!62v6Xwj*u zsUZMBp;D>wMx(Lw#*G_3YxR0PYH4Y4Fc^#^2%t|tgTU(pYy0*49q}6K2mo8np3IgcVU$B4w{-P^au1sFNdKJwg zQD0v_w0iaGT>ubDp-^at4mHukM8Tef^A7K^{}(F5`M{I4P+ zB9=n{?fGB;NagW(7KK8AJSmY#zFVtu0p@tgbh?Ryi)ad%c$ z)&>fN@@i>msYant5T1G{l}f~BvvB};(cgieB?thhEEWs9eEBl+q(Y$}E?l^9v8JZx zqvq!3M>viXd-v|$#$+C*>t27$TLzzrAqxKiM zT&^WNJbWVn%=2^B89WC7tBxN(-Xa!@39(p=d?}Gg(4IYew&vvIM2p4Z|KK?Oc$S){ zd3kx206_D1P;W#rnaqFI*4BR4(9nQb&G*}i@I`I?%V2Rt5+sIRX_)8+AaNFWf*_r7-p920RM@V8ip2__=i9ovIy47~^78WGB}#Eu<1E=5E{R|g*uC_OV03ZYaB4Fxzngjq0nA*>Y rFcmly{$zWbgoK2IgoK2IBoO%-t@v$X0x+>^00000NkvXXu0mjf0~%dH literal 0 HcmV?d00001 diff --git a/images/media/ico_ipod.png b/images/media/ico_ipod.png new file mode 100644 index 0000000000000000000000000000000000000000..b2be3e55ea332e4277f65d5ca48757f4ca5367f0 GIT binary patch literal 4350 zcmeI0do+~m9>?Da9owZSY^0jrB-+f3YZ;fRG2@yExsw<(n3&6%ONNH*R<=Qr5JSp! z%7l`w3zCjp!z6_$ky~Zk5)~VD-s!aJtaaA;qd(3cXD!cK@AJIx^ZPyD_xXLE=Xuv} zy@@UaJ4HE7IRF3@9qe&#P-`T)WY`GMvn% zga80{fRoa#7>AO@eYS|-?vih((W37BtYJ3(vF&l*)|PSXy7t&SJD;6j-2wo)H56z<-p>2c!E`Djh(srn5nL(*nkfKSVz`W;;BYb>xOo8bM>B zxmMs8T{Ltr=|+O^FD~qGE70571#UxUlHn!@69mct&!rqS0RRVgl z0>jvB1{#TsjEqD?8YAe;P^6)`xj7PLgfucTfIJLXQ8acC*MP>_E|K_`29C@MW>Oez z3Y`X*Xa*7K9JUn*LU#C9aS8ly>NM6@2oMgW#DX+LppgIW&ZdO?7k7!}ySrpC+J(X; zM|k5XR5FbPO~DE@MSaowZuI$2qeKVoKn)5ddr?U2uy2FD_uG>xplu$%|#R#nm^4qdV*!=Iy>Pvoz@hYxWTt7tMhn!b;*D9_bBJe}btGny} z3zyvY#EwjZvbjhoZ7a_WNQY8BX%^POT^1@lSrQ)r)~Y$+_PK`*P5V&8{5;fSyN=Ow z^gEAGiB+eltsK-fcV!)Q84I75^9sfLaDKb*r5c(&&h+?P26p{an9IkolN>2t%h?Zv zvelkVVj0YtHa7T}PYTZ(nBP8SclOv!)XGR_opX8xC3kV>dTFNEYO*s*yi~V!Qqjd$ zgPh@Nt0AADJHkU;OG(aXajIw?9){z=wB+y;_uxNQS=X9ro|Xe1noyggm$)ePF?($g zTX5!lsu5m~`F41pYTSd#xpFTRvW&6#c7W`?r{-AMwGS^kmJp8J323aJ^)LBjluD&G z^F9dG9yARM46L}dFA1J<90;h%*aPUit`9fm(!BQr19wUB@aJr7~E#SE{K*pwuXGs$2v?q+H)tJ$-wHVpa~9Q5$GvBam+);2h~ zwR$^?2P4 zi5=HOFJ>mWma*Nto6ciBl4Dig;_}Kx`vJ6y=AW}->GGFfai>dT=w6| zTyk_YCtX@ud8nu`Q%%M1EjTU$dvED^vorL0D~5OpWn?)CYpe4>!j3+tDKqq5$qs;ZVv zq5bC5pYktFq1`>=`=-X-e6+7_0ER**21jQXE=){JO!mBi*u~Tr{#E@pJ@eoec;PN5;YC62;J|>ww)-FBPuOa281dFW+I{%?6TsL4D1P(i z%@{e^7f13|X;suh_-)(McgJ59n_W{8dVR-fB@ljcVQ#D~JxlyFUa8OfP#O}JeeQ`7 zmS4}ZO7{ZK2o}}!#$Q7b?1w%EU0q$df+z#!7~bue z;_jJ`n68eWH8*YgNPkhkQqh^a`|g(Hrt_ulZ}33WRGCe}y2PQOp*WFf8X&0uR#^re zS{>jj>{b5_s^4{zpr)#dwKYyEDxd_$1BRvJZYdEBj9*CQZxaUzfDaCOcKlb?z*KRD zU1C_?laOfg6Oo5qOLOylM5cdIVda^?X0P-E$z2Kc&5RANk{hIJzsp}hO=9ON)j4JF7v+eo)6j`r7yquWRkJmd( zxP;-L^BRF8P)NYCXeye-<@P@|Ic@6P=pQqD_L*ICON+R#xA(>xu1Z6D#CC$KO19Aa z%DzjwNmeyv3sB6x6A;Yf@!EF1mN`^rxkX%?h`o4#%GIaPn( sR9M%G4yvd08d#!HyKd1bs51Nn8&!N2{isK#Sn`*^0Z+hHU;|J56SQ;t0ssI2 literal 0 HcmV?d00001 diff --git a/index.html b/index.html index 1bd467929..9514371b3 100644 --- a/index.html +++ b/index.html @@ -101,6 +101,9 @@ + + + @@ -163,6 +166,10 @@ src="app/view/media/common/LeftMenuView.js"> + + diff --git a/locale/eng.js b/locale/eng.js index bf7b29a11..bacdd5f36 100644 --- a/locale/eng.js +++ b/locale/eng.js @@ -49,6 +49,10 @@ SDL.eng = { view_media_radio: 'Radio', view_media_cd: 'CD', view_media_usb: 'USB', + view_media_bluetooth: 'BLUETOOTH', + view_media_lineIn: 'LINE-IN', + view_media_ipod: 'IPOD', + view_media_audio_options: 'Audio options', view_phone_dial: 'Dial', view_phone_end: 'End', view_phone_phone: 'Phone', From a269f782eef4be3010bb2e6c7d1ee6d990991101 Mon Sep 17 00:00:00 2001 From: Valerii Date: Sat, 17 Mar 2018 14:53:23 +0200 Subject: [PATCH 035/102] Audio remote control modul - GetCapabilities - SetCapapbilities - onInteriorVehicleDataNotification --- app/StateManager.js | 39 ++-- app/controller/MediaController.js | 120 ++++++++--- app/model/ClimateControlModel.js | 2 +- app/model/media/BluetoothModel.js | 79 ++++++- app/model/media/CDModel.js | 2 +- app/model/media/IPodModel.js | 77 ++++++- app/model/media/LineInModel.js | 76 ++++++- app/model/media/RadioModel.js | 132 +++++++++++- app/model/media/USBModel.js | 17 +- app/view/media/audioView.js | 46 ++-- app/view/media/common/LeftMenuView.js | 1 + app/view/media/player/bluetoothView.js | 143 +++++++++++- app/view/media/player/ipodView.js | 174 +++++++++++++++ app/view/media/player/lineView.js | 173 +++++++++++++++ app/view/media/player/radioView.js | 287 +++++++++++++++++++++++++ app/view/media/playerView.js | 5 +- css/media.css | 228 +++++++++++++++++++- ffw/RCRPC.js | 11 +- images/media/line_in.png | Bin 0 -> 214 bytes index.html | 3 + 20 files changed, 1468 insertions(+), 147 deletions(-) create mode 100644 app/view/media/player/ipodView.js create mode 100644 app/view/media/player/lineView.js create mode 100644 images/media/line_in.png diff --git a/app/StateManager.js b/app/StateManager.js index 3358856eb..e902e5ef4 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -235,7 +235,7 @@ var StateManager = Em.StateManager.extend( enter: function() { SDL.MediaController.set('activeState', SDL.States.nextState); - //SDL.RadioModel.sendAudioNotification(); + SDL.RadioModel.sendAudioNotification(); if (!SDL.RadioModel.radioControlStruct.radioEnable) { SDL.RadioModel.radioEnableKeyPress(); } @@ -248,10 +248,6 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateBluetooth(); SDL.MediaController.deactivateLineIn(); SDL.MediaController.deactivateIPod(); - //SDL.RadioModel.sendAudioNotification(); - // if (SDL.RadioModel.radioControlStruct.radioEnable) { - // SDL.RadioModel.radioEnableKeyPress(); - // } this._super(); } } @@ -270,7 +266,7 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateBluetooth(); SDL.MediaController.deactivateLineIn(); SDL.MediaController.deactivateIPod(); - SDL.RadioModel.sendAudioNotification(); + this._super(); }, moreinfo: Em.State.create( @@ -296,10 +292,7 @@ var StateManager = Em.StateManager.extend( }, moreinfo: Em.State.create( { - enter: function() { - this._super(); - // reset Messages - } + } ) } @@ -328,13 +321,13 @@ var StateManager = Em.StateManager.extend( ) } ), - ipod: Em.State.create( + lineIn: Em.State.create( { enter:function() { SDL.MediaController.set('activeState', SDL.States.nextState); - SDL.IPodModel.sendAudioNotification(); + SDL.LineInModel.sendAudioNotification(); this._super(); }, exit:function() @@ -343,21 +336,22 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateCD(); SDL.MediaController.deactivateUSB(); - SDL.MediaController.deactivateLineIn(); SDL.MediaController.deactivateBluetooth(); + SDL.MediaController.deactivateIPod(); }, moreinfo:Em.State.create( {} ) } - ), - lineIn: Em.State.create( + ), + + ipod: Em.State.create( { enter:function() { SDL.MediaController.set('activeState', SDL.States.nextState); - SDL.LineInModel.sendAudioNotification(); + SDL.IPodModel.sendAudioNotification(); this._super(); }, exit:function() @@ -366,22 +360,23 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateCD(); SDL.MediaController.deactivateUSB(); + SDL.MediaController.deactivateLineIn(); SDL.MediaController.deactivateBluetooth(); - SDL.MediaController.deactivateIPod(); }, - moreinfo:Em.State.create( - {} - ) } - ) - } + ), + } ), + sdlmedia: Em.State.create( { enter: function() { SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateUSB(); SDL.MediaController.deactivateCD(); + SDL.MediaController.radioControlStruct.source='MOBILE_APP'; + var data = SDL.MediaController.getAudioControlData(); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:data}); if (SDL.SDLModel.data.mediaPlayerActive) { SDL.SDLController.onEventChanged('player', false); } diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 4006b5dc5..cf825d52d 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -57,12 +57,18 @@ SDL.MediaController = Em.Object.create( { keepContext:true, volume:true, - equalizerSettings:{ - channelSetting:true, - channelId:true, - channelName:true - }, + equalizerSettings:true }, + // radioControlAudioValue: + // { + // keepContext:true, + // volume:true, + // equalizerSettings:{ + // channelSetting:true, + // channelId:true, + // channelName:true + // }, + // }, usbControl:{ keepContext: false @@ -130,15 +136,6 @@ SDL.MediaController = Em.Object.create( } this.onPlayerEnter(SDL.IPodModel,'ipod'); }, - // turnOnAudioOptions:function(){ - - - // // if(!SDL.States.media.player.audioOptions.active) - // // { - // // SDL.States.goToStates('media.player.audioOptions'); - // // } - // // this.onPlayerEnter(SDL.AudioModel,'audioOptions'); - // }, /** * Switching on Application */ @@ -278,6 +275,15 @@ SDL.MediaController = Em.Object.create( break; } case 'media.player.bluetooth':{ + this.changeSourceFromBluetooth(is_background); + break; + } + case 'media.player.lieIn':{ + this.changeSourceFromLineIn(is_background); + break; + } + case 'media.player.ipod':{ + this.changeSourceFromIpod(is_background); break; } default: { @@ -325,6 +331,30 @@ SDL.MediaController = Em.Object.create( SDL.States.goToStates(old_state); } }, + changeSourceFromBluetooth: function(is_background){ + var old_state = SDL.States.currentState.get('path'); + this.deactivateBluetooth(); + this.turnOnLineIn(); + if (is_background) { + SDL.States.goToStates(old_state); + } + }, + changeSourceFromLineIn: function(is_background){ + var old_state = SDL.States.currentState.get('path'); + this.deactivateLineIn(); + this.turnOnIpod(); + if (is_background) { + SDL.States.goToStates(old_state); + } + }, + changeSourceFromIpod: function(is_background){ + var old_state = SDL.States.currentState.get('path'); + this.deactivateIpod(); + this.turnOnIpod(); + if (is_background) { + SDL.States.goToStates(old_state); + } + }, /** * Switches to next after unknown source * @param is source switched from background or not @@ -340,34 +370,54 @@ SDL.MediaController = Em.Object.create( getAudioControlData:function() { if(this.radioControlAudioValue.keepContext || this.radioControlAudioValue.volume - || this.radioControlAudioValue.equalizerSettings.channelId || this.radioControlAudioValue.equalizerSettings.channelName - || this.radioControlAudioValue.equalizerSettings.channelSetting) + || this.radioControlAudioValue.equalizerSettings) { var result={}; - var equalizer={}; + var equalizerSettings={}; + var validEqualizer={}; result.source=this.radioControlStruct.source; + if(this.radioControlAudioValue.keepContext){ + result.keepContext=this.radioControlStruct.keepContext; + } if(this.radioControlAudioValue.volume){ result.volume=this.currentVolume; } - if(this.radioControlAudioValue.equalizerSettings.channelId){ - equalizer.channelId=this.radioControlStruct.equalizerSettings.channelId; - result.equalizerSettings=equalizer; - } - if(this.radioControlAudioValue.equalizerSettings.channelName){ - equalizer.channelName=this.radioControlStruct.equalizerSettings.channelName; - result.equalizerSettings=equalizer; - } - if(this.radioControlAudioValue.equalizerSettings.channelSetting){ - equalizer.channelSetting=this.radioControlStruct.equalizerSettings.channelSetting; - result.equalizerSettings=equalizer; + if(this.radioControlAudioValue.equalizerSettings){ + equalizerSettings.channelId=this.radioControlStruct.equalizerSettings.channelId; + equalizerSettings.channelName=this.radioControlStruct.equalizerSettings.channelName; + equalizerSettings.channelSetting=this.radioControlStruct.equalizerSettings.channelSetting; } + else if(equalizerSettings.channelId==null && equalizerSettings.channelName==null){equalizerSettings =null;} + if(equalizerSettings!==null){ + var equalizer=[equalizerSettings]; + result.equalizerSettings=equalizer; + } + return result; } - return null; + var result={}; + result.source=this.radioControlStruct.source; + return result; }, + setAudioControlData:function(data){ if(data.source!=null){ this.set('radioControlStruct.source',data.source); + switch(data.source){ + case 'RADIO_TUNER':this.turnOnRadio();break; + case 'BLUETOOTH_STEREO_BTST':this.turnOnBluetooth();break; + case 'CD':this.turnOnCD();break; + case 'USB':this.turnOnUSB();break; + case 'LINE_IN':this.turnOnLineIn();break; + case 'IPOD':this.turnOnIpod();break; + case 'MOBILE_APP':this.turnOnSDL();break; + } + } + if(data.volume!=null){ + this.set('currentVolume',data.volume); + } + if(data.keepContext!=null){ + this.set('radioControlStruct.keepContext',data.keepContext); } if(data.equalizerSettings!=null) { @@ -385,6 +435,18 @@ SDL.MediaController = Em.Object.create( } } }, + getAudioControlCapabilities:function(){ + var result=[]; + var capabilities = { + moduleName :'AudioControlCapabilities', + sourceAvailable: true, + volumeAvailable : true, + equalizerAvailable : true, + equalizerMaxChannelId : 100 + }; + result.push(capabilities); + return result; + }, /** * turn on scan event */ diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 8397fdbed..4adbef57d 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -222,7 +222,7 @@ SDL.ClimateControlModel = Em.Object.create({ var data = this.getClimateControlData(); data = SDL.SDLController.filterObjectProperty(data, properties); if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('CLIMATE', {climateControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'CLIMATE',climateControlData: data}); } }, diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js index 6441dbd02..fd1cd58c2 100644 --- a/app/model/media/BluetoothModel.js +++ b/app/model/media/BluetoothModel.js @@ -27,25 +27,88 @@ SDL.BluetoothModel=Em.Object.create({ active: false, selectedIndex: 0, +optionsEnabled:false, + statusBar: 'Luk Marko', +init: function() { + this._super(); + this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); + this.set('player.name', 'BLUETOOTH'); + }, sendAudioNotification:function() { this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() { - SDL.MediaController.radioControlStruct.source='BLUETOOTH'; + SDL.MediaController.radioControlStruct.source='BLUETOOTH_STEREO_BTST'; }, -// init:function(){ -// this._super(); -// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); -// this.set('player.name','BLUETOOTH_STEREO_BTST'); -// }, - + PlayList: SDL.Playlist.create({ + selectedIndex: 0, + items: { + 0: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_1', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 1: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_2', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 2: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_3', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 3: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_4', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 4: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_5', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 5: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_6', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ) + }, + // homeWidgetIcon: 'images/media/usb-h-ico.png' + } + ) + } ); \ No newline at end of file diff --git a/app/model/media/CDModel.js b/app/model/media/CDModel.js index 2c86453ad..db170a9a0 100644 --- a/app/model/media/CDModel.js +++ b/app/model/media/CDModel.js @@ -148,7 +148,7 @@ sendAudioNotification:function() this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() diff --git a/app/model/media/IPodModel.js b/app/model/media/IPodModel.js index 210bf9503..e7b392bd9 100644 --- a/app/model/media/IPodModel.js +++ b/app/model/media/IPodModel.js @@ -27,25 +27,86 @@ SDL.IPodModel=Em.Object.create({ active: false, selectedIndex:0, +optionsEnabled:false, +statusBar: 'Luk Marko', sendAudioNotification:function() { this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() { SDL.MediaController.radioControlStruct.source='IPOD'; }, -// init:function(){ -// this._super(); -// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); -// this.set('player.name','IPOD'); -// }, - - +init:function(){ + this._super(); + this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); + this.set('player.name','IPOD'); +}, + PlayList: SDL.Playlist.create({ + selectedIndex: 0, + items: { + 0: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_1', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 1: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_2', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 2: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_3', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 3: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_4', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 4: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_5', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 5: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_6', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ) + }, + //homeWidgetIcon: 'images/media/usb-h-ico.png' + } + ) } ); \ No newline at end of file diff --git a/app/model/media/LineInModel.js b/app/model/media/LineInModel.js index a79a1e26d..689fabbc4 100644 --- a/app/model/media/LineInModel.js +++ b/app/model/media/LineInModel.js @@ -27,24 +27,86 @@ SDL.LineInModel=Em.Object.create({ active: false, selectedIndex:0, +optionsEnabled:false, +statusBar: 'Luk Marko', sendAudioNotification:function() { this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() { SDL.MediaController.radioControlStruct.source='LINE_IN'; }, -// init:function(){ -// this._super(); -// this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); -// this.set('player.name','LINE_IN'); -// }, - +init:function(){ + this._super(); + this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); + this.set('player.name','LINE_IN'); +}, + PlayList: SDL.Playlist.create({ + selectedIndex: 0, + items: { + 0: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_1', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 1: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_2', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 2: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_3', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 3: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_4', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 4: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_5', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ), + 5: SDL.PlaylistItem.create({ + nameBinding: 'SDL.locale.label.view_media_track_6', + album: 'Color of the Fall', + artist: 'Luk Marko', + genre: 'Rock', + disk: 'Fall', + duration: 123 + } + ) + }, + //homeWidgetIcon: 'images/media/usb-h-ico.png' + } + ) } diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 911294124..a1025ae2d 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -176,6 +176,20 @@ SDL.RadioModel = Em.Object.create({ TA: true, REG: 'Murica' }, + sisData:{ + stationShortName:'Name1', + stationIDNumber:{ + countryCode:101, + fccFacilityId:100 + }, + stationLongName:'Name2', + stationLocation:{ + longitudeDegrees:0.1, + latitudeDegrees:0.1, + altitudeMeters:0.1 + }, + stationMessage:'station message' + }, availableHDs: 3, hdChannel: 1, signalStrength: 50, @@ -196,6 +210,19 @@ SDL.RadioModel = Em.Object.create({ TA: true, REG: true }, + sisData:{ + stationShortName:true, + stationIDNumber:{ + countryCode:true, + fccFacilityId:true + }, + stationLongName:true, + stationLocation:{ + gpsLocation:true, + altitudeMeters:true + }, + stationMessage:true + }, availableHDs: true, hdChannel: true, signalStrength: true, @@ -454,7 +481,8 @@ SDL.RadioModel = Em.Object.create({ availableHDsAvailable: true, stateAvailable: true, signalStrengthAvailable: true, - signalChangeThresholdAvailable: true + signalChangeThresholdAvailable: true, + sisDataAvailable: true }; result.push(capabilities); @@ -514,7 +542,11 @@ SDL.RadioModel = Em.Object.create({ frequencyInteger: this.radioControlStruct.frequencyInteger, frequencyFraction: this.radioControlStruct.frequencyFraction, radioEnable: this.radioControlStruct.radioEnable, - rdsData: {} + rdsData: {}, + sisData:{ + stationIDNumber:{}, + stationLocation:{} + }, }; if (forceGetAll || this.radioControlCheckboxes.band) { @@ -564,10 +596,41 @@ SDL.RadioModel = Em.Object.create({ if (forceGetAll || this.radioControlCheckboxes.state) { result.state = this.radioControlStruct.state; } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationShortName){ + result.sisData.stationShortName=this.radioControlStruct.sisData.stationShortName; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLongName){ + result.sisData.stationShortName=this.radioControlStruct.sisData.stationLongName; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationMessage){ + result.sisData.stationMessage=this.radioControlStruct.sisData.stationMessage; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.countryCode){ + result.sisData.stationIDNumber.countryCode=parseInt(this.radioControlStruct.sisData.stationIDNumber.countryCode); + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId){ + result.sisData.stationIDNumber.fccFacilityId=parseInt(this.radioControlStruct.sisData.stationIDNumber.fccFacilityId); + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsLocation){ + result.sisData.stationLocation.longitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.longitudeDegrees); + result.sisData.stationLocation.latitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.latitudeDegrees); + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitudeMeters){ + result.sisData.stationLocation.altitudeMeters=parseFloat(this.radioControlStruct.sisData.stationLocation.altitudeMeters); + } + } if (Object.keys(result.rdsData).length == 0) { delete result['rdsData']; } + if(Object.keys(result.sisData).length==0){ + delete result['sisData']; + } + if(Object.keys(result.sisData.stationIDNumber).length==0){ + delete result['sisData.stationIDNumber']; + } + if(Object.keys(result.sisData.stationLocation).length==0){ + delete result['sisData.stationLocation']; + } } return result; @@ -620,7 +683,9 @@ SDL.RadioModel = Em.Object.create({ if (data.rdsData != null) { this.setRadioRdsData(data.rdsData); } - + if(data.sisData!=null){ + this.setRadioSisData(data.sisData); + } if (data.signalStrength != null) { this.setSignalStrength(data.signalStrength); } @@ -660,7 +725,7 @@ SDL.RadioModel = Em.Object.create({ var data = this.getRadioControlData(false); data = SDL.SDLController.filterObjectProperty(data, properties); if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('RADIO', {radioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', radioControlData: data}); } }, @@ -677,6 +742,20 @@ SDL.RadioModel = Em.Object.create({ 'TA': this.radioControlStruct.rdsData.TA, 'REG': this.radioControlStruct.rdsData.REG }, + 'sisData':{ + 'stationShortName':this.radioControlStruct.sisData.stationShortName, + 'stationMessage':this.radioControlStruct.sisData.stationMessage, + 'stationLongName':this.radioControlStruct.sisData.stationLongName, + 'stationLocation':{ + 'longitudeDegrees':this.radioControlStruct.sisData.stationLocation.longitudeDegrees, + 'latitudeDegrees':this.radioControlStruct.sisData.stationLocation.latitudeDegrees, + 'altitudeMeters': this.radioControlStruct.sisData.stationLocation.altitudeMeters + }, + 'stationIDNumber':{ + 'countryCode':this.radioControlStruct.sisData.stationIDNumber.countryCode, + 'fccFacilityId':this.radioControlStruct.sisData.stationIDNumber.fccFacilityId + }, + }, 'availableHDs': this.radioControlStruct.availableHDs, 'hdChannel': this.radioControlStruct.hdChannel, 'signalStrength': this.radioControlStruct.signalStrength, @@ -705,6 +784,17 @@ SDL.RadioModel = Em.Object.create({ this.set('lastOptionParams.rdsData.TP', result.rdsData.TP); this.set('lastOptionParams.rdsData.TA', result.rdsData.TA); this.set('lastOptionParams.rdsData.REG', result.rdsData.REG); + this.set('lastOptionParams.sisData', {}); + this.set('lastOptionParams.sisData.stationShortName', result.sisData.stationShortName); + this.set('lastOptionParams.sisData.stationMessage', result.sisData.stationMessage); + this.set('lastOptionParams.sisData.stationLongName', result.sisData.stationLongName); + this.set('lastOptionParams.sisData.stationLocation', {}); + this.set('lastOptionParams.sisData.stationLocation.longitudeDegrees', result.sisData.stationLocation.longitudeDegrees); + this.set('lastOptionParams.sisData.stationLocation.latitudeDegrees', result.sisData.stationLocation.latitudeDegrees); + this.set('lastOptionParams.sisData.stationLocation.altitudeMeters', result.sisData.stationLocation.altitudeMeters); + this.set('lastOptionParams.sisData.stationIDNumber', {}); + this.set('lastOptionParams.sisData.stationIDNumber.countryCode', result.sisData.stationIDNumber.countryCode); + this.set('lastOptionParams.sisData.stationIDNumber.fccFacilityId', result.sisData.stationIDNumber.fccFacilityId); this.set('lastOptionParams.availableHDs', result.availableHDs); this.set('lastOptionParams.hdChannel', result.hdChannel); this.set('lastOptionParams.signalStrength', result.signalStrength); @@ -1013,7 +1103,9 @@ SDL.RadioModel = Em.Object.create({ 'band', 'availableHDs', 'hdChannel', - 'rdsData.*']); + 'rdsData.*' + ]); + } else if (data.band == 'AM') { this.sendRadioChangeNotification(['radioEnable', 'frequencyInteger', @@ -1372,7 +1464,7 @@ SDL.RadioModel = Em.Object.create({ this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() @@ -1410,6 +1502,7 @@ SDL.RadioModel = Em.Object.create({ } } this.sendRadioChangeNotification(properties); + //this.sendRadioChangeNotification(currentData); }, setFrequencyInteger: function(value) { @@ -1452,7 +1545,32 @@ SDL.RadioModel = Em.Object.create({ this.set('radioControlStruct.rdsData.REG', data.REG); } }, - + setRadioSisData:function(data){ + if(data.stationShortName!=null){ + this.set('radioControlStruct.sisData.stationShortName',data.stationShortName); + } + if(data.stationLongName!=null){ + this.set('radioControlStruct.sisData.stationLongName',data.stationLongName); + } + if(data.stationMessage!=null){ + this.set('radioControlStruct.sisData.stationMessage',data.stationMessage); + } + if(data.stationIDNumber.countryCode!=null){ + this.set('radioControlStruct.sisData.stationIDNumber.countryCode',data.stationIDNumber.countryCode); + } + if(data.stationIDNumber.fccFacilityId!=null){ + this.set('radioControlStruct.sisData.stationIDNumber.fccFacilityId',data.stationIDNumber.fccFacilityId); + } + if(data.stationLocation.longitudeDegrees!=null){ + this.set('radioControlStruct.sisData.stationLocation.longitudeDegrees',data.stationLocation.longitudeDegrees); + } + if(data.stationLocation.latitudeDegrees!=null){ + this.set('radioControlStruct.sisData.stationLocation.latitudeDegrees',data.stationLocation.latitudeDegrees); + } + if(data.stationLocation.altitudeMeters!=null){ + this.set('radioControlStruct.sisData.stationLocation.altitudeMeters',data.stationLocation.altitudeMeters); + } + }, setAvailableHDs: function(value) { if (this.hdChannelsStruct.indexOf(value) >= 0) { this.set('radioControlStruct.availableHDs', value); diff --git a/app/model/media/USBModel.js b/app/model/media/USBModel.js index da0f367a9..d2b31b352 100644 --- a/app/model/media/USBModel.js +++ b/app/model/media/USBModel.js @@ -60,28 +60,13 @@ boolStruct: [ this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification('AUDIO',{audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); } }, setSource:function() { SDL.MediaController.radioControlStruct.source='USB'; }, - // sendButton:function(){ - // var properties = {'source':'USB', - // 'equalizerSettings':{ - // 'channelId':this.equalizerSettings.channelId, - // 'channelName':this.equalizerSettings.channelName - // }, - // 'keepContext':this.usbControl.keepContext, - // 'volume':SDL.MediaController.currentVolume - // }; - // FFW.RC.onInteriorVehicleDataNotification('AUDIO',properties); - // }, - - - - PlayList: SDL.Playlist.create({ selectedIndex: 0, items: { diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index 69a425268..d3289ef2b 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -50,15 +50,20 @@ 'equalizerSettingsLabel', 'equalizerChannelIdInput', 'equalizerChannelIdLabel', - 'equalizerChannelIdCheckBox', 'equalizerChannelNameInput', 'equalizerChannelNameLabel', - 'equalizerChannelNameCheckBox', 'equalizerChannelSettingLabel', - 'equalizerChannelSettingCheckBox', 'equalizerChannelSettingInput', + 'equalizerSettingsCheckBox', 'save' ], + equalizerSettingsCheckBox:Em.Checkbox.extend( + { + elementId: 'equalizerSettingsCheckBox', + classNames: 'equalizerSettingsCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings' + } + ), equalizerChannelSettingLabel: SDL.Label.extend( { elementId: 'equalizerChannelSettingLabel', @@ -66,13 +71,6 @@ content: 'Channel set:', } ), - equalizerChannelSettingCheckBox:Em.Checkbox.extend( - { - elementId: 'equalizerChannelSettingCheckBox', - classNames: 'equalizerChannelSettingCheckBox', - checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting' - } - ), equalizerChannelSettingInput:Ember.TextField.extend( { attributeBindings: ['disabled'], @@ -80,9 +78,9 @@ classNames:'equalizerChannelSettingInput', valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelSetting', isDisabled: function() { - return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting; + return !SDL.MediaController.radioControlAudioValue.equalizerSettings; }.property( - 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelSetting' + 'SDL.MediaController.radioControlAudioValue.equalizerSettings' ), disabledBinding: 'isDisabled' } @@ -114,20 +112,13 @@ classNames:'equalizerChannelNameInput', valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelName', isDisabled: function() { - return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName; + return !SDL.MediaController.radioControlAudioValue.equalizerSettings; }.property( - 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName' + 'SDL.MediaController.radioControlAudioValue.equalizerSettings' ), disabledBinding: 'isDisabled' } ), - equalizerChannelNameCheckBox:Em.Checkbox.extend( - { - elementId: 'equalizerChannelNameCheckBox', - classNames: 'equalizerChannelNameCheckBox', - checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelName' - } - ), equalizerChannelIdInput: Ember.TextField.extend( { attributeBindings: ['disabled'], @@ -135,20 +126,13 @@ classNames:'equalizerChannelIdInput', valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelId', isDisabled: function() { - return !SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId; + return !SDL.MediaController.radioControlAudioValue.equalizerSettings; }.property( - 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId' + 'SDL.MediaController.radioControlAudioValue.equalizerSettings' ), disabledBinding: 'isDisabled' } ), - equalizerChannelIdCheckBox:Em.Checkbox.extend( - { - elementId: 'equalizerChannelIdCheckBox', - classNames: 'equalizerChannelIdCheckBox', - checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings.channelId' - } - ), keepContextSelect: Em.Select.extend( { attributeBindings: ['disabled'], @@ -223,7 +207,7 @@ attributeBindings: ['disabled'], elementId: 'media_optionButton', classNames: 'media_optionButton', - text: 'Options', + text: 'Audio', onDown: false, target: 'SDL.MediaController', action: 'toggleOptions', diff --git a/app/view/media/common/LeftMenuView.js b/app/view/media/common/LeftMenuView.js index 8bf4e05ac..2387eec78 100644 --- a/app/view/media/common/LeftMenuView.js +++ b/app/view/media/common/LeftMenuView.js @@ -127,6 +127,7 @@ SDL.LeftMenuView = Em.ContainerView.extend( ], action:'turnOnLineIn', elementId:'media_lineInButton', + icon: 'images/media/line_in.png', classNames: 'media-ls-item', target:'SDL.MediaController', textBinding:Ember.Binding.oneWay('SDL.locale.label.view_media_lineIn') diff --git a/app/view/media/player/bluetoothView.js b/app/view/media/player/bluetoothView.js index 113d46d04..651f68974 100644 --- a/app/view/media/player/bluetoothView.js +++ b/app/view/media/player/bluetoothView.js @@ -29,7 +29,146 @@ SDL.bluetoothView = Em.ContainerView.create( classNames: 'media_player_view_wrapper', classNameBindings: [ 'SDL.States.media.player.bluetooth.active:active_state:inactive_state' - ] - + ], + childViews: [ + + 'controlls', + 'info', + 'rightmenu' + ], + info: Em.View.extend( + { + elementId: 'media_player_bluetooth_view_info', + template: Em.Handlebars.compile( + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.currentTrack}}/{{SDL.MediaController.currentSelectedPlayer.totalTracks}}
' + + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.album}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.name}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.formatTimeToString}}
' + + '' + + '
' + ) + } + ), + rightmenu: Em.ContainerView.create( + { + /** View ID */ + elementId: 'media_bluetooth_rightmenu', + /** Class Names */ + classNames: ['player-right-stock'], + classNameBindings: [ + 'SDL.States.media.player.bluetooth.options.active:hidden', + 'SDL.States.media.player.bluetooth.browse.active:hidden', + 'SDL.States.media.player.bluetooth.moreinfo.active:hidden' + ], + /** View Components*/ + childViews: [ + 'repeatButton', + 'shuffleButton', + 'moreInfoButton' + ], + repeatButton: SDL.Button.extend( + { + elementId: 'media_bluetooth_rightmenu_repeatButton', + classNames: ['rs-item'], + onRepeatPressed: function() { + switch (SDL.BluetoothModel.player.repeat) { + case 'NONE': + return SDL.locale.label.view_media_repeat_no; + case 'ALL': + return SDL.locale.label.view_media_repeat_all; + case 'ONE': + return SDL.locale.label.view_media_repeat_one; + } + }.property( + 'SDL.BluetoothModel.player.repeat' + ), + textBinding: 'onRepeatPressed', + target: 'SDL.MediaController', + action: 'repeatPress' + } + ), + shuffleButton: SDL.Button.extend( + { + elementId: 'media_bluetooth_rightmenu_shuffleButton', + classNames: ['rs-item'], + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.BluetoothModel.player.shuffle + ); + }.property( + 'SDL.BluetoothModel.player.shuffle' + ), + iconBinding: 'onIconChange', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_shuffle' + ), + target: 'SDL.MediaController', + action: 'turnOnShuffle', + onDown: false + } + ), + + moreInfoButton: SDL.Button.extend( + { + classNameBindings: ['SDL.helpMode:moreinfoButton_help'], + elementId: 'media_bluetooth_rightmenu_moreinfoButton', + action: 'turnOnMoreInfo', + target: 'SDL.MediaController', + classNames: ['rs-item'], + icon: 'images/media/active_arrow.png', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_moreInfo' + ), + onDown: false, + disabled: true // TODO - add more info view + } + ) + } + ), + controlls: Em.ContainerView.extend( + { + elementId: 'media_player_bluetooth_view_controlls', + /** View components*/ + childViews: [ + 'PrevTrackButton', + 'PlayButton', + 'NextTrackButton' + ], + classNames: 'player_controlls', + PrevTrackButton: SDL.Button.extend( + { + elementId: 'media_player_bluetooth_view_controlls_prev_track_button', + classNames: ['bc-item-big', 'prev-bluetooth'], + target: 'SDL.MediaController', + action: 'prevTrack', + icon: 'images/media/ico_prew.png' + } + ), + PlayButton: SDL.Button.extend( + { + elementId: 'media_player_bluetooth_view_controlls_play_button', + classNames: ['bc-item-big', 'play-bluetooth'], + target: 'SDL.MediaController', + action: 'playTrack', + /** Define button template */ + template: Ember.Handlebars.compile( + '' + + '' + ) + } + ), + NextTrackButton: SDL.Button.extend( + { + elementId: 'media_player_bluetooth_view_controlls_next_track_button', + classNames: ['bc-item-big', 'next-bluetooth'], + target: 'SDL.MediaController', + action: 'nextTrack', + icon: 'images/media/ico_next.png' + } + ) + } + ), } ); diff --git a/app/view/media/player/ipodView.js b/app/view/media/player/ipodView.js new file mode 100644 index 000000000..a1bc357bb --- /dev/null +++ b/app/view/media/player/ipodView.js @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +SDL.ipodView = Em.ContainerView.create( + { + elementId: 'media_player_ipod_view', + classNames: 'media_player_view_wrapper', + classNameBindings: [ + 'SDL.States.media.player.ipod.active:active_state:inactive_state' + ], + childViews: [ + + 'controlls', + 'info', + 'rightmenu' + ], + info: Em.View.extend( + { + elementId: 'media_player_ipod_view_info', + template: Em.Handlebars.compile( + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.currentTrack}}/{{SDL.MediaController.currentSelectedPlayer.totalTracks}}
' + + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.album}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.name}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.formatTimeToString}}
' + + '' + + '
' + ) + } + ), + rightmenu: Em.ContainerView.create( + { + /** View ID */ + elementId: 'media_ipod_rightmenu', + /** Class Names */ + classNames: ['player-right-stock'], + classNameBindings: [ + 'SDL.States.media.player.ipod.options.active:hidden', + 'SDL.States.media.player.ipod.browse.active:hidden', + 'SDL.States.media.player.ipod.moreinfo.active:hidden' + ], + /** View Components*/ + childViews: [ + 'repeatButton', + 'shuffleButton', + 'moreInfoButton' + ], + repeatButton: SDL.Button.extend( + { + elementId: 'media_ipod_rightmenu_repeatButton', + classNames: ['rs-item'], + onRepeatPressed: function() { + switch (SDL.BluetoothModel.player.repeat) { + case 'NONE': + return SDL.locale.label.view_media_repeat_no; + case 'ALL': + return SDL.locale.label.view_media_repeat_all; + case 'ONE': + return SDL.locale.label.view_media_repeat_one; + } + }.property( + 'SDL.IpodModel.player.repeat' + ), + textBinding: 'onRepeatPressed', + target: 'SDL.MediaController', + action: 'repeatPress' + } + ), + shuffleButton: SDL.Button.extend( + { + elementId: 'media_ipod_rightmenu_shuffleButton', + classNames: ['rs-item'], + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.BluetoothModel.player.shuffle + ); + }.property( + 'SDL.IpodModel.player.shuffle' + ), + iconBinding: 'onIconChange', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_shuffle' + ), + target: 'SDL.MediaController', + action: 'turnOnShuffle', + onDown: false + } + ), + + moreInfoButton: SDL.Button.extend( + { + classNameBindings: ['SDL.helpMode:moreinfoButton_help'], + elementId: 'media_ipod_rightmenu_moreinfoButton', + action: 'turnOnMoreInfo', + target: 'SDL.MediaController', + classNames: ['rs-item'], + icon: 'images/media/active_arrow.png', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_moreInfo' + ), + onDown: false, + disabled: true // TODO - add more info view + } + ) + } + ), + controlls: Em.ContainerView.extend( + { + elementId: 'media_player_ipod_view_controlls', + /** View components*/ + childViews: [ + 'PrevTrackButton', + 'PlayButton', + 'NextTrackButton' + ], + classNames: 'player_controlls', + PrevTrackButton: SDL.Button.extend( + { + elementId: 'media_player_ipod_view_controlls_prev_track_button', + classNames: ['bc-item-big', 'prev-ipod'], + target: 'SDL.MediaController', + action: 'prevTrack', + icon: 'images/media/ico_prew.png' + } + ), + PlayButton: SDL.Button.extend( + { + elementId: 'media_player_ipod_view_controlls_play_button', + classNames: ['bc-item-big', 'play-ipod'], + target: 'SDL.MediaController', + action: 'playTrack', + /** Define button template */ + template: Ember.Handlebars.compile( + '' + + '' + ) + } + ), + NextTrackButton: SDL.Button.extend( + { + elementId: 'media_player_ipod_view_controlls_next_track_button', + classNames: ['bc-item-big', 'next-ipod'], + target: 'SDL.MediaController', + action: 'nextTrack', + icon: 'images/media/ico_next.png' + } + ) + } + ), +} +); \ No newline at end of file diff --git a/app/view/media/player/lineView.js b/app/view/media/player/lineView.js new file mode 100644 index 000000000..7303b7032 --- /dev/null +++ b/app/view/media/player/lineView.js @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +SDL.lineInView = Em.ContainerView.create( + { + elementId: 'media_player_lineIn_view', + classNames: 'media_player_view_wrapper', + classNameBindings: [ + 'SDL.States.media.player.lineIn.active:active_state:inactive_state' + ], + childViews: [ + 'info', + 'controlls', + 'rightmenu' + ], + info: Em.View.extend( + { + elementId: 'media_player_lineIn_view_info', + template: Em.Handlebars.compile( + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.currentTrack}}/{{SDL.MediaController.currentSelectedPlayer.totalTracks}}
' + + '
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.album}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.data.selectedItem.name}}
' + + '
{{SDL.MediaController.currentSelectedPlayer.formatTimeToString}}
' + + '' + + '
' + ) + } + ), + rightmenu: Em.ContainerView.create( + { + /** View ID */ + elementId: 'media_lineIn_rightmenu', + /** Class Names */ + classNames: ['player-right-stock'], + classNameBindings: [ + 'SDL.States.media.player.lineIn.options.active:hidden', + 'SDL.States.media.player.lineIn.browse.active:hidden', + 'SDL.States.media.player.lineIn.moreinfo.active:hidden' + ], + /** View Components*/ + childViews: [ + 'repeatButton', + 'shuffleButton', + 'moreInfoButton' + ], + repeatButton: SDL.Button.extend( + { + elementId: 'media_lineIn_rightmenu_repeatButton', + classNames: ['rs-item'], + onRepeatPressed: function() { + switch (SDL.LineInModel.player.repeat) { + case 'NONE': + return SDL.locale.label.view_media_repeat_no; + case 'ALL': + return SDL.locale.label.view_media_repeat_all; + case 'ONE': + return SDL.locale.label.view_media_repeat_one; + } + }.property( + 'SDL.LineInModel.player.repeat' + ), + textBinding: 'onRepeatPressed', + target: 'SDL.MediaController', + action: 'repeatPress' + } + ), + shuffleButton: SDL.Button.extend( + { + elementId: 'media_lineIn_rightmenu_shuffleButton', + classNames: ['rs-item'], + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.LineInModel.player.shuffle + ); + }.property( + 'SDL.LineInModel.player.shuffle' + ), + iconBinding: 'onIconChange', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_shuffle' + ), + target: 'SDL.MediaController', + action: 'turnOnShuffle', + onDown: false + } + ), + + moreInfoButton: SDL.Button.extend( + { + classNameBindings: ['SDL.helpMode:moreinfoButton_help'], + elementId: 'media_lineIn_rightmenu_moreinfoButton', + action: 'turnOnMoreInfo', + target: 'SDL.MediaController', + classNames: ['rs-item'], + icon: 'images/media/active_arrow.png', + textBinding: Ember.Binding.oneWay( + 'SDL.locale.label.view_media_moreInfo' + ), + onDown: false, + disabled: true // TODO - add more info view + } + ) + } + ), + controlls: Em.ContainerView.extend( + { + elementId: 'media_player_lineIn_view_controlls', + /** View components*/ + childViews: [ + 'PrevTrackButton', + 'PlayButton', + 'NextTrackButton' + ], + classNames: 'player_controlls', + PrevTrackButton: SDL.Button.extend( + { + elementId: 'media_player_lineIn_view_controlls_prev_track_button', + classNames: ['bc-item-big', 'prev-lineIn'], + target: 'SDL.MediaController', + action: 'prevTrack', + icon: 'images/media/ico_prew.png' + } + ), + PlayButton: SDL.Button.extend( + { + elementId: 'media_player_lineIn_view_controlls_play_button', + classNames: ['bc-item-big', 'play-lineIn'], + target: 'SDL.MediaController', + action: 'playTrack', + /** Define button template */ + template: Ember.Handlebars.compile( + '' + + '' + ) + } + ), + NextTrackButton: SDL.Button.extend( + { + elementId: 'media_player_line_view_controlls_next_track_button', + classNames: ['bc-item-big', 'next-lineIn'], + target: 'SDL.MediaController', + action: 'nextTrack', + icon: 'images/media/ico_next.png' + } + ) + } + ), +} +); diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 1a87c8aa6..b0bb48541 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -106,8 +106,295 @@ SDL.RadioView = Em.ContainerView 'stateCheckbox', 'stateLabel', 'stateSelect', + 'sisDataLabel', + 'stationShortNameCheckbox', + 'stationShortNameLabel', + 'stationShortNameInput', + 'stationMessageCheckBox', + 'stationMessageLabel', + 'stationMessageInput', + 'stationLongNameCheckBox', + 'stationLongNameLabel', + 'stationLongNameInput', + 'gpsLocationLabel', + 'gpsLocationCheckBox', + 'longitudeLabel', + 'longitudeInput', + 'latitudeLabel', + 'latitudeInput', + 'altitudeCheckBox', + 'altitudeLabel', + 'altitudeInput', + 'stationIdLabel', + 'countryCodeCheckBox', + 'countryCodeLabel', + 'countryCodeInput', + 'fccLabel', + 'fccCheckBox', + 'fccInput', 'send' ], + + + fccCheckBox: Em.Checkbox.extend( + { + elementId: 'fccCheckBox', + classNames: 'fccCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId' + } + ), + fccLabel: SDL.Label.extend( + { + elementId: 'fccLabel', + classNames: 'fccLabel', + content: 'FCC facility ID' + } + ), + fccInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'fccInput', + classNames: 'fccInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationIDNumber.fccFacilityId', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId' + ), + disabledBinding: 'isDisabled' + } + ), + + + countryCodeCheckBox: Em.Checkbox.extend( + { + elementId: 'countryCodeCheckBox', + classNames: 'countryCodeCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.countryCode' + } + ), + countryCodeLabel: SDL.Label.extend( + { + elementId: 'countryCodeLabel', + classNames: 'countryCodeLabel', + content: 'Country code' + } + ), + countryCodeInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'countryCodeInput', + classNames: 'countryCodeInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationIDNumber.countryCode', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.countryCode; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.countryCode' + ), + disabledBinding: 'isDisabled' + } + ), + + + stationIdLabel: SDL.Label.extend( + { + elementId: 'stationIdLabel', + classNames: 'stationIdLabel', + content: 'Station ID:' + } + ), + + altitudeCheckBox: Em.Checkbox.extend( + { + attributeBindings: ['disabled'], + elementId: 'altitudeCheckBox', + classNames: 'altitudeCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + ), + disabledBinding: 'isDisabled' + } + ), + altitudeLabel: SDL.Label.extend( + { + elementId: 'altitudeLabel', + classNames: 'altitudeLabel', + content: 'Altitude' + } + ), + altitudeInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'altitudeInput', + classNames: 'altitudeInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.altitudeMeters', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation ? + !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation + :!SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation', + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters' + ), + disabledBinding: 'isDisabled' + } + ), + + + latitudeLabel: SDL.Label.extend( + { + elementId: 'latitudeLabel', + classNames: 'latitudeLabel', + content: 'Latitude' + } + ), + latitudeInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'latitudeInput', + classNames: 'latitudeInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.latitudeDegrees', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + ), + disabledBinding: 'isDisabled' + } + ), + + + longitudeLabel: SDL.Label.extend( + { + elementId: 'longitudeLabel', + classNames: 'longitudeLabel', + content: 'Longitude' + } + ), + longitudeInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'longitudeInput', + classNames: 'longitudeInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.longitudeDegrees', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + ), + disabledBinding: 'isDisabled' + } + ), + gpsLocationCheckBox: Em.Checkbox.extend( + { + elementId: 'gpsLocationCheckBox', + classNames: 'gpsLocationCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + } + ), + stationLongNameCheckBox: Em.Checkbox.extend( + { + elementId: 'stationLongNameCheckBox', + classNames: 'stationLongNameCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLongName' + } + ), + stationLongNameLabel: SDL.Label.extend( + { + elementId: 'stationLongNameLabel', + classNames: 'stationLongNameLabel', + content: 'Station long name' + } + ), + stationLongNameInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'stationLongNameInput', + classNames: 'stationLongNameInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLongName', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLongName; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLongName' + ), + disabledBinding: 'isDisabled', + + } + ), + stationMessageCheckBox: Em.Checkbox.extend( + { + attributeBindings: ['disabled'], + elementId: 'stationMessageCheckBox', + classNames: 'stationMessageCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationMessage' + } + ), + stationMessageLabel: SDL.Label.extend( + { + elementId: 'stationMessageLabel', + classNames: 'stationMessageLabel', + content: 'Station message' + } + ), + stationMessageInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'stationMessageInput', + classNames: 'stationMessageInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationMessage', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationMessage; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationMessage' + ), + disabledBinding: 'isDisabled' + } + ), + sisDataLabel: SDL.Label.extend( + { + elementId: 'sisDataLabel', + classNames: 'sisDataLabel', + content: 'Sis Data list' + } + ), + gpsLocationLabel: SDL.Label.extend( + { + elementId: 'gpsLocationLabel', + classNames: 'gpsLocationLabel', + content: 'GPS Location:' + } + ), + stationShortNameCheckbox: Em.Checkbox.extend( + { + elementId: 'stationShortNameCheckbox', + classNames: 'stationShortNameCheckbox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationShortName' + } + ), + stationShortNameLabel: SDL.Label.extend( + { + elementId: 'stationShortNameLabel', + classNames: 'stationShortNameLabel', + content: 'Station short name' + } + ), + stationShortNameInput: Ember.TextField.extend( + { + attributeBindings: ['disabled'], + elementId: 'stationShortNameInput', + classNames: 'stationShortNameInput', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationShortName', + isDisabled: function() { + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationShortName; + }.property( + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationShortName' + ), + disabledBinding: 'isDisabled' + } + ), bandCheckbox: Em.Checkbox.extend( { elementId: 'bandCheckbox', diff --git a/app/view/media/playerView.js b/app/view/media/playerView.js index 6c679f4fa..a8e2d1346 100644 --- a/app/view/media/playerView.js +++ b/app/view/media/playerView.js @@ -40,7 +40,10 @@ SDL.playerView = Em.ContainerView.create( childViews: [ SDL.RadioView, SDL.cdView, - SDL.usbView + SDL.usbView, + SDL.bluetoothView + ,SDL.lineInView + ,SDL.ipodView ] } ); diff --git a/css/media.css b/css/media.css index 93c0659c3..057843e7c 100644 --- a/css/media.css +++ b/css/media.css @@ -161,6 +161,7 @@ } #radio_options_view_container.options { + overflow:auto; width: 458px; height: 300px; background-color: black; @@ -188,7 +189,155 @@ left: 10px; top: 27px; } +#radio_options_view_container .sisDataLabel { + left: 10px; + top: 250px; +} +#radio_options_view_container .stationIdLabel { + left: 20px; + top: 410px; +} + + +#radio_options_view_container .fccCheckBox { + position: absolute; + left: 20px; + top: 450px; +} +#radio_options_view_container .fccLabel { + left: 35px; + top: 448px; +} +#radio_options_view_container .fccInput { + position: absolute; + top: 450px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .countryCodeCheckBox { + position: absolute; + left: 20px; + top: 430px; +} +#radio_options_view_container .countryCodeLabel { + left: 35px; + top: 428px; +} +#radio_options_view_container .countryCodeInput { + position: absolute; + top: 430px; + left: 220px; + width: 200px; +} + + +#radio_options_view_container .gpsLocationLabel { + left: 40px; + top: 330px; +} + + + +#radio_options_view_container .gpsLocationCheckBox { + position: absolute; + left: 25px; + top: 330px; +} +#radio_options_view_container .stationShortNameCheckbox { + position: absolute; + left: 20px; + top: 270px; +} +#radio_options_view_container .stationShortNameLabel { + left: 35px; + top: 268px; +} +#radio_options_view_container .stationShortNameInput { + position: absolute; + top: 270px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .longitudeLabel { + left: 50px; + top: 350px; +} + + +#radio_options_view_container .longitudeInput { + position: absolute; + top: 350px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .latitudeLabel { + left: 50px; + top: 370px; +} + + +#radio_options_view_container .latitudeInput { + position: absolute; + top: 370px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .altitudeCheckBox { + position: absolute; + left: 35px; + top: 392px; +} +#radio_options_view_container .altitudeLabel { + left: 50px; + top: 390px; +} + + +#radio_options_view_container .altitudeInput { + position: absolute; + top: 390px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .stationLongNameCheckBox { + position: absolute; + left: 20px; + top: 290px; +} +#radio_options_view_container .stationLongNameLabel { + left: 35px; + top: 288px; +} +#radio_options_view_container .stationLongNameInput { + position: absolute; + top: 290px; + left: 220px; + width: 200px; +} + +#radio_options_view_container .stationMessageCheckBox { + position: absolute; + left: 20px; + top: 310px; +} + +#radio_options_view_container .stationMessageLabel { + left: 35px; + top: 308px; +} + +#radio_options_view_container .stationMessageInput { + position: absolute; + top: 310px; + left: 220px; + width: 200px; +} #radio_options_view_container .PSCheckbox { position: absolute; left: 30px; @@ -420,7 +569,7 @@ } #radio_options_view_container .sendButton { - top: 260px; + top: 500px; left: 200px; width: 70px; height: 38px; @@ -701,7 +850,11 @@ opacity: 0 !important; } -.bc-item-big.prevcd, .bc-item-big.prevusb, .bc-item-big.prevsd, .bc-item-big.prevblue { +.bc-item-big.prevcd, .bc-item-big.prevusb, +.bc-item-big.prevbluetooth , +.bc-item-big.prevlineIn, +.bc-item-big.previpod, +.bc-item-big.prevsd, .bc-item-big.prevblue { width: 155px; height: 98px; border-right: 1px solid #393939; @@ -709,7 +862,12 @@ background: url(../images/media/cd-prev-btn.png) no-repeat; } -.bc-item-big.prevcd.pressed, .bc-item-big.prevusb.pressed, .bc-item-big.prevsd.pressed, .bc-item-big.prevblue.pressed { +.bc-item-big.prevcd.pressed, .bc-item-big.prevusb.pressed, +.bc-item-big.prevbluetooth.pressed , +.bc-item-big.prevlineIn.pressed , +.bc-item-big.previpod.pressed , +.bc-item-big.prevsd.pressed, + .bc-item-big.prevblue.pressed { background: url(../images/media/cd-prev-btn_pressed.png) no-repeat; } @@ -729,6 +887,9 @@ } .bc-item-big.play-usb, +.bc-item-big.play-bluetooth, +.bc-item-big.play-lineIn, +.bc-item-big.play-ipod, .bc-item-big.play-cd { width: 157px; height: 98px; @@ -750,12 +911,21 @@ visibility: visible; } -.bc-item-big.playcd.pressed, .bc-item-big.playusb.pressed, .bc-item-big.playsd.pressed, .bc-item-big.playblue.pressed { +.bc-item-big.playcd.pressed, +.bc-item-big.playusb.pressed, +.bc-item-big.playbluetooth.pressed, +.bc-item-big.playlineIn.pressed, +.bc-item-big.playipod.pressed, +.bc-item-big.playsd.pressed, +.bc-item-big.playblue.pressed { background: url(../images/media/cd_play_btn_pressed.png) no-repeat; } .bc-item-big.nextcd, .bc-item-big.nextusb, +.bc-item-big.nextbluetooth, +.bc-item-big.nextlineIn, +.bc-item-big.nextlineipod, .bc-item-big.nextsd, .bc-item-big.nextblue { width: 154px; @@ -767,7 +937,13 @@ left: 314px; } -.bc-item-big.nextcd.pressed, .bc-item-big.nextusb.pressed, .bc-item-big.nextsd.pressed, .bc-item-big.nextblue.pressed { +.bc-item-big.nextcd.pressed, + .bc-item-big.nextusb.pressed, + .bc-item-big.nextbluetooth.pressed, + .bc-item-big.nextlineIn.pressed, + .bc-item-big.nextipod.pressed, + .bc-item-big.nextsd.pressed, + .bc-item-big.nextblue.pressed { background: url(../images/media/cd-next-btn_pressed.png) no-repeat; } @@ -792,7 +968,36 @@ height: 109px; background: url(../images/media/small-lazerhorse-image.png) no-repeat; } - +#blueetooth_logo { + position: absolute; + top: 90px; + right: 10px; + border: 1px solid #393939; + border-radius: 2px; + width: 109px; + height: 109px; + background: url(../images/media/small-lazerhorse-image.png) no-repeat; +} +#lineIn_logo { + position: absolute; + top: 90px; + right: 10px; + border: 1px solid #393939; + border-radius: 2px; + width: 109px; + height: 109px; + background: url(../images/media/small-lazerhorse-image.png) no-repeat; +} +#ipod_logo { + position: absolute; + top: 90px; + right: 10px; + border: 1px solid #393939; + border-radius: 2px; + width: 109px; + height: 109px; + background: url(../images/media/small-fall-image.png) no-repeat; +} #bt-bg { position: relative; float: left; @@ -1023,8 +1228,8 @@ .pref{ width: 150px; height: 40px; - top:77px; - left:480px; + top:380px; + left:645px; border-radius: 3px; border: 1px solid #393939; z-index: 900; @@ -1057,9 +1262,14 @@ left: 5px; top: 20px; } +.option .equalizerSettingsCheckBox{ + position: absolute; + left: 5px; + top: 82px; +} .option .equalizerSettingsLabel { - left:5px; + left:25px; top:80px; } .option .equalizerChannelIdLabel{ diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index e777c6a02..eae26db1e 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -155,6 +155,8 @@ FFW.RC = FFW.RPCObserver.create( SDL.ClimateController.model.getClimateControlCapabilities(); var radioControlCapabilities = SDL.RadioModel.getRadioControlCapabilities(); + var audioControlCapabilities = + SDL.MediaController.getAudioControlCapabilities(); var buttonCapabilities = []; buttonCapabilities = buttonCapabilities.concat( @@ -170,6 +172,8 @@ FFW.RC = FFW.RPCObserver.create( radioControlCapabilities; remoteControlCapability.buttonCapabilities = buttonCapabilities; + remoteControlCapability.audioControlCapabilities = + audioControlCapabilities; // send repsonse var JSONMessage = { @@ -299,7 +303,7 @@ FFW.RC = FFW.RPCObserver.create( } else if (moduleType === 'RADIO') { radioControlData = SDL.RadioModel.getRadioControlData(false); } else if (moduleType ==='AUDIO'){ - audioControlData = SDL.MediaController.getAudioControlData(); + audioControlData = SDL.MediaController.getAudioControlData(false); } var JSONMessage = { @@ -460,15 +464,12 @@ FFW.RC = FFW.RPCObserver.create( /** * @param moduleType */ - onInteriorVehicleDataNotification: function(moduleType, data) { + onInteriorVehicleDataNotification: function(data) { var JSONMessage = { 'jsonrpc': '2.0', 'method': 'RC.OnInteriorVehicleData', 'params': { - 'moduleData': { - 'moduleType': moduleType, 'moduleData': data - } } }; Em.Logger.log('FFW.RC.OnInteriorVehicleData Notification'); diff --git a/images/media/line_in.png b/images/media/line_in.png new file mode 100644 index 0000000000000000000000000000000000000000..ab04248258c6ef5e3300506706f7af6bed344a85 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nETxt=bLAsLNtFB@_-I|#TXUVhRQ z_k2G063^sw6OEq;Xy(|qoLwe#NMVy=kHzcX3A1F&9yXTA0yQ@9PV#zirrOo#pyJY* z0-pX(|2PYOZ&BpmE+5=BFVdQ&MBb@04#@6r2qf` literal 0 HcmV?d00001 diff --git a/index.html b/index.html index 9514371b3..34426c7b8 100644 --- a/index.html +++ b/index.html @@ -171,7 +171,10 @@ + + + From d0a51aba6537371ce6c12bed248f05e61ca9ffd6 Mon Sep 17 00:00:00 2001 From: ypostolov Date: Wed, 21 Mar 2018 16:22:19 +0200 Subject: [PATCH 036/102] Bugfix of the radio modules(send sisData) --- app/controller/MediaController.js | 4 ++-- app/model/media/RadioModel.js | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) mode change 100755 => 100644 app/model/media/RadioModel.js diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index cf825d52d..814fcd6a5 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -50,7 +50,7 @@ SDL.MediaController = Em.Object.create( equalizerSettings:{ channelSetting:50, channelId: 50, - channelName: ' ' + channelName: 'Default' }, }, radioControlAudioValue: @@ -383,7 +383,7 @@ SDL.MediaController = Em.Object.create( result.volume=this.currentVolume; } if(this.radioControlAudioValue.equalizerSettings){ - equalizerSettings.channelId=this.radioControlStruct.equalizerSettings.channelId; + equalizerSettings.channelId=parseInt(this.radioControlStruct.equalizerSettings.channelId); equalizerSettings.channelName=this.radioControlStruct.equalizerSettings.channelName; equalizerSettings.channelSetting=this.radioControlStruct.equalizerSettings.channelSetting; } diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js old mode 100755 new mode 100644 index a1025ae2d..9aef87cd2 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -600,7 +600,7 @@ SDL.RadioModel = Em.Object.create({ result.sisData.stationShortName=this.radioControlStruct.sisData.stationShortName; } if(forceGetAll || this.radioControlCheckboxes.sisData.stationLongName){ - result.sisData.stationShortName=this.radioControlStruct.sisData.stationLongName; + result.sisData.stationLongName=this.radioControlStruct.sisData.stationLongName; } if(forceGetAll || this.radioControlCheckboxes.sisData.stationMessage){ result.sisData.stationMessage=this.radioControlStruct.sisData.stationMessage; @@ -1501,8 +1501,13 @@ SDL.RadioModel = Em.Object.create({ this.switchRadioBandFrequency(true); } } + + if(properties.indexOf('stationLocation.longitudeDegrees')>=0){ + properties.push('stationLocation.latitudeDegrees'); + }else if(properties.indexOf('stationLocation.latitudeDegrees')>=0){ + properties.push('stationLocation.longitudeDegrees'); + } this.sendRadioChangeNotification(properties); - //this.sendRadioChangeNotification(currentData); }, setFrequencyInteger: function(value) { From a0fed4308ac6b12d379dd2c1d79ef25e726e1cbb Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 21 Mar 2018 21:06:40 +0200 Subject: [PATCH 037/102] Bugfix at the audio modul --- app/StateManager.js | 2 +- app/controller/MediaController.js | 76 +++++++++++++++++++++++++----- app/model/media/BluetoothModel.js | 2 +- app/model/media/CDModel.js | 2 +- app/model/media/IPodModel.js | 2 +- app/model/media/LineInModel.js | 2 +- app/model/media/RadioModel.js | 2 +- app/model/media/USBModel.js | 2 +- app/view/media/audioView.js | 30 ++++++++---- app/view/media/player/radioView.js | 1 + css/media.css | 7 +-- 11 files changed, 93 insertions(+), 35 deletions(-) mode change 100644 => 100755 app/model/media/RadioModel.js diff --git a/app/StateManager.js b/app/StateManager.js index e902e5ef4..32d71b02b 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -376,7 +376,7 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateCD(); SDL.MediaController.radioControlStruct.source='MOBILE_APP'; var data = SDL.MediaController.getAudioControlData(); - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}}); if (SDL.SDLModel.data.mediaPlayerActive) { SDL.SDLController.onEventChanged('player', false); } diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 814fcd6a5..97ed067d6 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -53,22 +53,24 @@ SDL.MediaController = Em.Object.create( channelName: 'Default' }, }, + lastRadioControlStruct:{ + source:'AUDIO', + keepContext:true, + equalizerSettings:{ + channelSetting:50, + channelId: 50, + channelName: 'Default' + }, + }, radioControlAudioValue: { keepContext:true, volume:true, - equalizerSettings:true + equalizerSettings:true, + channelName:true + }, - // radioControlAudioValue: - // { - // keepContext:true, - // volume:true, - // equalizerSettings:{ - // channelSetting:true, - // channelId:true, - // channelName:true - // }, - // }, + //lastParams:{}, usbControl:{ keepContext: false @@ -78,8 +80,51 @@ SDL.MediaController = Em.Object.create( false ], saveButtonPress:function(){ + var equalizerSettings={}; + if(this.radioControlStruct.equalizerSettings.channelSetting!=this.lastRadioControlStruct.equalizerSettings.channelSetting|| + this.radioControlStruct.equalizerSettings.channelId!=this.lastRadioControlStruct.equalizerSettings.channelId) + { + equalizerSettings.channelId=parseInt(this.radioControlStruct.equalizerSettings.channelId); + equalizerSettings.channelSetting=parseInt(this.radioControlStruct.equalizerSettings.channelSetting); + } + if(this.radioControlStruct.equalizerSettings.channelName!=this.lastRadioControlStruct.equalizerSettings.channelName){ + equalizerSettings.channelName=this.radioControlStruct.equalizerSettings.channelName; + equalizerSettings.channelId=parseInt(this.radioControlStruct.equalizerSettings.channelId); + equalizerSettings.channelSetting=parseInt(this.radioControlStruct.equalizerSettings.channelSetting); + } SDL.MediaController.toggleProperty('optionsEnabled'); + if(equalizerSettings.channelId!=null||equalizerSettings.channelSetting!=null){ + var arrayNotification=[equalizerSettings]; + var result={'equalizerSettings': arrayNotification}; + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:result}); + this.setLastData(equalizerSettings); + } + }, + setLastData:function(data){ + if(data.channelId!=null){ + this.set('this.lastRadioControlStruct.equalizerSettings.channelId',data.channelId); + } + if(data.channelSetting!=null){ + this.set('this.lastRadioControlStruct.equalizerSettings.channelSetting',data.channelSetting); + } + if(data.channelName!=null){ + this.set('this.lastRadioControlStruct.equalizerSettings.channelName',data.channelName); + } }, + getCurrentData:function(){ + var result = { + 'source':this.lastRadioControlStruct.source, + 'equalizerSettings':{ + 'channelSetting':this.lastRadioControlStruct.equalizerSettings.channelSetting, + 'channelId':this.lastRadioControlStruct.equalizerSettings.channelId, + 'channelName':this.lastRadioControlStruct.equalizerSettings.channelName + }, + + }; + return result; + }, + + optionsEnabled:false, toggleOptions:function(){ SDL.MediaController.toggleProperty('optionsEnabled'); @@ -169,6 +214,10 @@ SDL.MediaController = Em.Object.create( volumeUpPress: function() { if (this.currentVolume < 100) { this.set('currentVolume', this.currentVolume + 1); + if(this.radioControlAudioValue.volume) + { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'volume':this.currentVolume}}); + } } }, /** @@ -177,6 +226,10 @@ SDL.MediaController = Em.Object.create( volumeDownPress: function() { if (this.currentVolume > 0) { this.set('currentVolume', this.currentVolume - 1); + if(this.radioControlAudioValue.volume) + { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'volume':this.currentVolume}}); + } } }, /** @@ -374,7 +427,6 @@ SDL.MediaController = Em.Object.create( { var result={}; var equalizerSettings={}; - var validEqualizer={}; result.source=this.radioControlStruct.source; if(this.radioControlAudioValue.keepContext){ result.keepContext=this.radioControlStruct.keepContext; diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js index fd1cd58c2..28564ca31 100644 --- a/app/model/media/BluetoothModel.js +++ b/app/model/media/BluetoothModel.js @@ -39,7 +39,7 @@ init: function() { this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}}); } }, setSource:function() diff --git a/app/model/media/CDModel.js b/app/model/media/CDModel.js index db170a9a0..d41bd3d17 100644 --- a/app/model/media/CDModel.js +++ b/app/model/media/CDModel.js @@ -148,7 +148,7 @@ sendAudioNotification:function() this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}}); } }, setSource:function() diff --git a/app/model/media/IPodModel.js b/app/model/media/IPodModel.js index e7b392bd9..48d7cd4fd 100644 --- a/app/model/media/IPodModel.js +++ b/app/model/media/IPodModel.js @@ -34,7 +34,7 @@ sendAudioNotification:function() this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: {'source':data.source}}); } }, setSource:function() diff --git a/app/model/media/LineInModel.js b/app/model/media/LineInModel.js index 689fabbc4..b4d186dde 100644 --- a/app/model/media/LineInModel.js +++ b/app/model/media/LineInModel.js @@ -34,7 +34,7 @@ sendAudioNotification:function() this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}}); } }, setSource:function() diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js old mode 100644 new mode 100755 index 9aef87cd2..d0b5c28b8 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -1464,7 +1464,7 @@ SDL.RadioModel = Em.Object.create({ this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: {'source':data.source}}); } }, setSource:function() diff --git a/app/model/media/USBModel.js b/app/model/media/USBModel.js index d2b31b352..818e76a57 100644 --- a/app/model/media/USBModel.js +++ b/app/model/media/USBModel.js @@ -60,7 +60,7 @@ boolStruct: [ this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: data}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: {'source':data.source}}); } }, setSource:function() diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index d3289ef2b..c868c6e46 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -43,7 +43,6 @@ childViews:[ 'keepContextSelect', 'keepContextLabel', - 'keepContextCheckBox', 'volumeInput', 'volumeLabel', 'volumeCheckBox', @@ -52,6 +51,7 @@ 'equalizerChannelIdLabel', 'equalizerChannelNameInput', 'equalizerChannelNameLabel', + 'equalizerChannelNameCheckBox', 'equalizerChannelSettingLabel', 'equalizerChannelSettingInput', 'equalizerSettingsCheckBox', @@ -105,6 +105,20 @@ content: 'Channel name:', } ), + equalizerChannelNameCheckBox: Em.Checkbox.extend( + { + attributeBindings: ['disabled'], + elementId: 'equalizerChannelNameCheckBox', + classNames: 'equalizerChannelNameCheckBox', + checkedBinding: 'SDL.MediaController.radioControlAudioValue.channelName', + isDisabled: function() { + return !SDL.MediaController.radioControlAudioValue.equalizerSettings; + }.property( + 'SDL.MediaController.radioControlAudioValue.equalizerSettings' + ), + disabledBinding: 'isDisabled' + } + ), equalizerChannelNameInput:Ember.TextField.extend( { attributeBindings: ['disabled'], @@ -112,9 +126,12 @@ classNames:'equalizerChannelNameInput', valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelName', isDisabled: function() { - return !SDL.MediaController.radioControlAudioValue.equalizerSettings; + return !SDL.MediaController.radioControlAudioValue.equalizerSettings ? + !SDL.MediaController.radioControlAudioValue.equalizerSettings + :!SDL.MediaController.radioControlAudioValue.channelName; }.property( - 'SDL.MediaController.radioControlAudioValue.equalizerSettings' + 'SDL.MediaController.radioControlAudioValue.equalizerSettings', + 'SDL.MediaController.radioControlAudioValue.channelName' ), disabledBinding: 'isDisabled' } @@ -155,13 +172,6 @@ content: 'Keep context:' } ), - keepContextCheckBox:Em.Checkbox.extend( - { - elementId: 'keepContextCheckBox', - classNames: 'keepContextCheckBox', - checkedBinding: 'SDL.MediaController.radioControlAudioValue.keepContext' - } - ), volumeInput: Ember.TextField.extend( { elementId:'volumeInput', diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index b0bb48541..968fea480 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -161,6 +161,7 @@ SDL.RadioView = Em.ContainerView }.property( 'SDL.RadioModel.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId' ), + disabledBinding: 'isDisabled' } ), diff --git a/css/media.css b/css/media.css index 057843e7c..8cf0506d8 100644 --- a/css/media.css +++ b/css/media.css @@ -1257,11 +1257,6 @@ color: white; background: #393939; } -.option .keepContextCheckBox{ - position: absolute; - left: 5px; - top: 20px; -} .option .equalizerSettingsCheckBox{ position: absolute; left: 5px; @@ -1343,7 +1338,7 @@ .option .equalizerChannelNameCheckBox{ position: absolute; left: 5px; - top: 140px; + top: 142px; } .option .equalizerChannelNameLabel{ left:25px; From c93a267b826c53e8d080261ff2c001fbf3a78c6b Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Mon, 12 Mar 2018 14:54:47 +0200 Subject: [PATCH 038/102] Implemented "Climate" controls. - implemented "heated windshield" control; - implemented "heated rear window" control; - implemented "heated steering wheel" control; - implemented "heated mirrors" control. --- app/model/ClimateControlModel.js | 70 +++++++++++++++++++++++++++++-- app/view/climateView.js | 72 +++++++++++++++++++++++++++++++- css/climate.css | 42 ++++++++++++++----- 3 files changed, 168 insertions(+), 16 deletions(-) diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 4adbef57d..3bdedd090 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -26,7 +26,11 @@ SDL.ClimateControlModel = Em.Object.create({ fanSpeed: 0, ventilationMode: 'UPPER', ventilationModeLowEnable: false, - ventilationModeUpEnable: true + ventilationModeUpEnable: false, + heatedWindshieldEnable: false, + heatedRearWindowEnable: false, + heatedSteeringWheelEnable: false, + heatedMirrorsEnable: false }, getClimateControlCapabilities: function() { @@ -45,7 +49,11 @@ SDL.ClimateControlModel = Em.Object.create({ defrostZoneAvailable: true, defrostZone: this.defrostZoneStruct, ventilationModeAvailable: true, - ventilationMode: this.ventilationModeStruct + ventilationMode: this.ventilationModeStruct, + heatedWindshieldAvailable: true, + heatedRearWindowAvailable: true, + heatedSteeringWheelAvailable: true, + heatedMirrorsAvailable: true }; result.push(capabilities); @@ -148,7 +156,11 @@ SDL.ClimateControlModel = Em.Object.create({ defrostZone: this.climateControlData.defrostZone, dualModeEnable: this.climateControlData.dualModeEnable, acMaxEnable: this.climateControlData.acMaxEnable, - ventilationMode: this.climateControlData.ventilationMode + ventilationMode: this.climateControlData.ventilationMode, + heatedWindshieldEnable: this.climateControlData.heatedWindshieldEnable, + heatedRearWindowEnable: this.climateControlData.heatedRearWindowEnable, + heatedSteeringWheelEnable: this.climateControlData.heatedSteeringWheelEnable, + heatedMirrorsEnable: this.climateControlData.heatedMirrorsEnable }; return result; @@ -197,6 +209,22 @@ SDL.ClimateControlModel = Em.Object.create({ this.setVentilationMode(data.ventilationMode); } + if (data.heatedWindshieldEnable != null) { + this.setHeatedWindshieldEnable(data.heatedWindshieldEnable); + } + + if (data.heatedRearWindowEnable != null) { + this.setHeatedRearWindowEnable(data.heatedRearWindowEnable); + } + + if (data.heatedSteeringWheelEnable != null) { + this.setHeatedSteeringWheelEnable(data.heatedSteeringWheelEnable); + } + + if (data.heatedMirrorsEnable != null) { + this.setHeatedMirrorsEnable(data.heatedMirrorsEnable); + } + var after_set = SDL.deepCopy(this.getClimateControlData()); var properties = @@ -385,6 +413,26 @@ SDL.ClimateControlModel = Em.Object.create({ this.sendClimateChangeNotification(['autoModeEnable']); }, + toggleHeatedWindshieldEnable: function(){ + this.toggleProperty('climateControlData.heatedWindshieldEnable'); + this.sendClimateChangeNotification(['heatedWindshieldEnable']); + }, + + toggleHeatedRearWindowEnable: function(){ + this.toggleProperty('climateControlData.heatedRearWindowEnable'); + this.sendClimateChangeNotification(['heatedRearWindowEnable']); + }, + + toggleHeatedSteeringWheelEnable: function(){ + this.toggleProperty('climateControlData.heatedSteeringWheelEnable'); + this.sendClimateChangeNotification(['heatedSteeringWheelEnable']); + }, + + toggleHeatedMirrorsEnable: function(){ + this.toggleProperty('climateControlData.heatedMirrorsEnable'); + this.sendClimateChangeNotification(['heatedMirrorsEnable']); + }, + onAcEnableChanged: function(sendNotification) { var properties = ['acEnable']; if (!this.climateControlData.acEnable && @@ -455,6 +503,22 @@ SDL.ClimateControlModel = Em.Object.create({ setVentilationMode: function(ventMode) { this.set('climateControlData.ventilationMode', ventMode); + }, + + setHeatedWindshieldEnable: function(state) { + this.set('climateControlData.heatedWindshieldEnable', state); + }, + + setHeatedRearWindowEnable: function(state) { + this.set('climateControlData.heatedRearWindowEnable', state); + }, + + setHeatedSteeringWheelEnable: function(state) { + this.set('climateControlData.heatedSteeringWheelEnable', state); + }, + + setHeatedMirrorsEnable: function(state) { + this.set('climateControlData.heatedMirrorsEnable', state); } } ); diff --git a/app/view/climateView.js b/app/view/climateView.js index 4b97d09c1..bdd8fcfb5 100644 --- a/app/view/climateView.js +++ b/app/view/climateView.js @@ -69,7 +69,11 @@ SDL.ClimateView = Em.ContainerView.create( 'acMaxEnable', 'autoModeEnable', 'dualModeEnable', - 'recirculateAirEnable' + 'recirculateAirEnable', + 'heatedWindshieldEnable', + 'heatedRearWindowEnable', + 'heatedSteeringWheelEnable', + 'heatedMirrorsEnable' ], desiredTemp: Em.ContainerView.extend( { @@ -466,7 +470,71 @@ SDL.ClimateView = Em.ContainerView.create( templateName: 'rightIcon', onDown: false } - ) + ), + heatedWindshieldEnable: SDL.Button.extend({ + elementId: 'heatedWindshieldEnable', + classNames: 'heatedWindshieldEnable switcher', + iconBinding: 'onIconChange', + disabledBinding: 'parentView.disabled', + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.ClimateController.model.climateControlData.heatedWindshieldEnable); + }.property( + 'SDL.ClimateController.model.climateControlData.heatedWindshieldEnable' + ), + action: 'toggleHeatedWindshieldEnable', + target: 'SDL.ClimateController.model', + onDown: false, + text: 'HW' + }), + heatedRearWindowEnable: SDL.Button.extend({ + elementId: 'heatedRearWindowEnable', + classNames: 'heatedRearWindowEnable switcher', + iconBinding: 'onIconChange', + disabledBinding: 'parentView.disabled', + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.ClimateController.model.climateControlData.heatedRearWindowEnable); + }.property( + 'SDL.ClimateController.model.climateControlData.heatedRearWindowEnable' + ), + action: 'toggleHeatedRearWindowEnable', + target: 'SDL.ClimateController.model', + onDown: false, + text: 'HR' + }), + heatedSteeringWheelEnable: SDL.Button.extend({ + elementId: 'heatedSteeringWheelEnable', + classNames: 'heatedSteeringWheelEnable switcher', + iconBinding: 'onIconChange', + disabledBinding: 'parentView.disabled', + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.ClimateController.model.climateControlData.heatedSteeringWheelEnable); + }.property( + 'SDL.ClimateController.model.climateControlData.heatedSteeringWheelEnable' + ), + action: 'toggleHeatedSteeringWheelEnable', + target: 'SDL.ClimateController.model', + onDown: false, + text: 'HS' + }), + heatedMirrorsEnable: SDL.Button.extend({ + elementId: 'heatedMirrorsEnable', + classNames: 'heatedMirrorsEnable switcher', + iconBinding: 'onIconChange', + disabledBinding: 'parentView.disabled', + onIconChange: function() { + return SDL.SDLController.getLedIndicatorImagePath( + SDL.ClimateController.model.climateControlData.heatedMirrorsEnable); + }.property( + 'SDL.ClimateController.model.climateControlData.heatedMirrorsEnable' + ), + action: 'toggleHeatedMirrorsEnable', + target: 'SDL.ClimateController.model', + onDown: false, + text: 'HM' + }) } ) } diff --git a/css/climate.css b/css/climate.css index c30ffc4ea..dbf997177 100644 --- a/css/climate.css +++ b/css/climate.css @@ -59,28 +59,28 @@ } #climate_control .acEnable{ - top: 340px; + top: 365px; left: 74px; } #climate_control .acMaxEnable{ - top: 340px; + top: 365px; left: 190px; width: 150px; } #climate_control .recirculateAirEnable{ - top: 340px; + top: 365px; left: 341px; } #climate_control .autoModeEnable{ - top: 340px; + top: 365px; left: 457px; } #climate_control .dualModeEnable{ - top: 340px; + top: 365px; left: 573px; } @@ -100,17 +100,17 @@ } #defrostZoneLabel.label { - top: 270px; + top: 225px; left: 125px; } #temperatureUnitLabel.label { - top: 270px; + top: 225px; left: 317px; } #ventilationModeLabel.label { - top: 270px; + top: 225px; left: 520px; } @@ -153,7 +153,7 @@ } #defrostZone.quattro_container{ - top: 190px; + top: 145px; left: 100px; } @@ -192,7 +192,7 @@ } #temperatureUnit.quattro_container{ - top: 190px; + top: 145px; right: 350px; font-size: 35px; line-height: 70px; @@ -228,7 +228,7 @@ } #ventilationMode.quattro_container{ - top: 190px; + top: 145px; right: 150px; } @@ -239,3 +239,23 @@ #ventilationMode .topLeft{ padding: 25px 8px 0 16px; } + +#climate_control .heatedWindshieldEnable{ + top: 270px; + left: 140px; +} + +#climate_control .heatedRearWindowEnable{ + top: 270px; + left: 256px; +} + +#climate_control .heatedSteeringWheelEnable{ + top: 270px; + left: 372px; +} + +#climate_control .heatedMirrorsEnable{ + top: 270px; + left: 488px; +} From 984d560b9a35e481fbd2987ba0c8e6980ad65956 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Wed, 14 Mar 2018 17:31:35 +0200 Subject: [PATCH 039/102] Implemented "HMI Setting" controls (Get/Set/Notification). - implemented "Display Mode" control [DAY, NIGHT, AUTO]; - implemented "Distance Unit" control [MILES, KILOMETERS]; - implemented "Temperature Unit " control [FAHRENHEIT, CELSIUS]; --- app/StateManager.js | 3 +- app/controller/SettingsController.js | 10 +++ app/controller/sdl/RController.js | 58 +++++++++++---- app/model/ClimateControlModel.js | 14 ++++ app/model/HmiSettingsModel.js | 101 +++++++++++++++++++++++++++ app/view/settings/HMISettingsView.js | 88 +++++++++++++++++++++++ app/view/settingsView.js | 22 ++++-- css/settings.css | 21 ++++++ ffw/RCRPC.js | 41 +++++++++-- index.html | 2 + 10 files changed, 337 insertions(+), 23 deletions(-) create mode 100644 app/model/HmiSettingsModel.js create mode 100644 app/view/settings/HMISettingsView.js diff --git a/app/StateManager.js b/app/StateManager.js index 32d71b02b..779d935fc 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -215,7 +215,8 @@ var StateManager = Em.StateManager.extend( } ) } - ) + ), + HMISettings: Em.State.create({}) } ), /** Media state */ diff --git a/app/controller/SettingsController.js b/app/controller/SettingsController.js index 338eebe50..c66f819b6 100644 --- a/app/controller/SettingsController.js +++ b/app/controller/SettingsController.js @@ -361,6 +361,16 @@ SDL.SettingsController = Em.Object.create( oldTimer: 0 }; } + }, + turnOnPoliciesSettings: function(){ + if(!SDL.States.settings.policies.active){ + SDL.States.goToStates('settings.policies'); + } + }, + turnOnHMISettings: function(){ + if(!SDL.States.settings.HMISettings.active){ + SDL.States.goToStates('settings.HMISettings'); + } } } ); diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index 790c23fda..91d0cca81 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -203,24 +203,58 @@ SDL.RController = SDL.SDLController.extend( * Toggle RSDL access mode option */ toggleRCAccessMode: function() { - var arr_length = SDL.SDLModel.reverseAccessModesStruct.length; + var next = this.nextElement(SDL.SDLModel.reverseAccessModesStruct, SDL.SDLModel.reverseAccessMode); + SDL.SDLModel.set('reverseAccessMode',next); + FFW.RC.OnRemoteControlSettings( + SDL.SDLModel.reverseFunctionalityEnabled, + SDL.SDLModel.reverseAccessMode + ); + }, + toggleDisplayMode: function() { + var next = this.nextElement(SDL.HmiSettingsModel.displayModeStruct, SDL.HmiSettingsModel.displayMode); + SDL.HmiSettingsModel.set('displayMode',next); + var data = { + displayMode: next + } + this.sendHMISettingsNotification(data); + }, + toggleDistanceUnit: function() { + var next = this.nextElement(SDL.HmiSettingsModel.distanceUnitStruct, SDL.HmiSettingsModel.distanceUnit); + SDL.HmiSettingsModel.set('distanceUnit',next); + var data = { + distanceUnit: next + } + this.sendHMISettingsNotification(data); + }, + toggleTemperatureUnit: function() { + var next = this.nextElement(SDL.HmiSettingsModel.temperatureUnitStruct, SDL.HmiSettingsModel.temperatureUnit); + SDL.HmiSettingsModel.set('temperatureUnit',next); + SDL.ClimateControlModel.set('climateControlData.temperatureUnit', next); + var data = { + temperatureUnit: next + } + if(next == 'FAHRENHEIT'){ + SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); + }else{ + SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); + } + }, + sendHMISettingsNotification: function(data){ + if (Object.keys(data).length > 0) { + FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + } + }, + nextElement: function(data, currentItem){ + var arr_length = data.length; for (var i = 0; i < arr_length; i++) { - if (SDL.SDLModel.reverseAccessModesStruct[i] == - SDL.SDLModel.reverseAccessMode) { + if (data[i] == currentItem) { if (i + 1 >= arr_length) { - SDL.SDLModel.set('reverseAccessMode', - SDL.SDLModel.reverseAccessModesStruct[0]); + return data[0]; } else { - SDL.SDLModel.set('reverseAccessMode', - SDL.SDLModel.reverseAccessModesStruct[i + 1]); + return data[i + 1]; } - break; } } - FFW.RC.OnRemoteControlSettings( - SDL.SDLModel.reverseFunctionalityEnabled, - SDL.SDLModel.reverseAccessMode - ); }, /** * Change responses to error for GetInteriorVehicleDataCapabilities diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 3bdedd090..3153802ad 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -309,6 +309,13 @@ SDL.ClimateControlModel = Em.Object.create({ ['currentTemperature.unit', 'currentTemperature.value', 'desiredTemperature.unit', 'desiredTemperature.value'] ); + SDL.HmiSettingsModel.set('temperatureUnit','FAHRENHEIT'); + var data = { + temperatureUnit: 'FAHRENHEIT' + } + if (Object.keys(data).length > 0) { + FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + } }, temperatureUnitCelsiusEnable: function() { @@ -317,6 +324,13 @@ SDL.ClimateControlModel = Em.Object.create({ ['currentTemperature.unit', 'currentTemperature.value', 'desiredTemperature.unit', 'desiredTemperature.value'] ); + SDL.HmiSettingsModel.set('temperatureUnit','CELSIUS'); + var data = { + temperatureUnit: 'CELSIUS' + } + if (Object.keys(data).length > 0) { + FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + } }, refreshDefrostZoneValue: function() { diff --git a/app/model/HmiSettingsModel.js b/app/model/HmiSettingsModel.js new file mode 100644 index 000000000..c5e67b4fe --- /dev/null +++ b/app/model/HmiSettingsModel.js @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/** + * @name SDL.HmiSettingsModel + * @desc Navigation model + * @category Model + * @filesource app/model/HmiSettingsModel.js + * @version 1.0 + */ + +SDL.HmiSettingsModel = Em.Object.create({ + + displayModeStruct: [ + 'DAY', + 'NIGHT', + 'AUTO' + ], + displayMode: 'DAY', + + distanceUnitStruct:[ + 'MILES', + 'KILOMETERS' + ], + distanceUnit: 'MILES', + + temperatureUnitStruct: [ + 'FAHRENHEIT', + 'CELSIUS' + ], + temperatureUnit: SDL.ClimateControlModel.climateControlData.temperatureUnit, + + getHmiSettingsCapabilities: function() { + var capabilities = { + moduleName: 'HMISettingsControlCapabilities', + distanceUnitAvailable: true, + temperatureUnitAvailable: true, + displayModeUnitAvailable: true + }; + + return capabilities; + }, + + setHmiSettingsData: function(data){ + if(null != data.displayMode){ + this.set('displayMode',data.displayMode); + } + if(null != data.temperatureUnit){ + this.set('temperatureUnit',data.temperatureUnit); + if('CELSIUS' == data.temperatureUnit){ + SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); + }else{ + SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); + } + } + if(null != data.distanceUnit){ + this.set('distanceUnit',data.distanceUnit); + } + + properties = []; + for (var key in data) { + properties.push(key); + } + + var result = this.getHmiSettingsControlData(true); + return SDL.SDLController.filterObjectProperty(result, properties); + }, + + getHmiSettingsControlData: function(){ + var result = { + temperatureUnit: this.temperatureUnit, + displayMode: this.displayMode, + distanceUnit: this.distanceUnit + }; + + return result; + } +}) + diff --git a/app/view/settings/HMISettingsView.js b/app/view/settings/HMISettingsView.js new file mode 100644 index 000000000..76a0cd867 --- /dev/null +++ b/app/view/settings/HMISettingsView.js @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/** + * @name SDL.HMISettingsView + * @desc Info Apps visual representation + * @category View + * @filesource app/view/settings/AppsView.js + * @version 1.0 + */ + +SDL.HMISettingsView = Em.ContainerView.create({ + elementId: 'hmi_settings', + classNames: 'in_HMIsettings_view', + classNameBindings: [ + 'SDL.States.settings.HMISettings.active:active_state:inactive_state' + ], + childViews: [ + 'SettingsList' + ], + getDisplayModeStatus: function() { + return 'Display mode - ' + SDL.HmiSettingsModel.displayMode; + }.property( + 'SDL.HmiSettingsModel.displayMode' + ), + getDistanceUnit: function() { + return 'Distance unit - ' + SDL.HmiSettingsModel.distanceUnit; + }.property( + 'SDL.HmiSettingsModel.distanceUnit' + ), + getTemperatureUnit: function() { + return 'Temperature unit - ' + SDL.HmiSettingsModel.temperatureUnit; + }.property( + 'SDL.HmiSettingsModel.temperatureUnit' + ), + SettingsList: SDL.List.extend({ + elementId: 'HMI_settings_list', + classNames:'HMI_settings_list', + itemsOnPage: 5, + /** Items */ + items: [{ + type: SDL.Button, + params: { + action: 'toggleDisplayMode', + target: 'SDL.SDLController', + textBinding: 'SDL.HMISettingsView.getDisplayModeStatus' + } + }, + { + type: SDL.Button, + params: { + action: 'toggleDistanceUnit', + target: 'SDL.SDLController', + textBinding: 'SDL.HMISettingsView.getDistanceUnit' + } + }, + { + type: SDL.Button, + params: { + action: 'toggleTemperatureUnit', + target: 'SDL.SDLController', + textBinding: 'SDL.HMISettingsView.getTemperatureUnit' + } + }] + }) +}); \ No newline at end of file diff --git a/app/view/settingsView.js b/app/view/settingsView.js index afd8367de..f84c6b2dd 100644 --- a/app/view/settingsView.js +++ b/app/view/settingsView.js @@ -50,7 +50,8 @@ SDL.SettingsView = Em.ContainerView.create( SDL.GetUrlsView, SDL.SystemErrorView, SDL.ConnectionSettingsView, - SDL.RSDLOptionsView + SDL.RSDLOptionsView, + SDL.HMISettingsView ], /** Left menu */ leftMenu: Em.ContainerView.extend( @@ -73,7 +74,8 @@ SDL.SettingsView = Em.ContainerView.create( { classNames: 'ls-items', childViews: [ - 'policies' + 'policies', + 'HMISettings' ], policies: SDL.Button.extend( { @@ -85,10 +87,22 @@ SDL.SettingsView = Em.ContainerView.create( ], text: 'Policies', icon: 'images/settings/ico_settings.png', - action: 'onState', + action: 'turnOnPoliciesSettings', target: 'SDL.SettingsController' } - ) + ), + HMISettings: SDL.Button.extend({ + elementId: 'HMISettings_leftMenu', + goToState: 'HMISettings', + classNames: 'menu-item lsp1_p', + classNameBindings: [ + 'SDL.States.settings.HMISettings.active:info_active', + ], + text: 'HMI', + icon: 'images/settings/ico_settings.png', + action: 'turnOnHMISettings', + target: 'SDL.SettingsController' + }) } ) } diff --git a/css/settings.css b/css/settings.css index 14adf6cef..e0f00d551 100644 --- a/css/settings.css +++ b/css/settings.css @@ -150,4 +150,25 @@ height: 40px; color: white; background: #393939; +} + +#settingsView .in_HMIsettings_view { + position: absolute; + top: 48px; + left: 153px; + width: 647px; + height: 384px; + float: left; + z-index: 1001; + margin-top: 70px; +} + +#settingsView .HMI_settings_list { + height: 251px; + width: 598px; + left: 10px;; +} +#HMI_settings_list .list-content .ffw-button { + width: 537px; + padding-left: 10px; } \ No newline at end of file diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index eae26db1e..7546c1b1e 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -157,6 +157,8 @@ FFW.RC = FFW.RPCObserver.create( SDL.RadioModel.getRadioControlCapabilities(); var audioControlCapabilities = SDL.MediaController.getAudioControlCapabilities(); + var hmiSettingsControlCapabilities = + SDL.HmiSettingsModel.getHmiSettingsCapabilities(); var buttonCapabilities = []; buttonCapabilities = buttonCapabilities.concat( @@ -170,6 +172,8 @@ FFW.RC = FFW.RPCObserver.create( climateControlCapabilities; remoteControlCapability.radioControlCapabilities = radioControlCapabilities; + remoteControlCapability.hmiSettingsControlCapabilities = + hmiSettingsControlCapabilities; remoteControlCapability.buttonCapabilities = buttonCapabilities; remoteControlCapability.audioControlCapabilities = @@ -226,6 +230,7 @@ FFW.RC = FFW.RPCObserver.create( var newClimateControlData = null; var newRadioControlData = null; var newAudioControlData= null; + var newHMISettingsControlData = null; if (request.params.moduleData.climateControlData) { newClimateControlData = @@ -244,6 +249,10 @@ FFW.RC = FFW.RPCObserver.create( newAudioControlData = SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); } + if(request.params.moduleData.hmiSettingsControlData){ + newHMISettingsControlData = SDL.HmiSettingsModel.setHmiSettingsData( + request.params.moduleData.hmiSettingsControlData); + } // send repsonse var JSONMessage = { 'jsonrpc': '2.0', @@ -266,6 +275,10 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.radioControlData = newRadioControlData; } + if(newHMISettingsControlData){ + JSONMessage.result.moduleData.hmiSettingsControlData = + newHMISettingsControlData; + } this.client.send(JSONMessage); break; @@ -294,16 +307,28 @@ FFW.RC = FFW.RPCObserver.create( var climateControlData = null; var radioControlData = null; var audioControlData=null; + var hmiSettingsControlData = null; var app = SDL.SDLController.getApplicationModel( request.params.appID ); - if (moduleType === 'CLIMATE') { - climateControlData = SDL.ClimateController.model.getClimateControlData(); - } else if (moduleType === 'RADIO') { - radioControlData = SDL.RadioModel.getRadioControlData(false); - } else if (moduleType ==='AUDIO'){ - audioControlData = SDL.MediaController.getAudioControlData(false); + switch(moduleType){ + case 'CLIMATE':{ + climateControlData = SDL.ClimateController.model.getClimateControlData(); + break + } + case 'RADIO':{ + radioControlData = SDL.RadioModel.getRadioControlData(false); + break + } + case 'HMI_SETTINGS':{ + hmiSettingsControlData = SDL.HmiSettingsModel.getHmiSettingsControlData(false); + break + } + case 'AUDIO':{ + audioControlData = SDL.MediaController.getAudioControlData(false); + break; + } } var JSONMessage = { @@ -330,6 +355,10 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.audioControlData = audioControlData; } + if(hmiSettingsControlData){ + JSONMessage.result.moduleData.hmiSettingsControlData = + hmiSettingsControlData; + } if (request.params.subscribe !== undefined) { JSONMessage.result.isSubscribed = request.params.subscribe; diff --git a/index.html b/index.html index 34426c7b8..17ee9d3ae 100644 --- a/index.html +++ b/index.html @@ -108,6 +108,7 @@ + @@ -214,6 +215,7 @@ + From a937459c93fa0406abbc5aed554ee24361079ea8 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Fri, 16 Mar 2018 18:41:09 +0200 Subject: [PATCH 040/102] Implemented "LIGHT" controls (Get/Set/Notification). - implemented "Light Status" control; - implemented "Light Density" control; - implemented "Light Color" control; --- app/AppViews.js | 3 +- app/StateManager.js | 41 ++-- app/controller/SettingsController.js | 15 ++ app/controller/sdl/RController.js | 2 +- app/model/ClimateControlModel.js | 4 +- app/model/LightModel.js | 188 +++++++++++++++++++ app/view/settings/LightView.js | 110 +++++++++++ app/view/settings/light/exteriorLightView.js | 34 ++++ app/view/settings/light/interiorLightView.js | 35 ++++ app/view/settings/light/locationLightView.js | 34 ++++ app/view/settings/light/sendMessage.js | 135 +++++++++++++ app/view/settings/light/singleLightView.js | 34 ++++ app/view/settingsView.js | 22 ++- css/climate.css | 2 - css/sdl.css | 86 ++++++++- css/settings.css | 41 +++- ffw/RCRPC.js | 27 ++- images/settings/close_icon.png | Bin 0 -> 824 bytes index.html | 7 + 19 files changed, 787 insertions(+), 33 deletions(-) create mode 100644 app/model/LightModel.js create mode 100644 app/view/settings/LightView.js create mode 100644 app/view/settings/light/exteriorLightView.js create mode 100644 app/view/settings/light/interiorLightView.js create mode 100644 app/view/settings/light/locationLightView.js create mode 100644 app/view/settings/light/sendMessage.js create mode 100644 app/view/settings/light/singleLightView.js create mode 100644 images/settings/close_icon.png diff --git a/app/AppViews.js b/app/AppViews.js index 342c08306..690afb426 100644 --- a/app/AppViews.js +++ b/app/AppViews.js @@ -74,7 +74,8 @@ SDL.AppViews = Em.ContainerView.extend( SDL.DriverDistraction, SDL.ExitApp, SDL.PrimaryDevice, - SDL.SystemRequest + SDL.SystemRequest, + SDL.SendMessage ], /* * This method is called when the app is fully rendered and ready to be diff --git a/app/StateManager.js b/app/StateManager.js index 779d935fc..3b6b8cdfb 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -164,12 +164,8 @@ var StateManager = Em.StateManager.extend( }, policies: Em.State.create( { - statisticsInfo: Em.State.create( - {} - ), - getUrls: Em.State.create( - {} - ), + statisticsInfo: Em.State.create({}), + getUrls: Em.State.create({}), connectionSettings: Em.State.create( { enter: function() { @@ -193,12 +189,8 @@ var StateManager = Em.StateManager.extend( } } ), - appPermissions: Em.State.create( - {} - ), - systemError: Em.State.create( - {} - ), + appPermissions: Em.State.create({}), + systemError: Em.State.create({}), deviceStateChange: Em.State.create( { enter: function() { @@ -216,7 +208,30 @@ var StateManager = Em.StateManager.extend( ) } ), - HMISettings: Em.State.create({}) + HMISettings: Em.State.create({}), + + light: Em.State.create({ + singleLight: Em.State.create({ + enter: function() { + this._super(); + } + }), + exteriorLight: Em.State.create({ + enter: function() { + this._super(); + } + }), + interiorLight: Em.State.create({ + enter: function() { + this._super(); + } + }), + locationLight: Em.State.create({ + enter: function() { + this._super(); + } + }) + }) } ), /** Media state */ diff --git a/app/controller/SettingsController.js b/app/controller/SettingsController.js index c66f819b6..f9607cced 100644 --- a/app/controller/SettingsController.js +++ b/app/controller/SettingsController.js @@ -371,6 +371,21 @@ SDL.SettingsController = Em.Object.create( if(!SDL.States.settings.HMISettings.active){ SDL.States.goToStates('settings.HMISettings'); } + }, + turnOnLight: function(){ + if(!SDL.States.settings.light.active){ + SDL.States.goToStates('settings.light'); + } + }, + turnOnLightSubMenu: function(event){ + var length = SDL.LightModel.lightState.length; + for(var i = 0; i < length; ++i){ + if(event.text == SDL.LightModel.lightState[i].id){ + SDL.LightModel.set('lightSettings',SDL.deepCopy(SDL.LightModel.lightState[i])); + break; + } + } + SDL.SendMessage.toggleActivity(); } } ); diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index 91d0cca81..e9c08e147 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -241,7 +241,7 @@ SDL.RController = SDL.SDLController.extend( }, sendHMISettingsNotification: function(data){ if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); } }, nextElement: function(data, currentItem){ diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 3153802ad..7593bb629 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -314,7 +314,7 @@ SDL.ClimateControlModel = Em.Object.create({ temperatureUnit: 'FAHRENHEIT' } if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); } }, @@ -329,7 +329,7 @@ SDL.ClimateControlModel = Em.Object.create({ temperatureUnit: 'CELSIUS' } if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification('HMI_SETTINGS', null, null, data); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); } }, diff --git a/app/model/LightModel.js b/app/model/LightModel.js new file mode 100644 index 000000000..424439bc8 --- /dev/null +++ b/app/model/LightModel.js @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2013, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/** + * @name SDL.LightModel + * @desc Navigation model + * @category Model + * @filesource app/model/LightModel.js + * @version 1.0 + */ + +SDL.LightModel = Em.Object.create({ + singleLightNameStruct: [ + 'FRONT_LEFT_HIGH_BEAM', + 'FRONT_RIGHT_HIGH_BEAM', + 'FRONT_LEFT_LOW_BEAM', + 'FRONT_RIGHT_LOW_BEAM', + 'FRONT_LEFT_PARKING_LIGHT', + 'FRONT_RIGHT_PARKING_LIGHT', + 'FRONT_LEFT_FOG_LIGHT', + 'FRONT_RIGHT_FOG_LIGHT', + 'FRONT_LEFT_DAYTIME_RUNNING_LIGHT', + 'FRONT_RIGHT_DAYTIME_RUNNING_LIGHT', + 'FRONT_LEFT_TURN_LIGHT', + 'FRONT_RIGHT_TURN_LIGHT', + 'REAR_LEFT_FOG_LIGHT', + 'REAR_RIGHT_FOG_LIGHT', + 'REAR_LEFT_TAIL_LIGHT', + 'REAR_RIGHT_TAIL_LIGHT', + 'REAR_LEFT_BREAK_LIGHT', + 'REAR_RIGHT_BREAK_LIGHT', + 'REAR_LEFT_TURN_LIGHT', + 'REAR_RIGHT_TURN_LIGHT', + 'REAR_REGISTRATION_PLATE_LIGHT' + ], + exteriorLightNameStruct: [ + 'HIGH_BEAMS', + 'LOW_BEAMS', + 'FOG_LIGHTS', + 'RUNNING_LIGHTS', + 'PARKING_LIGHTS', + 'BRAKE_LIGHTS', + 'REAR_REVERSING_LIGHTS', + 'SIDE_MARKER_LIGHTS', + 'LEFT_TURN_LIGHTS', + 'RIGHT_TURN_LIGHTS', + 'HAZARD_LIGHTS', + ], + interiorLightNameStruct: [ + 'AMBIENT_LIGHTS', + 'OVERHEAD_LIGHTS', + 'READING_LIGHTS', + 'TRUNK_LIGHTS' + ], + + locationLightNameStruct: [ + 'EXTERIOR_FRONT_LIGHTS', + 'EXTERIOR_REAR_LIGHTS', + 'EXTERIOR_LEFT_LIGHTS', + 'EXTERIOR_RIGHT_LIGHTS' + ], + lightStatusStruct:[ + 'ON', + 'OFF' + ], + + lightSettings: { + id: 'FRONT_LEFT_HIGH_BEAM', + status: 'OFF', + density: 0.1, + sRGBColor:{ + red: 0, + green: 100, + blue: 255 + } + }, + + lightState:[], + init: function(){ + function initialization(struct, state){ + var length = struct.length; + for(var i = 0; i < length; ++i){ + var tempState = { + id: struct[i], + status: 'OFF', + density: 1, + sRGBColor:{ + red: 255, + green: 255, + blue: 255 + } + } + state.push(tempState); + } + } + initialization(this.singleLightNameStruct, this.lightState); + initialization(this.exteriorLightNameStruct, this.lightState); + initialization(this.interiorLightNameStruct, this.lightState); + initialization(this.locationLightNameStruct, this.lightState); + }, + + + + getLightCapabilities: function() { + function getCapabilities(struct, capabilities){ + var result = capabilities; + var length = struct.length; + for(var i = 0; i < length; i++){ + result.push({ + name: struct[i], + densityAvailable: true, + sRGBColorSpaceAvailable: true, + }); + } + return capabilities; + }; + + var result = { + moduleName: 'Light', + supportedLights: [] + }; + getCapabilities(this.singleLightNameStruct, result.supportedLights); + getCapabilities(this.exteriorLightNameStruct, result.supportedLights); + getCapabilities(this.interiorLightNameStruct, result.supportedLights); + getCapabilities(this.locationLightNameStruct, result.supportedLights); + + return result; + }, + + setLightControlData: function(data){ + var tempState = this.lightState; + var dataLength = data.lightState.length; + var lightStateLength = this.lightState.length; + + for(var i = 0; i < dataLength; ++i){ + for(var j = 0; j < lightStateLength; ++j){ + if(data.lightState[i].id == this.lightState[j].id){ + if(null != data.lightState[i].status){ + this.lightState[j].status = data.lightState[i].status; + } + if(null != data.lightState[i].density){ + this.lightState[j].density = data.lightState[i].density; + } + if(null != data.lightState[i].sRGBColor){ + this.lightState[j].sRGBColor = data.lightState[i].sRGBColor; + } + if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ + data.lightState[i] = SDL.deepCopy(this.lightState[j]); + SDL.LightModel.set('lightSettings',data.lightState[i]) + } + } + } + } + this.set('lightState',tempState); + + var result = this.getLightControlData(true); + return {'lightState' : data.lightState}; + }, + + getLightControlData: function(){ + var result = { + lightState: this.lightState + }; + return result; + } +}); \ No newline at end of file diff --git a/app/view/settings/LightView.js b/app/view/settings/LightView.js new file mode 100644 index 000000000..5a1cc53d2 --- /dev/null +++ b/app/view/settings/LightView.js @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/** + * @name SDL.LightView + * @desc Info Apps visual representation + * @category View + * @filesource app/view/settings/AppsView.js + * @version 1.0 + */ + +SDL.LightView = Em.ContainerView.create({ + elementId: 'light', + classNames: 'in_light_view', + classNameBindings: [ + 'SDL.States.settings.light.active:active_state:inactive_state' + ], + childViews: [ + 'SettingsList' + ], + initList: function(list, arr){ + var length = list.length; + for(var i = 0; i < length; i++){ + var temp = { + type: SDL.Button, + params: { + action: 'turnOnLightSubMenu', + target: 'SDL.SettingsController', + text: list[i], + onDown: false + } + } + arr.push(temp); + } + }, + SettingsList: SDL.List.extend({ + elementId: 'light_list', + classNames:'light_list', + itemsOnPage: 5, + /** Items */ + items: [ + { + type: SDL.Button, + params: { + goToState: 'light.singleLight', + text: 'Single light', + action: 'onState', + target: 'SDL.SettingsController', + templateName: 'arrow', + onDown: false + } + }, + { + type: SDL.Button, + params: { + goToState: 'light.exteriorLight', + text: 'Exterior light', + action: 'onState', + target: 'SDL.SettingsController', + templateName: 'arrow', + onDown: false + } + }, + { + type: SDL.Button, + params: { + goToState: 'light.interiorLight', + text: 'Interior light', + action: 'onState', + target: 'SDL.SettingsController', + templateName: 'arrow', + onDown: false + } + }, + { + type: SDL.Button, + params: { + goToState: 'light.locationLight', + text: 'Location light', + action: 'onState', + target: 'SDL.SettingsController', + templateName: 'arrow', + onDown: false + } + } + ] + }) +}); diff --git a/app/view/settings/light/exteriorLightView.js b/app/view/settings/light/exteriorLightView.js new file mode 100644 index 000000000..c0f3d1bf2 --- /dev/null +++ b/app/view/settings/light/exteriorLightView.js @@ -0,0 +1,34 @@ +SDL.ExteriorLightView = Em.ContainerView.create({ + elementId: 'light_exterior_light', + classNames: 'in_light_exterior_view', + classNameBindings: [ + 'SDL.States.settings.light.exteriorLight.active:active_state:inactive_state' + ], + childViews: [ + 'backButton', + 'appList', + 'label' + ], + label: SDL.Label.extend({ + elementId: 'label', + classNames: 'label', + content: 'Exterior light' + }), + backButton: SDL.Button.extend({ + classNames: [ + 'backButton' + ], + action: 'onState', + target: 'SDL.SettingsController', + goToState: 'light', + icon: 'images/media/ico_back.png', + onDown: false + }), + appList: SDL.List.extend({ + elementId: 'light_exterior_list', + itemsOnPage: 4, + /** Items */ + items: [] + }) +}) +SDL.LightView.initList(SDL.LightModel.exteriorLightNameStruct,SDL.ExteriorLightView.appList.items); \ No newline at end of file diff --git a/app/view/settings/light/interiorLightView.js b/app/view/settings/light/interiorLightView.js new file mode 100644 index 000000000..51f9f1bfc --- /dev/null +++ b/app/view/settings/light/interiorLightView.js @@ -0,0 +1,35 @@ +SDL.InteriorLightView = Em.ContainerView.create({ + elementId: 'light_interior_light', + classNames: 'in_light_interior_view', + classNameBindings: [ + 'SDL.States.settings.light.interiorLight.active:active_state:inactive_state' + ], + childViews: [ + 'backButton', + 'appList', + 'label' + + ], + label: SDL.Label.extend({ + elementId: 'label', + classNames: 'label', + content: 'Interior light' + }), + backButton: SDL.Button.extend({ + classNames: [ + 'backButton' + ], + action: 'onState', + target: 'SDL.SettingsController', + goToState: 'light', + icon: 'images/media/ico_back.png', + onDown: false + }), + appList: SDL.List.extend({ + elementId: 'light_interior_list', + itemsOnPage: 4, + /** Items */ + items: [] + }) +}) +SDL.LightView.initList(SDL.LightModel.interiorLightNameStruct,SDL.InteriorLightView.appList.items); \ No newline at end of file diff --git a/app/view/settings/light/locationLightView.js b/app/view/settings/light/locationLightView.js new file mode 100644 index 000000000..58361b0c9 --- /dev/null +++ b/app/view/settings/light/locationLightView.js @@ -0,0 +1,34 @@ +SDL.LocationLightView = Em.ContainerView.create({ + elementId: 'light_location_light', + classNames: 'in_light_location_view', + classNameBindings: [ + 'SDL.States.settings.light.locationLight.active:active_state:inactive_state' + ], + childViews: [ + 'backButton', + 'appList', + 'label' + ], + label: SDL.Label.extend({ + elementId: 'label', + classNames: 'label', + content: 'Location light' + }), + backButton: SDL.Button.extend({ + classNames: [ + 'backButton' + ], + action: 'onState', + target: 'SDL.SettingsController', + goToState: 'light', + icon: 'images/media/ico_back.png', + onDown: false + }), + appList: SDL.List.extend({ + elementId: 'light_location_list', + itemsOnPage: 4, + /** Items */ + items: [] + }) +}) +SDL.LightView.initList(SDL.LightModel.locationLightNameStruct,SDL.LocationLightView.appList.items); \ No newline at end of file diff --git a/app/view/settings/light/sendMessage.js b/app/view/settings/light/sendMessage.js new file mode 100644 index 000000000..c93359b65 --- /dev/null +++ b/app/view/settings/light/sendMessage.js @@ -0,0 +1,135 @@ +SDL.SendMessage = Em.ContainerView.create({ + elementId: 'sendMessageView', + classNames: 'sendMessageView', + classNameBindings: [ + 'active' + ], + childViews: [ + 'backButton', + 'lightStatusLabel', + 'lightStatusSelect', + 'lightDensityLabel', + 'lightColorLabel', + 'rLabel', + 'gLabel', + 'bLabel', + 'densityInput', + 'rInput', + 'gInput', + 'bInput', + 'setButton' + ], + active: false, + toggleActivity: function() { + this.toggleProperty('active'); + }, + setSetting: function(){ + SDL.LightModel.lightSettings.density = parseFloat(SDL.LightModel.lightSettings.density); + SDL.LightModel.lightSettings.sRGBColor.red = parseInt(SDL.LightModel.lightSettings.sRGBColor.red); + SDL.LightModel.lightSettings.sRGBColor.green = parseInt(SDL.LightModel.lightSettings.sRGBColor.green); + SDL.LightModel.lightSettings.sRGBColor.blue = parseInt(SDL.LightModel.lightSettings.sRGBColor.blue); + var length = SDL.LightModel.lightState.length; + for(var i = 0; i < length; ++i){ + if(SDL.LightModel.lightState[i].id == SDL.LightModel.lightSettings.id){ + SDL.LightModel.lightState[i] = SDL.deepCopy(SDL.LightModel.lightSettings); + break; + } + } + var data = SDL.deepCopy(SDL.LightModel.lightSettings); + if (Object.keys(data).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'LIGHT', lightControlData: {lightState: [data]}}); + } + SDL.SendMessage.toggleActivity(); + }, + + backButton: SDL.Button.extend({ + classNames: [ + 'backButton' + ], + action: function(){ + SDL.SendMessage.toggleActivity(); + }, + target: 'SDL.SettingsController', + goToState: 'light', + icon: 'images/settings/close_icon.png', + onDown: false + }), + lightStatusLabel: SDL.Label.extend({ + elementId: 'lightStatusLabel', + classNames: 'lightStatusLabel', + content: 'Light Status' + }), + lightStatusSelect: Em.Select.extend({ + elementId: 'lightStatusSelect', + classNames: 'lightStatusSelect', + contentBinding: 'SDL.LightModel.lightStatusStruct', + valueBinding: 'SDL.LightModel.lightSettings.status' + }), + lightDensityLabel: SDL.Label.extend({ + elementId: 'lightDensityLabel', + classNames: 'lightDensityLabel', + content: 'Light Density' + }), + lightColorLabel: SDL.Label.extend({ + elementId: 'lightColorLabel', + classNames: 'lightColorLabel', + content: 'Light Color:' + }), + rLabel: SDL.Label.extend({ + elementId: 'rLabel', + classNames: 'rLabel', + content: 'R' + }), + gLabel: SDL.Label.extend({ + elementId: 'gLabel', + classNames: 'gLabel', + content: 'G' + }), + bLabel: SDL.Label.extend({ + elementId: 'bLabel', + classNames: 'bLabel', + content: 'B' + }), + densityInput: Ember.TextField.extend( + { + elementId: 'densityInput', + classNames: 'densityInput', + valueBinding: 'SDL.LightModel.lightSettings.density', + } + ), + rInput: Ember.TextField.extend( + { + elementId: 'rInput', + classNames: 'rInput', + valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.red', + } + ), + gInput: Ember.TextField.extend( + { + elementId: 'gInput', + classNames: 'gInput', + valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.green', + } + ), + bInput: Ember.TextField.extend( + { + elementId: 'bInput', + classNames: 'bInput', + valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.blue', + } + ), + setButton: SDL.Button.extend({ + elementId: 'setButton', + classNames: 'setButton', + classNames: [ + 'setButton' + ], + action: function(){ + SDL.SendMessage.setSetting(); + }, + target: 'SDL.SettingsController', + goToState: 'light', + text: 'Set', + onDown: false, + }), +}); diff --git a/app/view/settings/light/singleLightView.js b/app/view/settings/light/singleLightView.js new file mode 100644 index 000000000..6724d40ef --- /dev/null +++ b/app/view/settings/light/singleLightView.js @@ -0,0 +1,34 @@ +SDL.SingleLightView = Em.ContainerView.create({ + elementId: 'light_single_light', + classNames: 'in_light_single_view', + classNameBindings: [ + 'SDL.States.settings.light.singleLight.active:active_state:inactive_state' + ], + childViews: [ + 'backButton', + 'appList', + 'label' + ], + label: SDL.Label.extend({ + elementId: 'label', + classNames: 'label', + content: 'Single light' + }), + backButton: SDL.Button.extend({ + classNames: [ + 'backButton' + ], + action: 'onState', + target: 'SDL.SettingsController', + goToState: 'light', + icon: 'images/media/ico_back.png', + onDown: false + }), + appList: SDL.List.extend({ + elementId: 'light_single_list', + itemsOnPage: 4, + /** Items */ + items: [] + }) +}) +SDL.LightView.initList(SDL.LightModel.singleLightNameStruct,SDL.SingleLightView.appList.items); \ No newline at end of file diff --git a/app/view/settingsView.js b/app/view/settingsView.js index f84c6b2dd..9056180a5 100644 --- a/app/view/settingsView.js +++ b/app/view/settingsView.js @@ -51,7 +51,12 @@ SDL.SettingsView = Em.ContainerView.create( SDL.SystemErrorView, SDL.ConnectionSettingsView, SDL.RSDLOptionsView, - SDL.HMISettingsView + SDL.HMISettingsView, + SDL.LightView, + SDL.SingleLightView, + SDL.LocationLightView, + SDL.InteriorLightView, + SDL.ExteriorLightView ], /** Left menu */ leftMenu: Em.ContainerView.extend( @@ -75,7 +80,8 @@ SDL.SettingsView = Em.ContainerView.create( classNames: 'ls-items', childViews: [ 'policies', - 'HMISettings' + 'HMISettings', + 'light' ], policies: SDL.Button.extend( { @@ -102,6 +108,18 @@ SDL.SettingsView = Em.ContainerView.create( icon: 'images/settings/ico_settings.png', action: 'turnOnHMISettings', target: 'SDL.SettingsController' + }), + light: SDL.Button.extend({ + elementId: 'light_leftMenu', + goToState: 'light', + classNames: 'menu-item lsp1_p', + classNameBindings: [ + 'SDL.States.settings.light.active:info_active', + ], + text: 'Light', + icon: 'images/settings/ico_settings.png', + action: 'turnOnLight', + target: 'SDL.SettingsController' }) } ) diff --git a/css/climate.css b/css/climate.css index dbf997177..58d72b0b6 100644 --- a/css/climate.css +++ b/css/climate.css @@ -3,12 +3,10 @@ height: 40px; left: 180px; top: 300px; - -webkit-transition: 0.2s; border-radius: 8px; background-color: #1D1D1D; border: 1px solid #383737; box-shadow: inset 5px 5px 10px #383737, inset -3px -3px 10px black; - -webkit-transition: 0.2s; font-size: 38px; line-height: 42px; text-align: center; diff --git a/css/sdl.css b/css/sdl.css index 179bac85b..eb268a95c 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -560,7 +560,7 @@ #exitAppView, #tbtClientStateView, #VehicleInfo, #systemRequestView, -#PrimaryDevice { +#PrimaryDevice, #sendMessageView { opacity: 0; left: 50px; width: 700px; @@ -595,6 +595,7 @@ #exitAppView.active, #systemRequestView.active, #tbtClientStateView.active, +#sendMessageView.active, #VehicleInfo.active, #PrimaryDevice.active { opacity: 1; @@ -1460,4 +1461,87 @@ #media_app_options_view .list-content { width: 578px; +} + +#sendMessageView .backButton { + width: 40px; + height: 45px; + top: 4px; + left: 655px; + background: 0; +} +#sendMessageView .setButton { + width: 255px; + height: 40px; + left: 202px; + top: 282px; + border-radius: 31px; + background-color: #1D1D1D; + border: 1px solid #383737; + box-shadow: inset 5px 5px 10px #383737, inset -3px -3px 10px black; + font-size: 38px; + line-height: 42px; + text-align: center; + position: relative; + float: left; + margin-left: 10px; + margin-top: 10px; +} +#sendMessageView .setButton .text{ + top: 20px; + left: 20px; +} + +#sendMessageView .lightStatusLabel { + top: 30px; + left: 30px; +} +#sendMessageView .lightDensityLabel { + top: 50px; + left: 30px; +} +#sendMessageView .lightColorLabel { + top: 70px; + left: 30px; +} +#sendMessageView .rLabel { + top: 90px; + left: 40px; +} +#sendMessageView .gLabel { + top: 110px; + left: 40px; +} +#sendMessageView .bLabel { + top: 130px; + left: 40px; +} +#sendMessageView .lightStatusSelect { + position: absolute; + top: 30px; + left: 160px; +} +#sendMessageView .densityInput { + position: absolute; + top: 50px; + left: 160px; + width: 47px; +} +#sendMessageView .rInput { + position: absolute; + top: 90px; + left: 160px; + width: 47px; +} +#sendMessageView .gInput { + position: absolute; + top: 110px; + left: 160px; + width: 47px; +} +#sendMessageView .bInput { + position: absolute; + top: 130px; + left: 160px; + width: 47px; } \ No newline at end of file diff --git a/css/settings.css b/css/settings.css index e0f00d551..c4820cd1f 100644 --- a/css/settings.css +++ b/css/settings.css @@ -1,4 +1,8 @@ -#settingsView .in_settings_separate_view { +#settingsView .in_settings_separate_view, +.in_light_exterior_view, +.in_light_single_view, +.in_light_location_view, +.in_light_interior_view { top: 48px; width: 800px; height: 382px; @@ -6,7 +10,11 @@ z-index: 5000; } -#settingsView .in_settings_separate_view .backButton { +#settingsView .in_settings_separate_view .backButton, +.in_light_exterior_view .backButton, +.in_light_single_view .backButton, +.in_light_location_view .backButton, +.in_light_interior_view .backButton { top: 35px; width: 48px; height: 48px; @@ -15,19 +23,31 @@ left: 25px; } -#settingsView .in_settings_separate_view .list { - height: 251px; +#settingsView .in_settings_separate_view .list, +.in_light_exterior_view .list, +.in_light_single_view .list, +.in_light_location_view .list, +.in_light_interior_view .list { + height: 201px; width: 700px; top: 106px; left: 50px; } -#settingsView .in_settings_separate_view .list-item { +#settingsView .in_settings_separate_view .list-item, +.in_light_exterior_view .list-item, +.in_light_single_view .list-item, +.in_light_location_view .list-item, +.in_light_interior_view .list-item { width: 639px; padding-left: 10px; } -#settingsView .in_settings_separate_view .label { +#settingsView .in_settings_separate_view .label, +.in_light_exterior_view .label, +.in_light_single_view .label, +.in_light_location_view .label, +.in_light_interior_view .label { top: 35px; left: 100px; width: 620px; @@ -152,7 +172,8 @@ background: #393939; } -#settingsView .in_HMIsettings_view { +#settingsView .in_HMIsettings_view, +#settingsView .in_light_view { position: absolute; top: 48px; left: 153px; @@ -163,12 +184,14 @@ margin-top: 70px; } -#settingsView .HMI_settings_list { +#settingsView .HMI_settings_list, +#settingsView .light_list { height: 251px; width: 598px; left: 10px;; } -#HMI_settings_list .list-content .ffw-button { +#HMI_settings_list .list-content .ffw-button, +#light_list .list-content .ffw-button { width: 537px; padding-left: 10px; } \ No newline at end of file diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 7546c1b1e..79da0c40c 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -159,6 +159,9 @@ FFW.RC = FFW.RPCObserver.create( SDL.MediaController.getAudioControlCapabilities(); var hmiSettingsControlCapabilities = SDL.HmiSettingsModel.getHmiSettingsCapabilities(); + var lightControlCapabilities = + SDL.LightModel.getLightCapabilities(); + var buttonCapabilities = []; buttonCapabilities = buttonCapabilities.concat( @@ -174,6 +177,8 @@ FFW.RC = FFW.RPCObserver.create( radioControlCapabilities; remoteControlCapability.hmiSettingsControlCapabilities = hmiSettingsControlCapabilities; + remoteControlCapability.lightControlCapabilities = + lightControlCapabilities; remoteControlCapability.buttonCapabilities = buttonCapabilities; remoteControlCapability.audioControlCapabilities = @@ -231,7 +236,8 @@ FFW.RC = FFW.RPCObserver.create( var newRadioControlData = null; var newAudioControlData= null; var newHMISettingsControlData = null; - + var newLightControlData = null; + if (request.params.moduleData.climateControlData) { newClimateControlData = SDL.ClimateController.model.setClimateData( @@ -253,6 +259,10 @@ FFW.RC = FFW.RPCObserver.create( newHMISettingsControlData = SDL.HmiSettingsModel.setHmiSettingsData( request.params.moduleData.hmiSettingsControlData); } + if(request.params.moduleData.lightControlData){ + newLightControlData = SDL.LightModel.setLightControlData( + request.params.moduleData.lightControlData); + } // send repsonse var JSONMessage = { 'jsonrpc': '2.0', @@ -279,7 +289,11 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.hmiSettingsControlData = newHMISettingsControlData; } - + if(newLightControlData){ + JSONMessage.result.moduleData.lightControlData = + newLightControlData; + } + this.client.send(JSONMessage); break; } @@ -308,6 +322,7 @@ FFW.RC = FFW.RPCObserver.create( var radioControlData = null; var audioControlData=null; var hmiSettingsControlData = null; + var lightControlData = null; var app = SDL.SDLController.getApplicationModel( request.params.appID @@ -329,6 +344,10 @@ FFW.RC = FFW.RPCObserver.create( audioControlData = SDL.MediaController.getAudioControlData(false); break; } + case 'LIGHT':{ + lightControlData = SDL.LightModel.getLightControlData(false); + break + } } var JSONMessage = { @@ -359,6 +378,10 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.hmiSettingsControlData = hmiSettingsControlData; } + if(lightControlData){ + JSONMessage.result.moduleData.lightControlData = + lightControlData; + } if (request.params.subscribe !== undefined) { JSONMessage.result.isSubscribed = request.params.subscribe; diff --git a/images/settings/close_icon.png b/images/settings/close_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..19acdd2b4d690a36061626ed22c2e8b5baefb3d3 GIT binary patch literal 824 zcmV-81IPS{P)U0~yFfV&-`~14>Gnq0E$l zQhud8vb3&!Zu{N0&)IA3bFVu*owN7nth2vseb>4{L;|oKxBwgkJ_6T)YaxX1{D+^2 ztO8C0XMoMXQ{W=-GKk0yU;)^eu>1jD00$-wDI%+ZIbb)iGGX`u98$o$z)VY^^ugnk zf)tUpzzyI;%l`8U_!U^+@g-jYd&UhZB5QyLz;wsnKNavDu%+WBi3^)*RuI*I5z;E05};OytRQ*;R#cqae!~h;dW)ip+ZJ#NXP6X5E5yVA zox*82mQ{#J1FG4ySf+-f+NzaI!Lk>1R*2^LYOCe~bXJJmS9Du7GoZsVm5!Ios+jT!yI6_)AuIINl}4>|=gs1Sex_Ofb4KNxdesi{uaSyCa!+2gbsR!dXeX_=fA zr&TyP%WrL}ilBMN3gI3lTyn5D;g zZy8{^dI$%krN>!R!22DuI(H9Y1vK_J3ktXkcmik+?A=3n0F#oM8xAZ2M-)&;usSE! zzajPkIv>$=FgrTP@osLtKi2MZz$su;90Ohk9{&ZeO`_;8KN64t0000 + @@ -196,6 +197,12 @@ + + + + + + + @@ -197,6 +198,7 @@ + From b200ecf0d33ab98ba075d4922d805d1e143830f9 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Thu, 22 Mar 2018 10:35:12 +0200 Subject: [PATCH 042/102] Fixed sending mandatory parameters in LIGHT module. --- app/model/SeatModel.js | 11 ++++++----- app/view/settings/light/sendMessage.js | 13 ++++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 40ebb5224..0e993634b 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -85,7 +85,7 @@ SDL.SeatModel = Em.Object.create({ label: 'Label value', action: 'SAVE' }, - seatControlData: { + seatControlData: Em.Object.create({ id: null, heatingEnabled: false, coolingEnabled: false, @@ -102,8 +102,8 @@ SDL.SeatModel = Em.Object.create({ massageMode: [], massageCushionFirmness: [], memory: null - }, - tempSeatControlData: { + }), + tempSeatControlData: Em.Object.create({ id: null, heatingEnabled: false, coolingEnabled: false, @@ -120,7 +120,7 @@ SDL.SeatModel = Em.Object.create({ massageMode: [], massageCushionFirmness: [], memory: null - }, + }), update: function(){ this.set('heatingEnableData', this.tempSeatControlData.heatingEnabled ? 'ON': 'OFF'); this.set('coolingEnabledData', this.tempSeatControlData.coolingEnabled ? 'ON': 'OFF'); @@ -174,6 +174,7 @@ SDL.SeatModel = Em.Object.create({ this.seatControlData.massageCushionFirmness.push(this.massageCushionFirmness); this.seatControlData.memory = this.seatMemoryAction; + this.tempSeatControlData = SDL.deepCopy(this.seatControlData); }, @@ -232,7 +233,7 @@ SDL.SeatModel = Em.Object.create({ } FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', seatControlData: temp}); - SDL.SeatModel.set('seatControlData',SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); + SDL.SeatModel.set('seatControlData',Em.Object.create(SDL.deepCopy(SDL.SeatModel.tempSeatControlData))); }, isEmptyObject: function(object){ var l = 0; diff --git a/app/view/settings/light/sendMessage.js b/app/view/settings/light/sendMessage.js index c93359b65..75268e89f 100644 --- a/app/view/settings/light/sendMessage.js +++ b/app/view/settings/light/sendMessage.js @@ -29,13 +29,24 @@ SDL.SendMessage = Em.ContainerView.create({ SDL.LightModel.lightSettings.sRGBColor.green = parseInt(SDL.LightModel.lightSettings.sRGBColor.green); SDL.LightModel.lightSettings.sRGBColor.blue = parseInt(SDL.LightModel.lightSettings.sRGBColor.blue); var length = SDL.LightModel.lightState.length; + + var data = SDL.deepCopy(SDL.LightModel.lightSettings); + var oldData; for(var i = 0; i < length; ++i){ if(SDL.LightModel.lightState[i].id == SDL.LightModel.lightSettings.id){ + oldData = SDL.deepCopy(SDL.LightModel.lightState[i]); SDL.LightModel.lightState[i] = SDL.deepCopy(SDL.LightModel.lightSettings); break; } } - var data = SDL.deepCopy(SDL.LightModel.lightSettings); + if(data.sRGBColor.red == oldData.sRGBColor.red && + data.sRGBColor.green == oldData.sRGBColor.green && + data.sRGBColor.blue == oldData.sRGBColor.blue){ + delete data['sRGBColor']; + } + if(data.density == oldData.density){ + delete data['density']; + } if (Object.keys(data).length > 0) { FFW.RC.onInteriorVehicleDataNotification({moduleType:'LIGHT', lightControlData: {lightState: [data]}}); } From 3bc456f6804b6b87e028ca1d80a22ed5e2ccf4ac Mon Sep 17 00:00:00 2001 From: ypostolov Date: Sat, 10 Mar 2018 14:16:13 +0200 Subject: [PATCH 043/102] Implementation of new remote control "onRcStatus" notification Updateed widgetPhoneView Added new label for displaing current remote control application status label displays which RC module is allocated and which module can be allocated --- app/controller/sdl/RPCController.js | 6 +++ app/controlls/Label.js | 9 ++++- app/model/SeatModel.js | 4 +- app/model/sdl/RModel.js | 12 +++++- app/view/home/widgetPhoneView.js | 57 +++++++++++++++++++++++++++- css/home.css | 21 +++++++++- ffw/RCRPC.js | 29 ++++++++++++++ images/home/home_phoneWidget.png | Bin 8480 -> 9505 bytes 8 files changed, 130 insertions(+), 8 deletions(-) diff --git a/app/controller/sdl/RPCController.js b/app/controller/sdl/RPCController.js index 105216adf..f28cba41b 100644 --- a/app/controller/sdl/RPCController.js +++ b/app/controller/sdl/RPCController.js @@ -2092,6 +2092,12 @@ SDL.RPCController = Em.Object.create( }; return this.resultStruct; }, + OnRCStatus: function(params) { + this.resultStruct = { + 'resultCode': SDL.SDLModel.data.resultCode.SUCCESS + }; + return this.resultStruct; + }, GetInteriorVehicleData: function(params) { this.resultStruct = { 'resultCode': SDL.SDLModel.data.resultCode.SUCCESS diff --git a/app/controlls/Label.js b/app/controlls/Label.js index 183c1f287..a9fafc650 100644 --- a/app/controlls/Label.js +++ b/app/controlls/Label.js @@ -44,8 +44,13 @@ SDL.Label = Em.View.extend({ icon: Em.Handlebars.compile( '' + '{{view.content}}' - ) - } + ), + multiLine: Em.Handlebars.compile( + '{{#each view.lines}}' + + '{{this}}
' + + '{{/each}}' + ) + } /** Define button template */ /* diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 0e993634b..9a7ced070 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -247,14 +247,14 @@ SDL.SeatModel = Em.Object.create({ dfs:function(from, to){ - var result = from; + var result = SDL.deepCopy(from); for (var key in from) { if(from.hasOwnProperty(key)){ if(typeof from[key] == 'object'){ if(Array.isArray(from[key])){ var lengthFrom = from[key].length; var lengthTo = to[key].length; - if( lengthFrom != lengthTo ){ + if((lengthFrom != lengthTo)){ result[key] = from[key]; continue; } diff --git a/app/model/sdl/RModel.js b/app/model/sdl/RModel.js index effe6e24e..40e1cce71 100644 --- a/app/model/sdl/RModel.js +++ b/app/model/sdl/RModel.js @@ -90,6 +90,12 @@ SDL.RModel = SDL.SDLModel.extend({ */ reverseAccessMode: 'AUTO_ALLOW', + + appRCStatus: + { + + }, + /** * Method to add activation button to VR commands and set device * parameters to model @@ -186,7 +192,11 @@ SDL.RModel = SDL.SDLModel.extend({ if (SDL.SDLController.getApplicationModel(params.appID)) { this._super(params); + var map = SDL.deepCopy(this.appRCStatus); + delete map[params.appID]; + this.set('appRCStatus', map); } } -} + + } ); diff --git a/app/view/home/widgetPhoneView.js b/app/view/home/widgetPhoneView.js index c0a098101..2021ccf6b 100755 --- a/app/view/home/widgetPhoneView.js +++ b/app/view/home/widgetPhoneView.js @@ -39,6 +39,61 @@ SDL.WidgetPhoneView = Em.ContainerView.extend({ classNameBindings: [ 'SDL.FuncSwitcher.rev::is-disabled' - ] + ], + childViews: [ + 'rcStatusLabel', + 'phoneStatusImage' + ], + + phoneStatusImage: SDL.Button.extend({ + elementId:'phoneStatusImage', + templateName:'icon', + icon:'./images/home/home_phoneWidget.png' + }), + + rcStatusLabel: SDL.Label.extend( + + { + getLabelText: function(){ + + if (SDL.SDLModel.appRCStatus.length == 0){ + return []; + } + else { + var rcStatus = []; + for (var key in SDL.SDLModel.appRCStatus){ + var model = SDL.SDLController.getApplicationModel(+key); + var strHeader = model.appName+': '; + rcStatus.push(strHeader); + if (SDL.SDLModel.appRCStatus[+key].allocated.length > 0){ + var allocated = SDL.SDLModel.appRCStatus[+key].allocated; + var allocatedStr = 'Allocates:'; + for (var i = 0; i < allocated.length; ++i) { + allocatedStr += (i>0)? ', ': ' '; + allocatedStr += allocated[i].moduleType.toLowerCase() ; + } + rcStatus.push(allocatedStr); + } + + if (SDL.SDLModel.appRCStatus[+key].free.length > 0){ + var free = SDL.SDLModel.appRCStatus[+key].free; + var freeStr = 'Can allocate:'; + for (var i = 0; i < free.length; ++i) { + freeStr += (i>0)? ', ': ' '; + freeStr += free[i].moduleType.toLowerCase() ; + } + rcStatus.push(freeStr); + } + } + return rcStatus; + } + }.property('SDL.SDLModel.appRCStatus'), + elementId: 'rcStatusLabel', + linesBinding:'getLabelText', + templateName: 'multiLine' + //'SDL.SDLModel.appRCStatus' + } + + ) } ); diff --git a/css/home.css b/css/home.css index 7235290dc..53822b434 100644 --- a/css/home.css +++ b/css/home.css @@ -2,7 +2,7 @@ position: absolute; width: 399px; height: 183px; - background: url("../images/home/home_phoneWidget.png") 0 0 no-repeat; + } #home_widgetNavigation { @@ -154,10 +154,27 @@ #home_widgetMedia_tuneButtons { height: 40px; width: 120px; - top: 28px; + top: 40px; left: 248px; } +#phoneStatusImage{ + width: 399px; + height: 175px; + top : -20px; +} + + +#rcStatusLabel{ + top: 75px; + left: 20px; + z-index: 10; + font-size: 15px; + height: 105px; + overflow: hidden; + +} + #home_widgetMedia_tuneButtons .ffw-button { width: 50px; height: 38px; diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 0de0fecb1..d3e90bb73 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -45,6 +45,10 @@ FFW.RC = FFW.RPCObserver.create( * were some kind of errors Error codes will be injected into response. */ errorResponsePull: {}, + /** + * contains method name for RCStatus_Notification + */ + onRCStatusNotification: 'RC.OnRCStatus', /** * access to basic RPC functionality */ @@ -84,6 +88,7 @@ FFW.RC = FFW.RPCObserver.create( 500 ); this._super(); + this.client.subscribeToNotification(this.onRCStatusNotification); }, /** * Client is unregistered - no more requests @@ -91,6 +96,7 @@ FFW.RC = FFW.RPCObserver.create( onRPCUnregistered: function() { Em.Logger.log('FFW.RC.onRPCUnregistered'); this._super(); + this.client.unsubscribeFromNotification(this.onRCStatusNotification); }, /** * Client disconnected. @@ -120,6 +126,28 @@ FFW.RC = FFW.RPCObserver.create( onRPCNotification: function(notification) { Em.Logger.log('FFW.RC.onRPCNotification'); this._super(); + switch (notification.method) { + case 'RC.OnRCStatus': + { + Em.Logger.log(notification.method); + var appID = notification.params.appID; + var allocatedModules = notification.params.allocatedModules; + var freeModules = notification.params.freeModules; + var item = { + allocated : allocatedModules, + free : freeModules + }; + var map = SDL.deepCopy(SDL.SDLModel.appRCStatus); + map[appID] = item; + SDL.SDLModel.set('appRCStatus', map); + break; + } + default: + { + // statements_def + break; + } + } }, /** * handle RPC requests here @@ -418,6 +446,7 @@ FFW.RC = FFW.RPCObserver.create( SDL.SDLController.interiorDataConsent(request); break; } + default: { // statements_def diff --git a/images/home/home_phoneWidget.png b/images/home/home_phoneWidget.png index 9a63c97b9e819300158dccdb8a95cdd9f1bbe5cf..91af52252d8bba23d409f110cf3545b76912f2d5 100755 GIT binary patch literal 9505 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 n6jdIfzBT^um)1A;6qabXeNUP!N8fS(!B Date: Thu, 22 Mar 2018 13:26:09 +0200 Subject: [PATCH 044/102] Fixed sending message in SEAT. --- app/model/SeatModel.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 9a7ced070..7f3796c8a 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -135,6 +135,12 @@ SDL.SeatModel = Em.Object.create({ this.set('massageMode0',this.tempSeatControlData.massageMode[0] != null); this.set('massageMode1',this.tempSeatControlData.massageMode[1] != null); + var length = this.tempSeatControlData.massageCushionFirmness.length; + for(var i = 0; i < length; ++i){ + this.tempSeatControlData.massageCushionFirmness[i].firmness = + parseInt(this.tempSeatControlData.massageCushionFirmness[i].firmness); + } + this.tempSeatControlData.heatingLevel = parseInt(this.tempSeatControlData.heatingLevel); this.tempSeatControlData.coolingLevel = parseInt(this.tempSeatControlData.coolingLevel); this.tempSeatControlData.horizontalPosition = parseInt(this.tempSeatControlData.horizontalPosition); @@ -258,6 +264,11 @@ SDL.SeatModel = Em.Object.create({ result[key] = from[key]; continue; } + var temp = this.dfs(from[key],to[key]); + if(!this.isEmptyObject(temp)){ + result[key] = from[key]; + continue; + } } var temp = this.dfs(from[key], to[key]); if (!this.isEmptyObject(temp)) { From b431e1d9e817c4b15b44e8b03351d43acee169c7 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Thu, 22 Mar 2018 15:22:53 +0200 Subject: [PATCH 045/102] Style Fix --- app/controller/sdl/RController.js | 66 +++++--- app/model/ClimateControlModel.js | 34 ++++ app/model/HmiSettingsModel.js | 146 +++++++++------- app/model/LightModel.js | 28 ++- app/model/SeatModel.js | 164 ++++++++++++------ app/view/settings/HMISettingsView.js | 12 +- app/view/settings/LightView.js | 8 +- app/view/settings/SeatView.js | 244 +++++++++++++++++++++++---- css/buttonControls.css | 1 - css/climate.css | 1 + css/media.css | 23 +++ css/sdl.css | 13 +- css/settings.css | 2 + 13 files changed, 569 insertions(+), 173 deletions(-) diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index e9c08e147..60e4c45ea 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -57,7 +57,8 @@ SDL.RController = SDL.SDLController.extend( } } }, - onButtonPressEvent: function(params) { + + onButtonPressEvent: function(params) { var result_struct = { resultCode: SDL.SDLModel.data.resultCode.SUCCESS, resultInfo: "" @@ -180,13 +181,15 @@ SDL.RController = SDL.SDLController.extend( return result_struct; }, - /** + + /** * Go to RSDL options menu on click menu header */ onRSDLOptionsClick: function() { SDL.States.goToStates('settings.policies.rsdlOptionsList'); }, - /** + + /** * Toggle RSDL functionality flag option */ toggleRSDLFunctionality: function() { @@ -199,7 +202,8 @@ SDL.RController = SDL.SDLController.extend( SDL.SDLModel.reverseAccessMode ); }, - /** + + /** * Toggle RSDL access mode option */ toggleRCAccessMode: function() { @@ -210,7 +214,8 @@ SDL.RController = SDL.SDLController.extend( SDL.SDLModel.reverseAccessMode ); }, - toggleDisplayMode: function() { + + toggleDisplayMode: function() { var next = this.nextElement(SDL.HmiSettingsModel.displayModeStruct, SDL.HmiSettingsModel.displayMode); SDL.HmiSettingsModel.set('displayMode',next); var data = { @@ -218,7 +223,8 @@ SDL.RController = SDL.SDLController.extend( } this.sendHMISettingsNotification(data); }, - toggleDistanceUnit: function() { + + toggleDistanceUnit: function() { var next = this.nextElement(SDL.HmiSettingsModel.distanceUnitStruct, SDL.HmiSettingsModel.distanceUnit); SDL.HmiSettingsModel.set('distanceUnit',next); var data = { @@ -226,7 +232,8 @@ SDL.RController = SDL.SDLController.extend( } this.sendHMISettingsNotification(data); }, - toggleTemperatureUnit: function() { + + toggleTemperatureUnit: function() { var next = this.nextElement(SDL.HmiSettingsModel.temperatureUnitStruct, SDL.HmiSettingsModel.temperatureUnit); SDL.HmiSettingsModel.set('temperatureUnit',next); SDL.ClimateControlModel.set('climateControlData.temperatureUnit', next); @@ -239,12 +246,14 @@ SDL.RController = SDL.SDLController.extend( SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); } }, - sendHMISettingsNotification: function(data){ + + sendHMISettingsNotification: function(data){ if (Object.keys(data).length > 0) { FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); } }, - nextElement: function(data, currentItem){ + + nextElement: function(data, currentItem){ var arr_length = data.length; for (var i = 0; i < arr_length; i++) { if (data[i] == currentItem) { @@ -256,7 +265,8 @@ SDL.RController = SDL.SDLController.extend( } } }, - /** + + /** * Change responses to error for GetInteriorVehicleDataCapabilities * @param element * @constructor @@ -264,7 +274,8 @@ SDL.RController = SDL.SDLController.extend( setRCCapabilitiesErrorResponse: function(element) { SDL.SDLModel.toggleProperty('errorResponse'); }, - /** + + /** * Register application method * @param {Object} params * @param {Object} applicationType @@ -324,7 +335,8 @@ SDL.RController = SDL.SDLController.extend( 'menuName': 'Exit \'DRIVER_DISTRACTION_VIOLATION\'', 'position': 0 }, - cmdID: -1 + + cmdID: -1 } }; SDL.SDLController.getApplicationModel(params.appID).addCommand( @@ -338,7 +350,8 @@ SDL.RController = SDL.SDLController.extend( 'menuName': 'Exit \'USER_EXIT\'', 'position': 0 }, - cmdID: -2 + + cmdID: -2 } }; SDL.SDLController.getApplicationModel(params.appID).addCommand( @@ -352,17 +365,20 @@ SDL.RController = SDL.SDLController.extend( 'menuName': 'Exit \'UNAUTHORIZED_TRANSPORT_REGISTRATION\'', 'position': 0 }, - cmdID: -3 + + cmdID: -3 } }; SDL.SDLController.getApplicationModel(params.appID).addCommand( exitCommand ); }, - toggleDriverDeviceWindow: function(element) { + + toggleDriverDeviceWindow: function(element) { SDL.PrimaryDevice.toggleProperty('active'); }, - driverDeviceWindowClose: function(device, rank) { + + driverDeviceWindowClose: function(device, rank) { this.toggleDriverDeviceWindow(); if (!device) { return; @@ -386,7 +402,8 @@ SDL.RController = SDL.SDLController.extend( FFW.RC.OnDeviceRankChanged(device, SDL.SDLModel.deviceRank[rank]); } }, - /** + + /** * Handeler for OnKeyboardInputcommand button press * * @param element @@ -440,7 +457,8 @@ SDL.RController = SDL.SDLController.extend( SDL.OptionsView.deactivate(); } }, - /** + + /** * PopUp appears on screen when SDL need response from user * to allow or disallow app get access to manage radio or climate module * @param request @@ -477,7 +495,8 @@ SDL.RController = SDL.SDLController.extend( }, 9500 ); //Magic number is timeout for RC consent popUp }, - /** + + /** * */ onDeactivatePassengerApp: function(button) { @@ -490,7 +509,8 @@ SDL.RController = SDL.SDLController.extend( } ); }, - /** + + /** * Returns indicator image path depending on state * @param state */ @@ -501,7 +521,8 @@ SDL.RController = SDL.SDLController.extend( return 'images/media/passiv_horiz_led.png'; } }, - /** + + /** * Filter objects properties according to filter param * @param data contains input object to filter * @param properties contains properties to keep @@ -527,7 +548,8 @@ SDL.RController = SDL.SDLController.extend( } return result; }, - /** + + /** * Get diff between lhs and rhs object properties recursively * @param lhs contains reference to first object of comparison * @param rhs contains reference to second object of comparison diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 7593bb629..8f99eb0e3 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -1,3 +1,37 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @name SDL.ClimateControlModel + * @desc Navigation model + * @category Model + * @filesource app/model/ClimateControlModel.js + * @version 1.0 + */ + SDL.ClimateControlModel = Em.Object.create({ init: function() {}, diff --git a/app/model/HmiSettingsModel.js b/app/model/HmiSettingsModel.js index c5e67b4fe..b1937ef2f 100644 --- a/app/model/HmiSettingsModel.js +++ b/app/model/HmiSettingsModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · @@ -23,6 +23,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + /** * @name SDL.HmiSettingsModel * @desc Navigation model @@ -33,69 +34,88 @@ SDL.HmiSettingsModel = Em.Object.create({ - displayModeStruct: [ - 'DAY', - 'NIGHT', - 'AUTO' - ], - displayMode: 'DAY', - - distanceUnitStruct:[ - 'MILES', - 'KILOMETERS' - ], - distanceUnit: 'MILES', - - temperatureUnitStruct: [ - 'FAHRENHEIT', - 'CELSIUS' - ], - temperatureUnit: SDL.ClimateControlModel.climateControlData.temperatureUnit, - - getHmiSettingsCapabilities: function() { - var capabilities = { - moduleName: 'HMISettingsControlCapabilities', - distanceUnitAvailable: true, - temperatureUnitAvailable: true, - displayModeUnitAvailable: true - }; - - return capabilities; - }, - - setHmiSettingsData: function(data){ - if(null != data.displayMode){ - this.set('displayMode',data.displayMode); - } - if(null != data.temperatureUnit){ - this.set('temperatureUnit',data.temperatureUnit); - if('CELSIUS' == data.temperatureUnit){ - SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); - }else{ - SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); - } - } - if(null != data.distanceUnit){ - this.set('distanceUnit',data.distanceUnit); - } +/** + * Display mode of the HMI display +**/ + displayModeStruct: [ + 'DAY', + 'NIGHT', + 'AUTO' + ], - properties = []; - for (var key in data) { - properties.push(key); - } +/** +* Current display mode of the HMI display +**/ + displayMode: 'DAY', + +/** + * Distance Unit used in the HMI (for maps/tracking distances) +**/ + distanceUnitStruct:[ + 'MILES', + 'KILOMETERS' + ], - var result = this.getHmiSettingsControlData(true); - return SDL.SDLController.filterObjectProperty(result, properties); - }, - - getHmiSettingsControlData: function(){ - var result = { - temperatureUnit: this.temperatureUnit, - displayMode: this.displayMode, - distanceUnit: this.distanceUnit - }; - - return result; +/** +* Current distance Unit used in the HMI (for maps/tracking distances) +**/ + distanceUnit: 'MILES', + +/* +*Temperature Unit used in the HMI (for temperature measuring systems) +*/ + temperatureUnitStruct: [ + 'FAHRENHEIT', + 'CELSIUS' + ], +/* + * Current temperature Unit used in the HMI (for temperature measuring systems) + */ + temperatureUnit: SDL.ClimateControlModel.climateControlData.temperatureUnit, + + getHmiSettingsCapabilities: function() { + var capabilities = { + moduleName: 'HMISettingsControlCapabilities', + distanceUnitAvailable: true, + temperatureUnitAvailable: true, + displayModeUnitAvailable: true + }; + + return capabilities; + }, + + setHmiSettingsData: function(data){ + if(null != data.displayMode){ + this.set('displayMode',data.displayMode); } -}) + if(null != data.temperatureUnit){ + this.set('temperatureUnit',data.temperatureUnit); + if('CELSIUS' == data.temperatureUnit){ + SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); + }else{ + SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); + } + } + if(null != data.distanceUnit){ + this.set('distanceUnit',data.distanceUnit); + } + properties = []; + for (var key in data) { + properties.push(key); + } + + var result = this.getHmiSettingsControlData(true); + return SDL.SDLController.filterObjectProperty(result, properties); + }, + + getHmiSettingsControlData: function(){ + var result = { + temperatureUnit: this.temperatureUnit, + displayMode: this.displayMode, + distanceUnit: this.distanceUnit + }; + + return result; + } +}) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 424439bc8..8bbe72ff9 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · @@ -32,6 +32,10 @@ */ SDL.LightModel = Em.Object.create({ + + /* + * Common Single Light + */ singleLightNameStruct: [ 'FRONT_LEFT_HIGH_BEAM', 'FRONT_RIGHT_HIGH_BEAM', @@ -55,6 +59,10 @@ SDL.LightModel = Em.Object.create({ 'REAR_RIGHT_TURN_LIGHT', 'REAR_REGISTRATION_PLATE_LIGHT' ], + + /* + * Exterior Lights by common function groups + */ exteriorLightNameStruct: [ 'HIGH_BEAMS', 'LOW_BEAMS', @@ -68,6 +76,10 @@ SDL.LightModel = Em.Object.create({ 'RIGHT_TURN_LIGHTS', 'HAZARD_LIGHTS', ], + + /* + * Interior Lights by common function groups + */ interiorLightNameStruct: [ 'AMBIENT_LIGHTS', 'OVERHEAD_LIGHTS', @@ -75,12 +87,19 @@ SDL.LightModel = Em.Object.create({ 'TRUNK_LIGHTS' ], + /* + * Lights by location + */ locationLightNameStruct: [ 'EXTERIOR_FRONT_LIGHTS', 'EXTERIOR_REAR_LIGHTS', 'EXTERIOR_LEFT_LIGHTS', 'EXTERIOR_RIGHT_LIGHTS' ], + + /* + * turn on/off a single light or all lights in a group + */ lightStatusStruct:[ 'ON', 'OFF' @@ -121,8 +140,6 @@ SDL.LightModel = Em.Object.create({ initialization(this.locationLightNameStruct, this.lightState); }, - - getLightCapabilities: function() { function getCapabilities(struct, capabilities){ var result = capabilities; @@ -164,7 +181,8 @@ SDL.LightModel = Em.Object.create({ this.lightState[j].density = data.lightState[i].density; } if(null != data.lightState[i].sRGBColor){ - this.lightState[j].sRGBColor = data.lightState[i].sRGBColor; + this.lightState[j].sRGBColor = + data.lightState[i].sRGBColor; } if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ data.lightState[i] = SDL.deepCopy(this.lightState[j]); @@ -185,4 +203,4 @@ SDL.LightModel = Em.Object.create({ }; return result; } -}); \ No newline at end of file +}); diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 7f3796c8a..6435b3e7c 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · @@ -33,12 +33,19 @@ */ SDL.SeatModel = Em.Object.create({ + + /* + * turn on/off + */ enableStruct:[ 'ON', 'OFF' ], + heatingEnableData: 'OFF', + coolingEnabledData: 'OFF', + massageEnabledData: 'OFF', mandatoryField:[ @@ -46,16 +53,27 @@ SDL.SeatModel = Em.Object.create({ 'memory.id', 'memory.action' ], - + + /* + * List possible zones of a multi-contour massage seat + */ massageZoneStruct:[ 'LUMBAR', 'SEAT_CUSHION' ], + + /* + * List possible modes of a massage zone + */ massageModeStruct:[ 'OFF', 'LOW', 'HIGH' ], + + /* + * Specify the mode of a massage zone + */ massageCushionStruct:[ 'TOP_LUMBAR', 'MIDDLE_LUMBAR', @@ -63,28 +81,44 @@ SDL.SeatModel = Em.Object.create({ 'BACK_BOLSTERS', 'SEAT_BOLSTERS' ], + + /* + * List possible cushions of a multi-contour massage seat + */ supportedSeatStruct:[ 'DRIVER', 'FRONT_PASSENGER' ], + seatMemoryActionTypeStruct:[ 'SAVE', 'RESTORE', 'NONE' ], + + /* + * Specify the mode of a massage + */ massageModeData:{ massageZone: 'LUMBAR', massageMode: 'OFF' }, + + /* + * The intensity or firmness of a cushion + */ massageCushionFirmness:{ cushion: 'TOP_LUMBAR', firmness: 0 }, + + seatMemoryAction: { id: 1, label: 'Label value', action: 'SAVE' }, + seatControlData: Em.Object.create({ id: null, heatingEnabled: false, @@ -103,6 +137,7 @@ SDL.SeatModel = Em.Object.create({ massageCushionFirmness: [], memory: null }), + tempSeatControlData: Em.Object.create({ id: null, heatingEnabled: false, @@ -121,19 +156,39 @@ SDL.SeatModel = Em.Object.create({ massageCushionFirmness: [], memory: null }), + + massageCushionFirmness0: true, + massageCushionFirmness1: false, + massageCushionFirmness2: false, + massageCushionFirmness3: false, + massageCushionFirmness4: false, + + massageMode0: true, + massageMode1: false, + update: function(){ - this.set('heatingEnableData', this.tempSeatControlData.heatingEnabled ? 'ON': 'OFF'); - this.set('coolingEnabledData', this.tempSeatControlData.coolingEnabled ? 'ON': 'OFF'); - this.set('massageEnabledData', this.tempSeatControlData.massageEnabled ? 'ON': 'OFF'); + this.set('heatingEnableData', + this.tempSeatControlData.heatingEnabled ? 'ON': 'OFF'); + this.set('coolingEnabledData', + this.tempSeatControlData.coolingEnabled ? 'ON': 'OFF'); + this.set('massageEnabledData', + this.tempSeatControlData.massageEnabled ? 'ON': 'OFF'); - this.set('massageCushionFirmness0',this.tempSeatControlData.massageCushionFirmness[0] != null); - this.set('massageCushionFirmness1',this.tempSeatControlData.massageCushionFirmness[1] != null); - this.set('massageCushionFirmness2',this.tempSeatControlData.massageCushionFirmness[2] != null); - this.set('massageCushionFirmness3',this.tempSeatControlData.massageCushionFirmness[3] != null); - this.set('massageCushionFirmness4',this.tempSeatControlData.massageCushionFirmness[4] != null); + this.set('massageCushionFirmness0', + this.tempSeatControlData.massageCushionFirmness[0] != null); + this.set('massageCushionFirmness1', + this.tempSeatControlData.massageCushionFirmness[1] != null); + this.set('massageCushionFirmness2', + this.tempSeatControlData.massageCushionFirmness[2] != null); + this.set('massageCushionFirmness3', + this.tempSeatControlData.massageCushionFirmness[3] != null); + this.set('massageCushionFirmness4', + this.tempSeatControlData.massageCushionFirmness[4] != null); - this.set('massageMode0',this.tempSeatControlData.massageMode[0] != null); - this.set('massageMode1',this.tempSeatControlData.massageMode[1] != null); + this.set('massageMode0', + this.tempSeatControlData.massageMode[0] != null); + this.set('massageMode1', + this.tempSeatControlData.massageMode[1] != null); var length = this.tempSeatControlData.massageCushionFirmness.length; for(var i = 0; i < length; ++i){ @@ -141,49 +196,54 @@ SDL.SeatModel = Em.Object.create({ parseInt(this.tempSeatControlData.massageCushionFirmness[i].firmness); } - this.tempSeatControlData.heatingLevel = parseInt(this.tempSeatControlData.heatingLevel); - this.tempSeatControlData.coolingLevel = parseInt(this.tempSeatControlData.coolingLevel); - this.tempSeatControlData.horizontalPosition = parseInt(this.tempSeatControlData.horizontalPosition); - this.tempSeatControlData.verticalPosition = parseInt(this.tempSeatControlData.verticalPosition); - this.tempSeatControlData.frontVerticalPosition = parseInt(this.tempSeatControlData.frontVerticalPosition); - this.tempSeatControlData.backVerticalPosition = parseInt(this.tempSeatControlData.backVerticalPosition); - this.tempSeatControlData.backTiltAngle = parseInt(this.tempSeatControlData.backTiltAngle); - this.tempSeatControlData.headSupportHorizontalPosition = parseInt(this.tempSeatControlData.headSupportHorizontalPosition); - this.tempSeatControlData.headSupportVerticalPosition = parseInt(this.tempSeatControlData.headSupportVerticalPosition); - this.tempSeatControlData.memory.id = parseInt(this.tempSeatControlData.memory.id); - - SDL.SeatModel.set('tempSeatControlData',SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); + this.tempSeatControlData.heatingLevel = + parseInt(this.tempSeatControlData.heatingLevel); + this.tempSeatControlData.coolingLevel = + parseInt(this.tempSeatControlData.coolingLevel); + this.tempSeatControlData.horizontalPosition = + parseInt(this.tempSeatControlData.horizontalPosition); + this.tempSeatControlData.verticalPosition = + parseInt(this.tempSeatControlData.verticalPosition); + this.tempSeatControlData.frontVerticalPosition = + parseInt(this.tempSeatControlData.frontVerticalPosition); + this.tempSeatControlData.backVerticalPosition = + parseInt(this.tempSeatControlData.backVerticalPosition); + this.tempSeatControlData.backTiltAngle = + parseInt(this.tempSeatControlData.backTiltAngle); + this.tempSeatControlData.headSupportHorizontalPosition = + parseInt(this.tempSeatControlData.headSupportHorizontalPosition); + this.tempSeatControlData.headSupportVerticalPosition = + parseInt(this.tempSeatControlData.headSupportVerticalPosition); + this.tempSeatControlData.memory.id = + parseInt(this.tempSeatControlData.memory.id); + + SDL.SeatModel.set('tempSeatControlData', + SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); }, goToStates: function(){ - SDL.SeatModel.set('tempSeatControlData',SDL.deepCopy(SDL.SeatModel.seatControlData)); + SDL.SeatModel.set('tempSeatControlData', + SDL.deepCopy(SDL.SeatModel.seatControlData)); SDL.SeatModel.update(); }, - massageCushionFirmness0: true, - massageCushionFirmness1: false, - massageCushionFirmness2: false, - massageCushionFirmness3: false, - massageCushionFirmness4: false, - - massageMode0: true, - massageMode1: false, - init: function(){ this.seatControlData.id = this.supportedSeatStruct[0]; var length = this.massageZoneStruct.length; for(var i = 0; i < length; ++i){ - this.seatControlData.massageMode.push(SDL.deepCopy(this.massageModeData)); - this.seatControlData.massageMode[i].massageZone = this.massageZoneStruct[i]; + this.seatControlData.massageMode.push( + SDL.deepCopy(this.massageModeData)); + this.seatControlData.massageMode[i].massageZone = + this.massageZoneStruct[i]; } - this.seatControlData.massageCushionFirmness.push(this.massageCushionFirmness); + this.seatControlData.massageCushionFirmness.push( + this.massageCushionFirmness); this.seatControlData.memory = this.seatMemoryAction; this.tempSeatControlData = SDL.deepCopy(this.seatControlData); }, - getSeatCapabilities: function() { var result = [{ moduleName: 'Seat', @@ -205,6 +265,7 @@ SDL.SeatModel = Em.Object.create({ }]; return result; }, + setSeatControlData: function(data){ for (var key in data) { this.seatControlData.set(key, SDL.deepCopy(data[key])); @@ -213,34 +274,44 @@ SDL.SeatModel = Em.Object.create({ var result = this.getSeatControlData(true); return result; }, + getSeatControlData: function(){ this.update(); return this.seatControlData; }, applySettings: function () { - SDL.SeatModel.tempSeatControlData.coolingEnabled = (SDL.SeatModel.coolingEnabledData == 'ON'); - SDL.SeatModel.tempSeatControlData.heatingEnabled = (SDL.SeatModel.heatingEnableData == 'ON'); - SDL.SeatModel.tempSeatControlData.massageEnabled = (SDL.SeatModel.massageEnabledData == 'ON'); + SDL.SeatModel.tempSeatControlData.coolingEnabled = + (SDL.SeatModel.coolingEnabledData == 'ON'); + SDL.SeatModel.tempSeatControlData.heatingEnabled = + (SDL.SeatModel.heatingEnableData == 'ON'); + SDL.SeatModel.tempSeatControlData.massageEnabled = + (SDL.SeatModel.massageEnabledData == 'ON'); SDL.SeatModel.update(); - var temp = Em.Object.create( this.dfs(SDL.deepCopy(this.tempSeatControlData), SDL.deepCopy(this.seatControlData))); + var temp = Em.Object.create(this.dfs(SDL.deepCopy(this.tempSeatControlData), + SDL.deepCopy(this.seatControlData))); + var length = this.mandatoryField.length; for(var i = 0; i < length; ++i){ var value = this.mandatoryField[i]; if(value.indexOf('.') >= 0){ var parentValue = value.substring(0, value.indexOf('.')); if(temp.hasOwnProperty(parentValue)){ - temp.set(value,Em.Object.create(SDL.SeatModel.tempSeatControlData).get(value)); + temp.set(value,Em.Object.create( + SDL.SeatModel.tempSeatControlData).get(value)); } } else{ temp[value] = this.tempSeatControlData[value]; } } - FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', seatControlData: temp}); - SDL.SeatModel.set('seatControlData',Em.Object.create(SDL.deepCopy(SDL.SeatModel.tempSeatControlData))); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', + seatControlData: temp}); + SDL.SeatModel.set('seatControlData', + Em.Object.create(SDL.deepCopy(SDL.SeatModel.tempSeatControlData))); }, + isEmptyObject: function(object){ var l = 0; for (var key in object){ @@ -250,9 +321,8 @@ SDL.SeatModel = Em.Object.create({ } return l == 0; }, - dfs:function(from, to){ - + dfs:function(from, to){ var result = SDL.deepCopy(from); for (var key in from) { if(from.hasOwnProperty(key)){ diff --git a/app/view/settings/HMISettingsView.js b/app/view/settings/HMISettingsView.js index 76a0cd867..f1fb1f49f 100644 --- a/app/view/settings/HMISettingsView.js +++ b/app/view/settings/HMISettingsView.js @@ -27,34 +27,42 @@ * @name SDL.HMISettingsView * @desc Info Apps visual representation * @category View - * @filesource app/view/settings/AppsView.js + * @filesource app/view/settings/HMISettingsView.js * @version 1.0 */ SDL.HMISettingsView = Em.ContainerView.create({ + elementId: 'hmi_settings', + classNames: 'in_HMIsettings_view', + classNameBindings: [ 'SDL.States.settings.HMISettings.active:active_state:inactive_state' ], + childViews: [ 'SettingsList' ], + getDisplayModeStatus: function() { return 'Display mode - ' + SDL.HmiSettingsModel.displayMode; }.property( 'SDL.HmiSettingsModel.displayMode' ), + getDistanceUnit: function() { return 'Distance unit - ' + SDL.HmiSettingsModel.distanceUnit; }.property( 'SDL.HmiSettingsModel.distanceUnit' ), + getTemperatureUnit: function() { return 'Temperature unit - ' + SDL.HmiSettingsModel.temperatureUnit; }.property( 'SDL.HmiSettingsModel.temperatureUnit' ), + SettingsList: SDL.List.extend({ elementId: 'HMI_settings_list', classNames:'HMI_settings_list', @@ -85,4 +93,4 @@ SDL.HMISettingsView = Em.ContainerView.create({ } }] }) -}); \ No newline at end of file +}); diff --git a/app/view/settings/LightView.js b/app/view/settings/LightView.js index 5a1cc53d2..900f5f329 100644 --- a/app/view/settings/LightView.js +++ b/app/view/settings/LightView.js @@ -27,19 +27,24 @@ * @name SDL.LightView * @desc Info Apps visual representation * @category View - * @filesource app/view/settings/AppsView.js + * @filesource app/view/settings/LightView.js * @version 1.0 */ SDL.LightView = Em.ContainerView.create({ + elementId: 'light', + classNames: 'in_light_view', + classNameBindings: [ 'SDL.States.settings.light.active:active_state:inactive_state' ], + childViews: [ 'SettingsList' ], + initList: function(list, arr){ var length = list.length; for(var i = 0; i < length; i++){ @@ -55,6 +60,7 @@ SDL.LightView = Em.ContainerView.create({ arr.push(temp); } }, + SettingsList: SDL.List.extend({ elementId: 'light_list', classNames:'light_list', diff --git a/app/view/settings/SeatView.js b/app/view/settings/SeatView.js index c82843dcd..4b151647b 100644 --- a/app/view/settings/SeatView.js +++ b/app/view/settings/SeatView.js @@ -27,16 +27,18 @@ * @name SDL.SeatView * @desc Info Apps visual representation * @category View - * @filesource app/view/settings/AppsView.js + * @filesource app/view/settings/SeatView.js * @version 1.0 */ SDL.SeatView = Em.ContainerView.create({ elementId: 'seat', classNames: 'in_seat_view', + classNameBindings: [ 'SDL.States.settings.seat.active:active_state:inactive_state' ], + childViews: [ 'set', 'id', @@ -52,23 +54,28 @@ SDL.SeatView = Em.ContainerView.create({ heating: Em.ContainerView.create({ elementId: 'heating', - classNames: 'in_seat_heating_view', + classNames: 'in_seat_heating_view', + childViews: [ 'enable', 'level' ], + enable: Em.ContainerView.create({ elementId: 'enable', classNames: 'in_seat_enable_view', + childViews: [ 'enableLabel', 'enableSelect' ], + enableLabel: SDL.Label.extend({ elementId: 'enableLabel', classNames: 'enableLabel', content: 'Heating enable' }), + enableSelect: Em.Select.extend({ elementId: 'heating_enableSelect', classNames: 'enableSelect', @@ -76,18 +83,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.heatingEnableData' }) }), + level: Em.ContainerView.create({ elementId: 'level', classNames: 'in_seat_level_view', + childViews: [ 'levelLabel', 'levelInput' ], + levelLabel: SDL.Label.extend({ elementId: 'levelLabel', classNames: 'levelLabel', content: 'Level' }), + levelInput: Ember.TextField.extend({ elementId: 'levelInput', classNames: 'levelInput', @@ -96,25 +107,31 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + cooling: Em.ContainerView.create({ elementId: 'cooling', classNames: 'in_seat_cooling_view', + childViews: [ 'enable', 'level' ], + enable: Em.ContainerView.create({ elementId: 'enable', classNames: 'in_seat_enable_view', + childViews: [ 'enableLabel', 'enableSelect' ], + enableLabel: SDL.Label.extend({ elementId: 'enableLabel', classNames: 'enableLabel', content: 'Cooling enable' }), + enableSelect: Em.Select.extend({ elementId: 'cooling_enableSelect', classNames: 'enableSelect', @@ -122,18 +139,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.coolingEnabledData' }) }), + level: Em.ContainerView.create({ elementId: 'level', classNames: 'in_seat_level_view', + childViews: [ 'levelLabel', 'levelInput' ], + levelLabel: SDL.Label.extend({ elementId: 'levelLabel', classNames: 'levelLabel', content: 'Level' }), + levelInput: Ember.TextField.extend({ elementId: 'coolingLevelInput', classNames: 'levelInput', @@ -142,9 +163,11 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + cushionFirmness:Em.ContainerView.create({ elementId: 'cushionFirmness', classNames: 'in_seat_cushionFirmness_view', + childViews: [ 'cushionFirmnessLabel', 'addButton', @@ -154,6 +177,7 @@ SDL.SeatView = Em.ContainerView.create({ 'massageCushionFirmness3', 'massageCushionFirmness4' ], + rm: function(item){ var length = SDL.SeatModel.tempSeatControlData.massageCushionFirmness.length; if(length < 2){ @@ -166,6 +190,7 @@ SDL.SeatView = Em.ContainerView.create({ SDL.SeatModel.tempSeatControlData.massageCushionFirmness.pop(); SDL.SeatModel.update(); }, + addButton: SDL.Button.extend({ elementId: 'cushionFirmnessAddButton', classNames: 'addButton', @@ -181,15 +206,18 @@ SDL.SeatView = Em.ContainerView.create({ }, text: 'Add', onDown: false, - }), + }), + cushionFirmnessLabel: SDL.Label.create({ elementId: 'ushionFirmnessLabel', classNames: 'in_seat_cushionFirmnessLabel_view', content: 'Cushion Firmness' }), + massageCushionFirmness0: Em.ContainerView.create({ elementId: 'massageCushionFirmness0', classNames: 'in_seat_cushionFirmnes_view', + classNameBindings: [ 'SDL.SeatModel.massageCushionFirmness0:active_state:inactive_state' ], @@ -199,29 +227,36 @@ SDL.SeatView = Em.ContainerView.create({ 'firmnes', 'dellButton' ], + dellButton: SDL.Button.extend({ classNames: [ - 'dellButton' + 'dellButton' ], + action: function(){ SDL.SeatView.cushionFirmness.rm(0); }, + icon: 'images/settings/close_icon_min.png', target: 'SDL.SettingsController', onDown: false, }), + cushion:Em.ContainerView.create({ elementId: 'cushion', classNames: 'in_seat_cushion_view', + childViews: [ 'cushionLabal', 'cushionSelect' ], + cushionLabal: SDL.Label.extend({ elementId: 'cushionLabal', classNames: 'cushionLabal', content: 'Cushion' }), + cushionSelect: Em.Select.create({ elementId: 'cushionSelect', classNames: 'cushionSelect', @@ -229,18 +264,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageCushionFirmness.0.cushion' }) }), + firmnes:Em.ContainerView.create({ elementId: 'firmnes', classNames: 'in_seat_firmnes_view', + childViews: [ 'firmnesLabal', 'firmnesInput' ], + firmnesLabal: SDL.Label.extend({ elementId: 'firmnesLabal', classNames: 'firmnesLabal', content: 'Firmness' }), + firmnesInput: Em.TextField.create({ elementId: 'firmnesInput', classNames: 'firmnesInput', @@ -249,6 +288,7 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + massageCushionFirmness1: Em.ContainerView.create({ elementId: 'massageCushionFirmness1', classNames: 'in_seat_cushionFirmnes_view', @@ -262,31 +302,39 @@ SDL.SeatView = Em.ContainerView.create({ 'firmnes', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageCushionFirmness1_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' ], + action: function(){ SDL.SeatView.cushionFirmness.rm(1); }, + icon: 'images/settings/close_icon_min.png', target: 'SDL.SettingsController', onDown: false, }), + cushion:Em.ContainerView.create({ elementId: 'cushion', classNames: 'in_seat_cushion_view', + childViews: [ 'cushionLabal', 'cushionSelect1' ], + cushionLabal: SDL.Label.extend({ elementId: 'cushionLabal', classNames: 'cushionLabal', content: 'Cushion' }), + cushionSelect1: Em.Select.create({ elementId: 'cushionSelect1', classNames: 'cushionSelect', @@ -294,18 +342,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageCushionFirmness.1.cushion' }) }), + firmnes:Em.ContainerView.create({ elementId: 'firmnes', classNames: 'in_seat_firmnes_view', + childViews: [ 'firmnesLabal', 'firmnesInput' ], + firmnesLabal: SDL.Label.extend({ elementId: 'firmnesLabal', classNames: 'firmnesLabal', content: 'Firmness' }), + firmnesInput: Em.TextField.create({ elementId: 'massageCushionFirmness1_firmnesInput', classNames: 'firmnesInput', @@ -314,6 +366,7 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + massageCushionFirmness2: Em.ContainerView.create({ elementId: 'massageCushionFirmness2', classNames: 'in_seat_cushionFirmnes_view', @@ -328,31 +381,39 @@ SDL.SeatView = Em.ContainerView.create({ 'firmnes', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageCushionFirmness2_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' - ], - action: function(){ + ], + + action: function(){ SDL.SeatView.cushionFirmness.rm(2); - }, - icon: 'images/settings/close_icon_min.png', - target: 'SDL.SettingsController', - onDown: false, + }, + + icon: 'images/settings/close_icon_min.png', + target: 'SDL.SettingsController', + onDown: false, }), + cushion:Em.ContainerView.create({ elementId: 'cushion', classNames: 'in_seat_cushion_view', + childViews: [ 'cushionLabal', 'cushionSelect2' ], + cushionLabal: SDL.Label.extend({ elementId: 'cushionLabal', classNames: 'cushionLabal', content: 'Cushion' }), + cushionSelect2: Em.Select.create({ elementId: 'cushionSelect2', classNames: 'cushionSelect', @@ -363,15 +424,18 @@ SDL.SeatView = Em.ContainerView.create({ firmnes:Em.ContainerView.create({ elementId: 'firmnes', classNames: 'in_seat_firmnes_view', + childViews: [ 'firmnesLabal', 'firmnesInput' ], + firmnesLabal: SDL.Label.extend({ elementId: 'firmnesLabal', classNames: 'firmnesLabal', content: 'Firmness' }), + firmnesInput: Em.TextField.create({ elementId: 'massageCushionFirmness2_firmnesInput', classNames: 'firmnesInput', @@ -393,31 +457,39 @@ SDL.SeatView = Em.ContainerView.create({ 'firmnes', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageCushionFirmness3_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' - ], - action: function(){ + ], + + action: function(){ SDL.SeatView.cushionFirmness.rm(3); - }, - icon: 'images/settings/close_icon_min.png', - target: 'SDL.SettingsController', - onDown: false, - }), + }, + + icon: 'images/settings/close_icon_min.png', + target: 'SDL.SettingsController', + onDown: false, + }), + cushion:Em.ContainerView.create({ elementId: 'cushion', classNames: 'in_seat_cushion_view', + childViews: [ 'cushionLabal', 'cushionSelect3' ], + cushionLabal: SDL.Label.extend({ elementId: 'cushionLabal', classNames: 'cushionLabal', content: 'Cushion' }), + cushionSelect3: Em.Select.create({ elementId: 'cushionSelect3', classNames: 'cushionSelect', @@ -425,18 +497,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageCushionFirmness.3.cushion' }) }), + firmnes:Em.ContainerView.create({ elementId: 'firmnes', classNames: 'in_seat_firmnes_view', + childViews: [ 'firmnesLabal', 'firmnesInput' ], + firmnesLabal: SDL.Label.extend({ elementId: 'firmnesLabal', classNames: 'firmnesLabal', content: 'Firmness' }), + firmnesInput: Em.TextField.create({ elementId: 'massageCushionFirmness3_firmnesInput', classNames: 'firmnesInput', @@ -445,6 +521,7 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + massageCushionFirmness4: Em.ContainerView.create({ elementId: 'massageCushionFirmness4', classNames: 'in_seat_cushionFirmnes_view', @@ -452,36 +529,44 @@ SDL.SeatView = Em.ContainerView.create({ classNameBindings: [ 'SDL.SeatModel.massageCushionFirmness4:active_state:inactive_state' ], + childViews: [ 'cushion', 'firmnes', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageCushionFirmness4_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' - ], - action: function(){ + ], + + action: function(){ SDL.SeatView.cushionFirmness.rm(4); - }, - icon: 'images/settings/close_icon_min.png', - target: 'SDL.SettingsController', - onDown: false, + }, + + icon: 'images/settings/close_icon_min.png', + target: 'SDL.SettingsController', + onDown: false, }), cushion:Em.ContainerView.create({ elementId: 'cushion', classNames: 'in_seat_cushion_view', + childViews: [ 'cushionLabal', 'cushionSelect4' ], + cushionLabal: SDL.Label.extend({ elementId: 'cushionLabal', classNames: 'cushionLabal', content: 'Cushion' }), + cushionSelect4: Em.Select.create({ elementId: 'cushionSelect4', classNames: 'cushionSelect', @@ -489,18 +574,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageCushionFirmness.4.cushion' }) }), + firmnes:Em.ContainerView.create({ elementId: 'firmnes', classNames: 'in_seat_firmnes_view', + childViews: [ 'firmnesLabal', 'firmnesInput' ], + firmnesLabal: SDL.Label.extend({ elementId: 'firmnesLabal', classNames: 'firmnesLabal', content: 'Firmness' }), + firmnesInput: Em.TextField.create({ elementId: 'massageCushionFirmness4_firmnesInput', classNames: 'firmnesInput', @@ -511,9 +600,11 @@ SDL.SeatView = Em.ContainerView.create({ }) }), + position: Em.ContainerView.create({ elementId: 'position', classNames: 'in_seat_position_view', + childViews: [ 'positionLabel', 'horisontal', @@ -523,23 +614,28 @@ SDL.SeatView = Em.ContainerView.create({ 'headSupportHorizontal', 'headSupportVertical' ], + positionLabel:SDL.Label.extend({ elementId: 'positionLabel', classNames: 'positionLabel', content: 'Position' }), + horisontal: Em.ContainerView.create({ elementId: 'horisontal', classNames: 'in_seat_horisontal_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Horisontal' }), + input:Ember.TextField.extend({ elementId: 'horisontalInput', classNames: 'input', @@ -547,18 +643,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.horizontalPosition' }) }), + vertical: Em.ContainerView.create({ elementId: 'vertical', classNames: 'in_seat_vertical_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Vertical' }), + input:Ember.TextField.extend({ elementId: 'verticalInput', classNames: 'input', @@ -566,18 +666,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.verticalPosition' }) }), + seatFrontVertical: Em.ContainerView.create({ elementId: 'seatFrontVertical', classNames: 'in_seat_seatFrontVertical_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Seat-front vertical' }), + input:Ember.TextField.extend({ elementId: 'seatFrontVerticalInput', classNames: 'input', @@ -585,18 +689,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.frontVerticalPosition', }) }), + seatBackVertical: Em.ContainerView.create({ elementId: 'seatBackVertical', classNames: 'in_seat_seatBackVertical_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Seat-back vertical' }), + input:Ember.TextField.extend({ elementId: 'seatBackVerticalInput', classNames: 'input', @@ -604,18 +712,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.backVerticalPosition' }) }), + headSupportHorizontal: Em.ContainerView.create({ elementId: 'headSupportHorizontal', classNames: 'in_seat_headSupportHorizontal_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Head support horizontal' }), + input:Ember.TextField.extend({ elementId: 'headSupportHorizontalInput', classNames: 'input', @@ -623,18 +735,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.headSupportHorizontalPosition' }) }), + headSupportVertical: Em.ContainerView.create({ elementId: 'headSupportVertical', classNames: 'in_seat_headSupportVertical_view', + childViews: [ 'label', 'input' ], + label:SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Head support vertical' }), + input:Ember.TextField.extend({ elementId: 'headSupportVerticalInput', classNames: 'input', @@ -643,18 +759,22 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + backTiltAngle: Em.ContainerView.create({ elementId: 'backTiltAngle', classNames: 'in_seat_backTiltAngle_view', + childViews: [ 'label', 'input' ], + label: SDL.Label.extend({ elementId: 'label', classNames: 'label', content: 'Back tilt angle' }), + input: Ember.TextField.extend({ elementId: 'backTiltAngleInput', classNames: 'input', @@ -662,32 +782,39 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.backTiltAngle' }) }), + memory: Em.ContainerView.create({ elementId: 'memory', classNames: 'in_memory_view', + childViews: [ 'memoryLabel', 'memoryId', 'label', 'action' ], + memoryLabel: SDL.Label.extend({ elementId: 'memoryLabel', classNames: 'memoryLabel', content: 'Memory action' - }) , + }), + memoryId: Em.ContainerView.create({ elementId: 'memoryId', classNames: 'in_memoryId_view', + childViews: [ 'labelId', 'inputId' ], + labelId: SDL.Label.extend({ elementId: 'labelId', classNames: 'labelId', content: 'ID' }), + inputId: Ember.TextField.extend({ elementId: 'inputId', classNames: 'inputId', @@ -698,15 +825,18 @@ SDL.SeatView = Em.ContainerView.create({ label: Em.ContainerView.create({ elementId: 'label', classNames: 'in_label_view', + childViews: [ 'labelLabel', 'inputLabel' ], + labelLabel: SDL.Label.extend({ elementId: 'labelLabel', classNames: 'labelLabel', content: 'Label' }), + inputLabel: Ember.TextField.extend({ elementId: 'inputLabel', classNames: 'inputLabel', @@ -714,18 +844,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.memory.label' }) }), + action: Em.ContainerView.create({ elementId: 'action', classNames: 'in_action_view', + childViews: [ 'actionLabel', 'actionSelect' ], + actionLabel: SDL.Label.extend({ elementId: 'actionLabel', classNames: 'actionLabel', content: 'Action' }), + actionSelect: Em.Select.extend({ elementId: 'actionSelect', classNames: 'actionSelect', @@ -735,27 +869,31 @@ SDL.SeatView = Em.ContainerView.create({ }), }), set: SDL.Button.create({ - classNames: [ 'setButton' - ], - text: 'Set', - onDown: false, - target: 'SDL.SeatModel', - action: 'applySettings' + ], + + text: 'Set', + onDown: false, + target: 'SDL.SeatModel', + action: 'applySettings' }), + massageEnable: Em.ContainerView.extend({ elementId: 'massageEnable', classNames: 'in_massageEnable_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'massageEnable_label', classNames: 'massageEnable_label', content: 'Massage' }), + select: Em.Select.create({ elementId: 'massageEnable_enableSelect', classNames: 'massageEnable_enableSelect', @@ -766,15 +904,18 @@ SDL.SeatView = Em.ContainerView.create({ massageEnable: Em.ContainerView.extend({ elementId: 'massageEnable', classNames: 'in_massageEnable_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'massageEnable_label', classNames: 'massageEnable_label', content: 'Massage' }), + select: Em.Select.create({ elementId: 'massageEnable_enableSelect', classNames: 'massageEnable_enableSelect', @@ -785,15 +926,18 @@ SDL.SeatView = Em.ContainerView.create({ id: Em.ContainerView.extend({ elementId: 'id', classNames: 'in_id_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'idlabel', classNames: 'idlabel', content: 'ID' }), + select: Em.Select.create({ elementId: 'idSelect', classNames: 'idSelect', @@ -801,15 +945,18 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.id' }) }), + massageMode: Em.ContainerView.create({ elementId: 'massageMode', classNames: 'in_seat_massageModes_view', + childViews: [ 'massageModeLabel', 'addButton', 'massageMode0', 'massageMode1' ], + rm: function(item){ var length = SDL.SeatModel.tempSeatControlData.massageMode.length; if(length < 2){ @@ -822,12 +969,15 @@ SDL.SeatView = Em.ContainerView.create({ SDL.SeatModel.tempSeatControlData.massageMode.pop(); SDL.SeatModel.update(); }, + addButton: SDL.Button.extend({ elementId: 'addButton', classNames: 'addButton', + classNames: [ 'addButton' - ], + ], + action: function(){ if(SDL.SeatModel.tempSeatControlData.massageMode.length > 2){ return; @@ -835,50 +985,63 @@ SDL.SeatView = Em.ContainerView.create({ SDL.SeatModel.tempSeatControlData.massageMode.push(SDL.SeatModel.massageModeData); SDL.SeatModel.update(); }, + text: 'Add', onDown: false, }), + massageModeLabel: SDL.Label.create({ elementId: 'massageModeLabel', classNames: 'massageModeLabel', content: 'Massage mode' }), + massageMode0: Em.ContainerView.create({ elementId: 'massageMode0', classNames: 'in_seat_massageMode_view', + classNameBindings: [ 'SDL.SeatModel.massageMode0:active_state:inactive_state' ], + childViews: [ 'zone', 'mode', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageMode0_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' ], + action: function(){ SDL.SeatView.massageMode.rm(0); }, + icon: 'images/settings/close_icon_min.png', target: 'SDL.SettingsController', onDown: false, }), + zone: Em.ContainerView.create({ elementId: 'zone', classNames: 'in_zone_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'zone_label', classNames: 'zone_label', content: 'Zone' }), + select: Em.Select.create({ elementId: 'zone_select', classNames: 'zone_select', @@ -886,18 +1049,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageMode.0.massageZone' }) }), + mode: Em.ContainerView.create({ elementId: 'modeM', classNames: 'in_mode_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'mode_label', classNames: 'mode_label', content: 'Mode' }), + select: Em.Select.create({ elementId: 'mode_select', classNames: 'mode_select', @@ -906,42 +1073,53 @@ SDL.SeatView = Em.ContainerView.create({ }) }) }), + massageMode1: Em.ContainerView.create({ elementId: 'massageMode1', classNames: 'in_seat_massageMode_view', + classNameBindings: [ 'SDL.SeatModel.massageMode1:active_state:inactive_state' ], + childViews: [ 'zone', 'mode', 'dellButton' ], + dellButton: SDL.Button.extend({ elementId: 'massageMode1_dellButton', classNames: 'dellButton', + classNames: [ 'dellButton' ], + action: function(){ SDL.SeatView.massageMode.rm(1); }, + icon: 'images/settings/close_icon_min.png', target: 'SDL.SettingsController', onDown: false, }), + zone: Em.ContainerView.create({ elementId: 'zone', classNames: 'in_zone_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'zone_label', classNames: 'zone_label', content: 'Zone' }), + select: Em.Select.create({ elementId: 'massageMode1_zone_select', classNames: 'zone_select', @@ -949,18 +1127,22 @@ SDL.SeatView = Em.ContainerView.create({ valueBinding: 'SDL.SeatModel.tempSeatControlData.massageMode.1.massageZone' }) }), + mode: Em.ContainerView.create({ elementId: 'modeM', classNames: 'in_mode_view', + childViews: [ 'label', 'select' ], + label: SDL.Label.extend({ elementId: 'mode_label', classNames: 'mode_label', content: 'Mode' }), + select: Em.Select.create({ elementId: 'massageMode1_mode_select', classNames: 'mode_select', diff --git a/css/buttonControls.css b/css/buttonControls.css index d85aef717..156be746b 100644 --- a/css/buttonControls.css +++ b/css/buttonControls.css @@ -495,7 +495,6 @@ margin-top: 10px; } -} #app_controlButtons .languageSelect { position: absolute; width: 150px; diff --git a/css/climate.css b/css/climate.css index 58d72b0b6..6102a9d53 100644 --- a/css/climate.css +++ b/css/climate.css @@ -15,6 +15,7 @@ margin-left: 10px; margin-top: 10px; } + #climate_control{ width: 800px; height: 480px; diff --git a/css/media.css b/css/media.css index 8cf0506d8..1139d3859 100644 --- a/css/media.css +++ b/css/media.css @@ -37,16 +37,19 @@ padding-left: 48px; line-height: 48px; } + #media_ipodButton{ font-size: 18px; padding-left: 48px; line-height: 48px; } + #media_audioOption{ font-size: 13px; padding-left: 48px; line-height: 48px; } + #media_sdlButton { font-size: 18px; line-height: 48px; @@ -154,6 +157,7 @@ .media-ls-item.empty { background: #333333; } + #preferences .pref{ top: 77px; left: 546px; @@ -169,6 +173,7 @@ z-index: 1000; padding: 10px; } + #radio_options_view_container .bandCheckbox { position: absolute; left: 10px; @@ -189,10 +194,12 @@ left: 10px; top: 27px; } + #radio_options_view_container .sisDataLabel { left: 10px; top: 250px; } + #radio_options_view_container .stationIdLabel { left: 20px; top: 410px; @@ -204,10 +211,12 @@ left: 20px; top: 450px; } + #radio_options_view_container .fccLabel { left: 35px; top: 448px; } + #radio_options_view_container .fccInput { position: absolute; top: 450px; @@ -220,10 +229,12 @@ left: 20px; top: 430px; } + #radio_options_view_container .countryCodeLabel { left: 35px; top: 428px; } + #radio_options_view_container .countryCodeInput { position: absolute; top: 430px; @@ -244,15 +255,18 @@ left: 25px; top: 330px; } + #radio_options_view_container .stationShortNameCheckbox { position: absolute; left: 20px; top: 270px; } + #radio_options_view_container .stationShortNameLabel { left: 35px; top: 268px; } + #radio_options_view_container .stationShortNameInput { position: absolute; top: 270px; @@ -291,6 +305,7 @@ left: 35px; top: 392px; } + #radio_options_view_container .altitudeLabel { left: 50px; top: 390px; @@ -310,10 +325,12 @@ left: 20px; top: 290px; } + #radio_options_view_container .stationLongNameLabel { left: 35px; top: 288px; } + #radio_options_view_container .stationLongNameInput { position: absolute; top: 290px; @@ -338,6 +355,7 @@ left: 220px; width: 200px; } + #radio_options_view_container .PSCheckbox { position: absolute; left: 30px; @@ -968,6 +986,7 @@ height: 109px; background: url(../images/media/small-lazerhorse-image.png) no-repeat; } + #blueetooth_logo { position: absolute; top: 90px; @@ -978,6 +997,7 @@ height: 109px; background: url(../images/media/small-lazerhorse-image.png) no-repeat; } + #lineIn_logo { position: absolute; top: 90px; @@ -988,6 +1008,7 @@ height: 109px; background: url(../images/media/small-lazerhorse-image.png) no-repeat; } + #ipod_logo { position: absolute; top: 90px; @@ -998,6 +1019,7 @@ height: 109px; background: url(../images/media/small-fall-image.png) no-repeat; } + #bt-bg { position: relative; float: left; @@ -1396,6 +1418,7 @@ left: 161px; z-index: 501; } + #sdl_view_container_menu { top: 125px; left: 650px; diff --git a/css/sdl.css b/css/sdl.css index eb268a95c..8540ddb39 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -1470,6 +1470,7 @@ left: 655px; background: 0; } + #sendMessageView .setButton { width: 255px; height: 40px; @@ -1496,52 +1497,62 @@ top: 30px; left: 30px; } + #sendMessageView .lightDensityLabel { top: 50px; left: 30px; } + #sendMessageView .lightColorLabel { top: 70px; left: 30px; } + #sendMessageView .rLabel { top: 90px; left: 40px; } + #sendMessageView .gLabel { top: 110px; left: 40px; } + #sendMessageView .bLabel { top: 130px; left: 40px; } + #sendMessageView .lightStatusSelect { position: absolute; top: 30px; left: 160px; } + #sendMessageView .densityInput { position: absolute; top: 50px; left: 160px; width: 47px; } + #sendMessageView .rInput { position: absolute; top: 90px; left: 160px; width: 47px; } + #sendMessageView .gInput { position: absolute; top: 110px; left: 160px; width: 47px; } + #sendMessageView .bInput { position: absolute; top: 130px; left: 160px; width: 47px; -} \ No newline at end of file +} diff --git a/css/settings.css b/css/settings.css index b5382f7cb..7ff771387 100644 --- a/css/settings.css +++ b/css/settings.css @@ -206,6 +206,7 @@ display: block; position: relative } + #seat .setButton{ z-index: 1002; border: 2px solid white; @@ -272,6 +273,7 @@ left: 499px; background: black; } + #seat .in_seat_cushionFirmness_view .addButton , #seat .in_seat_massageModes_view .addButton{ z-index: 1002; From c402439de2b331850b73a3320519ec06ff9a6dbb Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 23 Mar 2018 12:08:39 +0200 Subject: [PATCH 046/102] Bugfix at the audio modul Bugfix when the mobile phone send setInteriorVehicleData for AUDIO modul HMI not send full parameters after set. --- app/controller/MediaController.js | 13 ++++++++++--- ffw/RCRPC.js | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 97ed067d6..78898bf71 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -461,8 +461,8 @@ SDL.MediaController = Em.Object.create( case 'CD':this.turnOnCD();break; case 'USB':this.turnOnUSB();break; case 'LINE_IN':this.turnOnLineIn();break; - case 'IPOD':this.turnOnIpod();break; - case 'MOBILE_APP':this.turnOnSDL();break; + case 'IPOD':this.turnOnIPod();break; + case 'MOBILE_APP':SDL.SDLMediaController.activateCurrentApp();break; } } if(data.volume!=null){ @@ -471,7 +471,7 @@ SDL.MediaController = Em.Object.create( if(data.keepContext!=null){ this.set('radioControlStruct.keepContext',data.keepContext); } - if(data.equalizerSettings!=null) + if(data.equalizerSettings.channelSetting!=null || data.equalizerSettings.channelId!=null || data.equalizerSettings.channelName!=null) { if(data.equalizerSettings.channelSetting!=null) { @@ -486,6 +486,13 @@ SDL.MediaController = Em.Object.create( this.set('radioControlStruct.equalizerSettings.channelName',data.equalizerSettings.channelName); } } + properties = []; + for (var key in data) { + properties.push(key); + } + + var result = this.getAudioControlData(true); + return SDL.SDLController.filterObjectProperty(result, properties); }, getAudioControlCapabilities:function(){ var result=[]; diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index d3e90bb73..a6f120dba 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -312,7 +312,10 @@ FFW.RC = FFW.RPCObserver.create( } } }; - + if (newAudioControlData) { + JSONMessage.result.moduleData.audioControlData = + newAudioControlData; + } if (newClimateControlData) { JSONMessage.result.moduleData.climateControlData = newClimateControlData; From 1bdab35f32a1071612c2103ae638bbda28db1f99 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Fri, 23 Mar 2018 15:31:48 +0200 Subject: [PATCH 047/102] Fixed audioView. --- app/controller/MediaController.js | 44 +++--- app/view/media/audioView.js | 214 +++++++++++++++++++++++------- css/media.css | 101 +++++++++++++- images/media/left_button.png | Bin 0 -> 956 bytes 4 files changed, 292 insertions(+), 67 deletions(-) create mode 100644 images/media/left_button.png diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 78898bf71..17210d86a 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -47,21 +47,30 @@ SDL.MediaController = Em.Object.create( radioControlStruct:{ source:'AUDIO', keepContext:true, - equalizerSettings:{ + equalizerSettings:[{ channelSetting:50, channelId: 50, channelName: 'Default' - }, + }], }, + lastRadioControlStruct:{ source:'AUDIO', keepContext:true, - equalizerSettings:{ + equalizerSettings:[{ channelSetting:50, channelId: 50, channelName: 'Default' - }, + }], }, + + tempEqualizerSettIndex: 0, + tempEqualizerSettings: { + channelSetting:50, + channelId: 50, + channelName: 'Default' + }, + radioControlAudioValue: { keepContext:true, @@ -471,19 +480,22 @@ SDL.MediaController = Em.Object.create( if(data.keepContext!=null){ this.set('radioControlStruct.keepContext',data.keepContext); } - if(data.equalizerSettings.channelSetting!=null || data.equalizerSettings.channelId!=null || data.equalizerSettings.channelName!=null) - { - if(data.equalizerSettings.channelSetting!=null) - { - this.set('radioControlStruct.equalizerSettings.channelSetting',data.equalizerSettings.channelSetting); - } - if(data.equalizerSettings.channelId!=null) - { - this.set('radioControlStruct.equalizerSettings.channelId',data.equalizerSettings.channelId); - } - if(data.equalizerSettings.channelName!=null) + var length = data.equalizerSettings.length; + for(var i = 0; i < 1; ++i){ + if(data.equalizerSettings[i].channelSetting!=null || data.equalizerSettings[i].channelId!=null || data.equalizerSettings[i].channelName!=null) { - this.set('radioControlStruct.equalizerSettings.channelName',data.equalizerSettings.channelName); + if(data.equalizerSettings[i].channelSetting!=null) + { + this.radioControlStruct.equalizerSettings.channelSetting = data.equalizerSettings[i].channelSetting; + } + if(data.equalizerSettings[i].channelId!=null) + { + this.radioControlStruct.equalizerSettings.channelId = data.equalizerSettings[i].channelId; + } + if(data.equalizerSettings[i].channelName!=null) + { + this.radioControlStruct.equalizerSettings.channelName = data.equalizerSettings[i].channelName; + } } } properties = []; diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index c868c6e46..a32c35200 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -24,7 +24,159 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ - SDL.audioView= Em.ContainerView.extend( +EqualizerSettingsView = Em.ContainerView.create({ + elementId:'EqualizerSettingsView', + classNames:'EqualizerSettingsView', + + childViews:[ + 'equalizerSettingsLabel', + 'equalizerSettingsArray', + 'equalizerSettingsAddButton' + ], + + equalizerSettingsLabel: SDL.Label.create({ + elementId: 'equalizerSettingsLabel', + classNames: 'equalizerSettingsLabel', + content: 'Equalizer settings' + }), + + equalizerSettingsArray: Em.ContainerView.create({ + elementId: 'equalizerSettingsArray', + classNames: 'equalizerSettingsArray', + childViews: [ + 'deleteButton', + 'leftButton', + 'rightbutton', + 'stateLabel', + 'channelIdLabel', + 'channelNameLabel', + 'channelSettingLabel', + 'channelIdInput', + 'channelNameInput', + 'channelSettingInput' + ], + + stateLabel: SDL.Label.extend({ + elementId: 'stateLabel', + classNames: 'stateLabel', + content: '' + }), + + channelIdLabel: SDL.Label.extend({ + elementId: 'channelIdLabel', + classNames: 'channelIdLabel', + content: 'Channel id:' + }), + + channelNameLabel: SDL.Label.extend({ + elementId: 'channelNameLabel', + classNames: 'channelNameLabel', + content: 'Channel name:' + }), + + channelSettingLabel: SDL.Label.extend({ + elementId: 'channelSettingLabel', + classNames: 'channelSettingLabel', + content: 'Channel set:' + }), + + deleteButton: SDL.Button.extend({ + classNames: [ + 'deleteButton' + ], + action: function(){ + var length = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; + + if(length == 1){ + return; + } + + for(var i = SDL.MediaController.tempEqualizerSettIndex; i < length - 1; ++i){ + SDL.MediaController.lastRadioControlStruct.equalizerSettings[i] = + SDL.MediaController.lastRadioControlStruct.equalizerSettings[i+1]; + } + SDL.MediaController.lastRadioControlStruct.equalizerSettings.pop(); + if(SDL.MediaController.tempEqualizerSettIndex != length-1){ + SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); + } else{ + SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex - 1]); + } + + }, + icon: 'images/settings/close_icon_min.png', + onDown: false + }), + + channelIdInput:Ember.TextField.extend({ + elementId:'channelIdInput', + classNames:'channelIdInput', + valueBinding: 'SDL.MediaController.tempEqualizerSettings.channelId' + }), + + channelNameInput:Ember.TextField.extend({ + elementId:'channelNameInput', + classNames:'channelNameInput', + valueBinding: 'SDL.MediaController.tempEqualizerSettings.channelName' + }), + + channelSettingInput:Ember.TextField.extend({ + elementId:'channelSettingInput', + classNames:'channelSettingInput', + valueBinding: 'SDL.MediaController.tempEqualizerSettings.channelSetting' + }), + + leftButton: SDL.Button.extend({ + classNames: [ + 'leftButton' + ], + action: function(){ + if(SDL.MediaController.tempEqualizerSettIndex == 0){ + return; + } + SDL.MediaController.set('tempEqualizerSettings', + SDL.MediaController.lastRadioControlStruct.equalizerSettings[--SDL.MediaController.tempEqualizerSettIndex]); + }, + icon: 'images/media/left_button.png', + onDown: false, + }), + + rightbutton: SDL.Button.extend({ + classNames: [ + 'rightbutton' + ], + action: function(){ + var length = + SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; + if(SDL.MediaController.tempEqualizerSettIndex == length - 1){ + return; + } + SDL.MediaController.set('tempEqualizerSettings', + SDL.MediaController.lastRadioControlStruct.equalizerSettings[++SDL.MediaController.tempEqualizerSettIndex]); + }, + icon: 'images/media/left_button.png', + onDown: false, + }) + }), + + equalizerSettingsAddButton: SDL.Button.extend({ + classNames: [ + 'equalizerSettingsAddButton' + ], + action: function(){ + SDL.MediaController.lastRadioControlStruct.equalizerSettings.push({ + channelSetting: 0, + channelId: 0, + channelName: 'Default' + }); + SDL.MediaController.tempEqualizerSettIndex = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length - 1; + SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); + }, + text: 'Add', + onDown: false + }) +}); + +SDL.audioView= Em.ContainerView.extend( { elementId: 'media_options_menu', // classNameBindings: [ @@ -46,37 +198,15 @@ 'volumeInput', 'volumeLabel', 'volumeCheckBox', - 'equalizerSettingsLabel', - 'equalizerChannelIdInput', - 'equalizerChannelIdLabel', - 'equalizerChannelNameInput', - 'equalizerChannelNameLabel', - 'equalizerChannelNameCheckBox', - 'equalizerChannelSettingLabel', - 'equalizerChannelSettingInput', - 'equalizerSettingsCheckBox', - 'save' + 'save', + 'equalizerSettings' ], - equalizerSettingsCheckBox:Em.Checkbox.extend( - { - elementId: 'equalizerSettingsCheckBox', - classNames: 'equalizerSettingsCheckBox', - checkedBinding: 'SDL.MediaController.radioControlAudioValue.equalizerSettings' - } - ), - equalizerChannelSettingLabel: SDL.Label.extend( - { - elementId: 'equalizerChannelSettingLabel', - classNames: 'equalizerChannelSettingLabel', - content: 'Channel set:', - } - ), equalizerChannelSettingInput:Ember.TextField.extend( { attributeBindings: ['disabled'], elementId:'equalizerChannelSettingInput', classNames:'equalizerChannelSettingInput', - valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelSetting', + valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelSetting', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings; }.property( @@ -85,26 +215,7 @@ disabledBinding: 'isDisabled' } ), - equalizerChannelIdLabel: SDL.Label.extend( - { - elementId: 'equalizerChannelIdLabel', - classNames: 'equalizerChannelIdLabel', - content: 'Channel id:', - } - ), - equalizerSettingsLabel:SDL.Label.extend({ - elementId:'equalizerSettingsLabel', - classNames:'equalizerSettingsLabel', - content:'Equalizer settings:' - } - ), - equalizerChannelNameLabel: SDL.Label.extend( - { - elementId: 'equalizerChannelNameLabel', - classNames: 'equalizerChannelNameLabel', - content: 'Channel name:', - } - ), + equalizerChannelNameCheckBox: Em.Checkbox.extend( { attributeBindings: ['disabled'], @@ -124,7 +235,7 @@ attributeBindings: ['disabled'], elementId:'equalizerChannelNameInput', classNames:'equalizerChannelNameInput', - valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelName', + valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelName', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings ? !SDL.MediaController.radioControlAudioValue.equalizerSettings @@ -141,7 +252,7 @@ attributeBindings: ['disabled'], elementId:'equalizerChannelIdInput', classNames:'equalizerChannelIdInput', - valueBinding:'SDL.MediaController.radioControlStruct.equalizerSettings.channelId', + valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelId', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings; }.property( @@ -155,7 +266,7 @@ attributeBindings: ['disabled'], elementId:'keepContextSelect', classNames:'keepContextSelect', - valueBinding: 'SDL.MediaController.radioControlStruct.keepContext', + valueBinding: 'SDL.MediaController.lastRadioControlStruct.keepContext', contentBinding: 'SDL.USBModel.boolStruct', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.keepContext; @@ -203,7 +314,8 @@ target: 'SDL.MediaController', action: 'saveButtonPress' } - ) + ), + equalizerSettings: EqualizerSettingsView } ), preferencesButton: Em.ContainerView.extend( @@ -236,3 +348,5 @@ ); + + diff --git a/css/media.css b/css/media.css index 1139d3859..45d457826 100644 --- a/css/media.css +++ b/css/media.css @@ -1446,4 +1446,103 @@ #tuneButtons .ffw-button.disabled > span { color: #999; -} \ No newline at end of file +} + +#EqualizerSettingsView{ + width: 300px; + height: 174px; + top: 80px; +} + +#EqualizerSettingsView .equalizerSettingsLabel { + display: block; + position: static; +} + +#EqualizerSettingsView .equalizerSettingsArray { + display: block; + position: static; + height: 147px; + border: 1px solid white; + margin: 5px 0px 0px 0px; +} + +#EqualizerSettingsView .equalizerSettingsAddButton { + z-index: 1002; + top: -3px; + left: 248px; + border: 1px solid white; + width: 50px; + height: 22px; + text-align: center; + line-height: 24px; +} + +#equalizerSettingsArray .deleteButton{ + z-index: 1001; + margin: 2px 0px 0px 2px; + background: black; +} + +#equalizerSettingsArray .leftButton{ + z-index: 1001; + margin: 5px 0px 0px 2px; + background: black; + left: 250px; +} + +#equalizerSettingsArray .rightbutton{ + z-index: 1001; + margin: 2px 0px 0px 2px; + background: black; + transform: rotate(180deg); + left: 274px; +} + +#equalizerSettingsArray .stateLabel{ + width: 109px; + top: 25px; + left: 117px; +} + +#equalizerSettingsArray .channelIdLabel{ + width: 100px; + top: 82px; + left: 10px; + position: absolute; +} + +#equalizerSettingsArray .channelNameLabel{ + width: 109px; + top: 102px; + left: 10px; + position: absolute; +} + +#equalizerSettingsArray .channelSettingLabel{ + width: 100px; + top: 122px; + left: 10px; + position: absolute; +} + +#equalizerSettingsArray .channelIdInput{ + width: 100px; + top: 82px; + left: 137px; + position: absolute; +} + +#equalizerSettingsArray .channelNameInput{ + width: 100px; + top: 102px; + left: 137px; + position: absolute; +} + +#equalizerSettingsArray .channelSettingInput{ + width: 100px; + top: 122px; + left: 137px; + position: absolute; +} diff --git a/images/media/left_button.png b/images/media/left_button.png new file mode 100644 index 0000000000000000000000000000000000000000..322fddcfaebdf422ea897dece2d9378e0e9f51c4 GIT binary patch literal 956 zcmV;t14I0YP)$`(_Mu z^+oX?C(mS1X8&0@E)^ZK06@0{=XoiE1Y z@w$`A%XlVFWtybTY z%jGhHAh1Lt!Lcm6>GgU?Y&P330Fcar%F`V#o(Gytru@#%PODn2wv!}TmY0`@V;Baf zr>C&Lzn@rGSoprHtLrfU9Q`BEU@#O83=G_@uCD%0DwRqE0s)SS5HK2zg5U37SzTRq zS}c}@?5P0YVuvj)E%{cfbwsPxI%G0gK91ul5Qg(&x zQmOPBK@b_u(!fY00*8l(?>LT&=NL2d@b>n00<+m{uiS3;7jn7$>UqsBEBq8N91a6E zK0f|-XlUrFSS(Iy_J3k;Zx67Zo}L#jm+LEvqDlyY$ZYk$f|1s{ySspi#p18W#>UE8 zTU#GhR#sjU2m}|P9LK@t<|YJ#L5RmMl@QQUHa0e*sV!3!^{3r#H|un|k&23n>q4P0 zvtTqCcgxGmD@7s^ zetdi!V;F{}Y5Kw7;2?6FoPMY~bL_v}r_<>y&}cM9ilW>SiRAO0ogJECm><^G);tpv e6WQIR%;7z#&wNoKKPaI90000 Date: Fri, 23 Mar 2018 12:17:40 +0200 Subject: [PATCH 048/102] Fixed "HMI_SETTINGS" displayMode --- app/controller/sdl/RController.js | 2 +- app/model/HmiSettingsModel.js | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index 60e4c45ea..99529d34e 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -219,7 +219,7 @@ SDL.RController = SDL.SDLController.extend( var next = this.nextElement(SDL.HmiSettingsModel.displayModeStruct, SDL.HmiSettingsModel.displayMode); SDL.HmiSettingsModel.set('displayMode',next); var data = { - displayMode: next + displayMode: SDL.HmiSettingsModel.getHmiSettingsControlData().displayMode } this.sendHMISettingsNotification(data); }, diff --git a/app/model/HmiSettingsModel.js b/app/model/HmiSettingsModel.js index b1937ef2f..61d4ff228 100644 --- a/app/model/HmiSettingsModel.js +++ b/app/model/HmiSettingsModel.js @@ -100,13 +100,12 @@ SDL.HmiSettingsModel = Em.Object.create({ this.set('distanceUnit',data.distanceUnit); } - properties = []; - for (var key in data) { - properties.push(key); - } - - var result = this.getHmiSettingsControlData(true); - return SDL.SDLController.filterObjectProperty(result, properties); + var result = { + temperatureUnit: this.temperatureUnit, + displayMode: this.displayMode, + distanceUnit: this.distanceUnit + }; + return result; }, getHmiSettingsControlData: function(){ @@ -115,7 +114,11 @@ SDL.HmiSettingsModel = Em.Object.create({ displayMode: this.displayMode, distanceUnit: this.distanceUnit }; - + if(result.displayMode == 'AUTO'){ + var time = new Date().toLocaleTimeString(); + time = parseInt(time.substring(0, time.indexOf(':'))); + result.displayMode = (time > 7 && time < 20? 'DAY': 'NIGHT'); + } return result; } }) From a7cb3d48128839f16789e8dbd1218e2ae793adc7 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Fri, 23 Mar 2018 12:40:35 +0200 Subject: [PATCH 049/102] Fixed sending parameters from RC_LIGHT --- app/StateManager.js | 2 +- app/controller/MediaController.js | 194 ++++++++++++++++++------------ app/model/LightModel.js | 4 +- app/model/media/BluetoothModel.js | 2 +- app/model/media/CDModel.js | 2 +- app/model/media/IPodModel.js | 2 +- app/model/media/LineInModel.js | 2 +- app/model/media/RadioModel.js | 2 +- app/model/media/USBModel.js | 2 +- app/view/media/audioView.js | 28 +++-- css/media.css | 31 ++--- 11 files changed, 162 insertions(+), 109 deletions(-) diff --git a/app/StateManager.js b/app/StateManager.js index a29d32909..dcba75c83 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -392,7 +392,7 @@ var StateManager = Em.StateManager.extend( SDL.MediaController.deactivateRadio(); SDL.MediaController.deactivateUSB(); SDL.MediaController.deactivateCD(); - SDL.MediaController.radioControlStruct.source='MOBILE_APP'; + SDL.MediaController.lastRadioControlStruct.source='MOBILE_APP'; var data = SDL.MediaController.getAudioControlData(); FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}}); if (SDL.SDLModel.data.mediaPlayerActive) { diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 17210d86a..98a28a468 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -35,6 +35,13 @@ SDL.MediaController = Em.Object.create( /** * Initial substate */ + init:function(){ + var size =this.lastRadioControlStruct.equalizerSettings.length-1; + this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length-1; + this.tempEqualizerSettings.channelName=this.lastRadioControlStruct.equalizerSettings[size].channelName; + this.tempEqualizerSettings.channelId=this.lastRadioControlStruct.equalizerSettings[size].channelId; + this.tempEqualizerSettings.channelSetting=this.lastRadioControlStruct.equalizerSettings[size].channelSetting; + }, activeState: 'media.player.cd', /** Current selected players module Data reference*/ //currentPlayerModuleData: SDL.CDModel, @@ -49,9 +56,18 @@ SDL.MediaController = Em.Object.create( keepContext:true, equalizerSettings:[{ channelSetting:50, - channelId: 50, - channelName: 'Default' - }], + channelId: 1, + channelName: 'Treble' + }, + { + channelSetting:50, + channelId: 2, + channelName: 'Midrange' + },{ + channelSetting:50, + channelId: 3, + channelName: 'Bass' + }], }, lastRadioControlStruct:{ @@ -59,16 +75,25 @@ SDL.MediaController = Em.Object.create( keepContext:true, equalizerSettings:[{ channelSetting:50, - channelId: 50, - channelName: 'Default' - }], + channelId: 1, + channelName: 'Treble' + }, + { + channelSetting:50, + channelId: 2, + channelName: 'Midrange' + },{ + channelSetting:50, + channelId: 3, + channelName: 'Bass' + }], }, - tempEqualizerSettIndex: 0, + tempEqualizerSettIndex: 3, tempEqualizerSettings: { - channelSetting:50, - channelId: 50, - channelName: 'Default' + // channelSetting:50, + // channelId: 50, + // channelName: 'Default' }, radioControlAudioValue: @@ -89,36 +114,48 @@ SDL.MediaController = Em.Object.create( false ], saveButtonPress:function(){ - var equalizerSettings={}; - if(this.radioControlStruct.equalizerSettings.channelSetting!=this.lastRadioControlStruct.equalizerSettings.channelSetting|| - this.radioControlStruct.equalizerSettings.channelId!=this.lastRadioControlStruct.equalizerSettings.channelId) - { - equalizerSettings.channelId=parseInt(this.radioControlStruct.equalizerSettings.channelId); - equalizerSettings.channelSetting=parseInt(this.radioControlStruct.equalizerSettings.channelSetting); + + var equalizerSettings = []; + var lengthLast = this.lastRadioControlStruct.equalizerSettings.length; + var lengthCurrent = this.radioControlStruct.equalizerSettings.length; + if(lengthLast != lengthCurrent){ + for(var i =lengthCurrent;icurrentLength) { + this.lastRadioControlStruct.equalizerSettings.push(data.equalizerSettings[i]); + } + else{ if(data.equalizerSettings[i].channelSetting!=null) { - this.radioControlStruct.equalizerSettings.channelSetting = data.equalizerSettings[i].channelSetting; + this.lastRadioControlStruct.equalizerSettings[i].channelSetting= + SDL.deepCopy(data.equalizerSettings[i].channelSetting); } if(data.equalizerSettings[i].channelId!=null) { - this.radioControlStruct.equalizerSettings.channelId = data.equalizerSettings[i].channelId; + this.lastRadioControlStruct.equalizerSettings[i].channelId = + SDL.deepCopy(data.equalizerSettings[i].channelId); } if(data.equalizerSettings[i].channelName!=null) { - this.radioControlStruct.equalizerSettings.channelName = data.equalizerSettings[i].channelName; + this.lastRadioControlStruct.equalizerSettings[i].channelName = + SDL.deepCopy(data.equalizerSettings[i].channelName); } } } - properties = []; - for (var key in data) { - properties.push(key); + this.setLastData(); } + return data; + // properties = []; + // for (var key in data) { + // properties.push(key); + // } - var result = this.getAudioControlData(true); - return SDL.SDLController.filterObjectProperty(result, properties); + // var result = this.getAudioControlData(true); + // return SDL.SDLController.filterObjectProperty(result, properties); }, getAudioControlCapabilities:function(){ var result=[]; diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 8bbe72ff9..62dcf1205 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -185,15 +185,13 @@ SDL.LightModel = Em.Object.create({ data.lightState[i].sRGBColor; } if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ - data.lightState[i] = SDL.deepCopy(this.lightState[j]); - SDL.LightModel.set('lightSettings',data.lightState[i]) + SDL.LightModel.set('lightSettings',this.lightState[j]) } } } } this.set('lightState',tempState); - var result = this.getLightControlData(true); return {'lightState' : data.lightState}; }, diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js index 28564ca31..f65e12362 100644 --- a/app/model/media/BluetoothModel.js +++ b/app/model/media/BluetoothModel.js @@ -44,7 +44,7 @@ init: function() { }, setSource:function() { - SDL.MediaController.radioControlStruct.source='BLUETOOTH_STEREO_BTST'; + SDL.MediaController.lastRadioControlStruct.source='BLUETOOTH_STEREO_BTST'; }, PlayList: SDL.Playlist.create({ diff --git a/app/model/media/CDModel.js b/app/model/media/CDModel.js index d41bd3d17..867dc5b32 100644 --- a/app/model/media/CDModel.js +++ b/app/model/media/CDModel.js @@ -153,7 +153,7 @@ sendAudioNotification:function() }, setSource:function() { - SDL.MediaController.radioControlStruct.source='CD'; + SDL.MediaController.lastRadioControlStruct.source='CD'; }, } ); diff --git a/app/model/media/IPodModel.js b/app/model/media/IPodModel.js index 48d7cd4fd..5bdd3a39b 100644 --- a/app/model/media/IPodModel.js +++ b/app/model/media/IPodModel.js @@ -39,7 +39,7 @@ sendAudioNotification:function() }, setSource:function() { - SDL.MediaController.radioControlStruct.source='IPOD'; + SDL.MediaController.lastRadioControlStruct.source='IPOD'; }, init:function(){ this._super(); diff --git a/app/model/media/LineInModel.js b/app/model/media/LineInModel.js index b4d186dde..677a84bca 100644 --- a/app/model/media/LineInModel.js +++ b/app/model/media/LineInModel.js @@ -39,7 +39,7 @@ sendAudioNotification:function() }, setSource:function() { - SDL.MediaController.radioControlStruct.source='LINE_IN'; + SDL.MediaController.lastRadioControlStruct.source='LINE_IN'; }, init:function(){ this._super(); diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index d0b5c28b8..cf3d0fbc1 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -1469,7 +1469,7 @@ SDL.RadioModel = Em.Object.create({ }, setSource:function() { - SDL.MediaController.radioControlStruct.source='RADIO_TUNER'; + SDL.MediaController.lastRadioControlStruct.source='RADIO_TUNER'; }, sendButtonPress: function() { var currentData = SDL.deepCopy(this.getCurrentOptions()); diff --git a/app/model/media/USBModel.js b/app/model/media/USBModel.js index 818e76a57..108123f91 100644 --- a/app/model/media/USBModel.js +++ b/app/model/media/USBModel.js @@ -65,7 +65,7 @@ boolStruct: [ }, setSource:function() { - SDL.MediaController.radioControlStruct.source='USB'; + SDL.MediaController.lastRadioControlStruct.source='USB'; }, PlayList: SDL.Playlist.create({ selectedIndex: 0, diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index a32c35200..63d1a9859 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -47,7 +47,7 @@ EqualizerSettingsView = Em.ContainerView.create({ 'deleteButton', 'leftButton', 'rightbutton', - 'stateLabel', + 'stateInput', 'channelIdLabel', 'channelNameLabel', 'channelSettingLabel', @@ -56,10 +56,11 @@ EqualizerSettingsView = Em.ContainerView.create({ 'channelSettingInput' ], - stateLabel: SDL.Label.extend({ - elementId: 'stateLabel', - classNames: 'stateLabel', - content: '' + stateInput: Ember.TextField.extend({ + elementId: 'stateInput', + classNames: 'stateInput', + valueBinding: 'SDL.MediaController.tempEqualizerSettIndex', + disabled:true }), channelIdLabel: SDL.Label.extend({ @@ -130,11 +131,14 @@ EqualizerSettingsView = Em.ContainerView.create({ 'leftButton' ], action: function(){ - if(SDL.MediaController.tempEqualizerSettIndex == 0){ + if(SDL.MediaController.tempEqualizerSettIndex-1 == 0){ return; } + SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.tempEqualizerSettIndex-1); SDL.MediaController.set('tempEqualizerSettings', - SDL.MediaController.lastRadioControlStruct.equalizerSettings[--SDL.MediaController.tempEqualizerSettIndex]); + SDL.MediaController.lastRadioControlStruct.equalizerSettings + [SDL.MediaController.tempEqualizerSettIndex-1]); + }, icon: 'images/media/left_button.png', onDown: false, @@ -147,11 +151,12 @@ EqualizerSettingsView = Em.ContainerView.create({ action: function(){ var length = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; - if(SDL.MediaController.tempEqualizerSettIndex == length - 1){ + if(SDL.MediaController.tempEqualizerSettIndex == length ){ return; } + SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.tempEqualizerSettIndex+1); SDL.MediaController.set('tempEqualizerSettings', - SDL.MediaController.lastRadioControlStruct.equalizerSettings[++SDL.MediaController.tempEqualizerSettIndex]); + SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); }, icon: 'images/media/left_button.png', onDown: false, @@ -168,8 +173,9 @@ EqualizerSettingsView = Em.ContainerView.create({ channelId: 0, channelName: 'Default' }); - SDL.MediaController.tempEqualizerSettIndex = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length - 1; - SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); + //SDL.MediaController.tempEqualizerSettIndex = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; + SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.lastRadioControlStruct.equalizerSettings.length); + SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); }, text: 'Add', onDown: false diff --git a/css/media.css b/css/media.css index 45d457826..22c27b3c4 100644 --- a/css/media.css +++ b/css/media.css @@ -1236,15 +1236,15 @@ border: 1px solid #393939; } -.option{ - top:50px; +.option { + top: 77px; width: 300px; height: 300px; background-color: black; border: 1px solid white; z-index: 1000; padding: 10px; - + left: 238px; } .pref{ @@ -1367,14 +1367,14 @@ top:140px; font-size:14px; } - .option .save{ - top: 260px; - left: 150px; - width: 70px; - height: 38px; - line-height: 38px; - text-align: center; - } + .option .save { + top: 260px; + left: 128px; + width: 70px; + height: 38px; + line-height: 38px; + text-align: center; +} .calc_container .minus { height: 24px; @@ -1499,10 +1499,13 @@ left: 274px; } -#equalizerSettingsArray .stateLabel{ - width: 109px; +#equalizerSettingsArray .stateInput{ + width: 27px; top: 25px; - left: 117px; + left: 180px; + position:absolute; + background: black; + font-size: 125%; } #equalizerSettingsArray .channelIdLabel{ From fa609ac931017caaf30fd4b76f3c75bb334f53c5 Mon Sep 17 00:00:00 2001 From: Valerii Date: Mon, 26 Mar 2018 15:26:12 +0300 Subject: [PATCH 050/102] Bug fix at the audio modul At the PR were fixed next case: -HMI don't send keeoContext parameter in GetInteriorVehicleData response -HMI change source to MOBILE_APP -HMI change mobile source IPOD, selected on the mobile device -HMI shows all parameter after RC.SetInteriorVehicleData request --- app/controller/MediaController.js | 225 +++++++++++++++------- app/controller/sdl/Abstract/Controller.js | 2 + app/model/SeatModel.js | 20 +- app/model/media/BluetoothModel.js | 2 +- app/model/media/IPodModel.js | 2 +- app/model/media/LineInModel.js | 2 +- app/view/home/statusMediaView.js | 6 + app/view/media/audioView.js | 61 +++--- app/view/settings/SeatView.js | 2 +- css/media.css | 20 +- 10 files changed, 228 insertions(+), 114 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 98a28a468..1c78e9b00 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -36,11 +36,10 @@ SDL.MediaController = Em.Object.create( * Initial substate */ init:function(){ - var size =this.lastRadioControlStruct.equalizerSettings.length-1; - this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length-1; - this.tempEqualizerSettings.channelName=this.lastRadioControlStruct.equalizerSettings[size].channelName; - this.tempEqualizerSettings.channelId=this.lastRadioControlStruct.equalizerSettings[size].channelId; - this.tempEqualizerSettings.channelSetting=this.lastRadioControlStruct.equalizerSettings[size].channelSetting; + this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length; + this.tempEqualizerSettings.channelName=this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelName; + this.tempEqualizerSettings.channelId=parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelId); + this.tempEqualizerSettings.channelSetting=parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelSetting); }, activeState: 'media.player.cd', /** Current selected players module Data reference*/ @@ -50,10 +49,11 @@ SDL.MediaController = Em.Object.create( /** * Current volume level in percents */ + keepContext :false, + tempSource:'', currentVolume: 50, radioControlStruct:{ source:'AUDIO', - keepContext:true, equalizerSettings:[{ channelSetting:50, channelId: 1, @@ -72,7 +72,6 @@ SDL.MediaController = Em.Object.create( lastRadioControlStruct:{ source:'AUDIO', - keepContext:true, equalizerSettings:[{ channelSetting:50, channelId: 1, @@ -91,9 +90,6 @@ SDL.MediaController = Em.Object.create( tempEqualizerSettIndex: 3, tempEqualizerSettings: { - // channelSetting:50, - // channelId: 50, - // channelName: 'Default' }, radioControlAudioValue: @@ -116,15 +112,30 @@ SDL.MediaController = Em.Object.create( saveButtonPress:function(){ var equalizerSettings = []; + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelId= + parseInt(this.tempEqualizerSettings.channelId); + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelSetting= + parseInt(this.tempEqualizerSettings.channelSetting); + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelName= + this.tempEqualizerSettings.channelName; + var lengthLast = this.lastRadioControlStruct.equalizerSettings.length; + for(var i;ilengthCurrent){ if(lengthLast != lengthCurrent){ for(var i =lengthCurrent;icurrentLength) { + temp={}; this.lastRadioControlStruct.equalizerSettings.push(data.equalizerSettings[i]); + temp.channelId=parseInt(data.equalizerSettings[i].channelId); + temp.channelSetting=parseInt(data.equalizerSettings[i].channelSetting); + resultNew.equalizerSettings.push(temp); } else{ + temp={}; if(data.equalizerSettings[i].channelSetting!=null) { this.lastRadioControlStruct.equalizerSettings[i].channelSetting= SDL.deepCopy(data.equalizerSettings[i].channelSetting); + + temp.channelSetting=parseInt(data.equalizerSettings[i].channelSetting); + } if(data.equalizerSettings[i].channelId!=null) { this.lastRadioControlStruct.equalizerSettings[i].channelId = - SDL.deepCopy(data.equalizerSettings[i].channelId); - } - if(data.equalizerSettings[i].channelName!=null) - { - this.lastRadioControlStruct.equalizerSettings[i].channelName = - SDL.deepCopy(data.equalizerSettings[i].channelName); + SDL.deepCopy(parseInt(data.equalizerSettings[i].channelId)); + temp.channelId=parseInt(data.equalizerSettings[i].channelId); } + resultNew.equalizerSettings.push(temp); } } this.setLastData(); + result=SDL.deepCopy(resultNew); } - return data; - // properties = []; - // for (var key in data) { - // properties.push(key); - // } - - // var result = this.getAudioControlData(true); - // return SDL.SDLController.filterObjectProperty(result, properties); + + return result; }, getAudioControlCapabilities:function(){ var result=[]; diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index e4d3e1d3b..784a3f86f 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -210,6 +210,7 @@ SDL.SDLController = Em.Object.extend( * @param status */ onEventChanged: function(reason, status) { + if(!SDL.MediaController.keepContext){ var eventName = SDL.SDLModel.data.onEventChangedEnum[reason]; if (!eventName) { return; @@ -218,6 +219,7 @@ SDL.SDLController = Em.Object.extend( SDL.SDLModel.data.mediaPlayerActive = status; } FFW.BasicCommunication.OnEventChanged(eventName, status); + } }, /** * Method clears all applications data and unregister models diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 6435b3e7c..20a5455f3 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -116,7 +116,7 @@ SDL.SeatModel = Em.Object.create({ seatMemoryAction: { id: 1, label: 'Label value', - action: 'SAVE' + action: 'NONE' }, seatControlData: Em.Object.create({ @@ -229,7 +229,7 @@ SDL.SeatModel = Em.Object.create({ init: function(){ this.seatControlData.id = this.supportedSeatStruct[0]; - + //tempMessageCussion=SDL.deepCopy(this.massageCushionFirmness); var length = this.massageZoneStruct.length; for(var i = 0; i < length; ++i){ this.seatControlData.massageMode.push( @@ -237,9 +237,17 @@ SDL.SeatModel = Em.Object.create({ this.seatControlData.massageMode[i].massageZone = this.massageZoneStruct[i]; } + for(var i=0;i{{SDL.CDModel.statusBar}}' + '{{SDL.USBModel.statusBar}}' + '{{SDL.RadioModel.statusBar}}' + + '{{SDL.IPodModel.statusBar}}' + + '{{SDL.BluetoothModel.statusBar}}' + + '{{SDL.LineInModel.statusBar}}' + // SDL '{{SDL.SDLModel.applicationStatusBar}}' + '' + @@ -89,6 +92,9 @@ SDL.StatusMediaView = Em.ContainerView.extend({ '{{bindAttr class="SDL.CDModel.active:cdIco"}}' + '{{bindAttr class="SDL.USBModel.active:usbIco"}}' + '{{bindAttr class="SDL.RadioModel.active:fmIco"}}' + + '{{bindAttr class="SDL.IPodModel.active:ipodIco"}}' + + '{{bindAttr class="SDL.BluetoothModel.active:bluetoothIco"}}' + + '{{bindAttr class="SDL.LineInModel.active:lineInIco"}}' + // SDL '{{bindAttr class="SDL.SDLModel.data.limitedExist:appIco"}}>' + '' + '' diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index 63d1a9859..6c028279b 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -88,19 +88,31 @@ EqualizerSettingsView = Em.ContainerView.create({ action: function(){ var length = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; - if(length == 1){ + if(SDL.MediaController.tempEqualizerSettIndex<=3){ return; } - - for(var i = SDL.MediaController.tempEqualizerSettIndex; i < length - 1; ++i){ + if(SDL.MediaController.tempEqualizerSettIndex!=1) + { + for(var i = SDL.MediaController.tempEqualizerSettIndex; i < length; ++i){ + SDL.MediaController.lastRadioControlStruct.equalizerSettings[i-1] = + SDL.MediaController.lastRadioControlStruct.equalizerSettings[i]; + } + } + else{ + for(var i = 0; i < length ; ++i){ SDL.MediaController.lastRadioControlStruct.equalizerSettings[i] = SDL.MediaController.lastRadioControlStruct.equalizerSettings[i+1]; } + } SDL.MediaController.lastRadioControlStruct.equalizerSettings.pop(); - if(SDL.MediaController.tempEqualizerSettIndex != length-1){ - SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); + if(SDL.MediaController.tempEqualizerSettIndex != 1){ + SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.tempEqualizerSettIndex-1); + SDL.MediaController.set('tempEqualizerSettings', + SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); + } else{ - SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex - 1]); + SDL.MediaController.set('tempEqualizerSettings', + SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); } }, @@ -134,6 +146,9 @@ EqualizerSettingsView = Em.ContainerView.create({ if(SDL.MediaController.tempEqualizerSettIndex-1 == 0){ return; } + + SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]= + SDL.MediaController.tempEqualizerSettings; SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.tempEqualizerSettIndex-1); SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings @@ -170,12 +185,11 @@ EqualizerSettingsView = Em.ContainerView.create({ action: function(){ SDL.MediaController.lastRadioControlStruct.equalizerSettings.push({ channelSetting: 0, - channelId: 0, + channelId: 1, channelName: 'Default' }); - //SDL.MediaController.tempEqualizerSettIndex = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.lastRadioControlStruct.equalizerSettings.length); - SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex]); + SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); }, text: 'Add', onDown: false @@ -199,8 +213,8 @@ SDL.audioView= Em.ContainerView.extend( classNameBindings: ['SDL.MediaController.optionsEnabled:active_state:inactive_state'], childViews:[ - 'keepContextSelect', - 'keepContextLabel', + // 'keepContextSelect', + // 'keepContextLabel', 'volumeInput', 'volumeLabel', 'volumeCheckBox', @@ -212,6 +226,7 @@ SDL.audioView= Em.ContainerView.extend( attributeBindings: ['disabled'], elementId:'equalizerChannelSettingInput', classNames:'equalizerChannelSettingInput', + type:'Number', valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelSetting', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings; @@ -241,6 +256,7 @@ SDL.audioView= Em.ContainerView.extend( attributeBindings: ['disabled'], elementId:'equalizerChannelNameInput', classNames:'equalizerChannelNameInput', + valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelName', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings ? @@ -258,6 +274,7 @@ SDL.audioView= Em.ContainerView.extend( attributeBindings: ['disabled'], elementId:'equalizerChannelIdInput', classNames:'equalizerChannelIdInput', + type:'Number', valueBinding:'SDL.MediaController.lastRadioControlStruct.equalizerSettings.channelId', isDisabled: function() { return !SDL.MediaController.radioControlAudioValue.equalizerSettings; @@ -267,28 +284,6 @@ SDL.audioView= Em.ContainerView.extend( disabledBinding: 'isDisabled' } ), - keepContextSelect: Em.Select.extend( - { - attributeBindings: ['disabled'], - elementId:'keepContextSelect', - classNames:'keepContextSelect', - valueBinding: 'SDL.MediaController.lastRadioControlStruct.keepContext', - contentBinding: 'SDL.USBModel.boolStruct', - isDisabled: function() { - return !SDL.MediaController.radioControlAudioValue.keepContext; - }.property( - 'SDL.MediaController.radioControlAudioValue.keepContext' - ), - disabledBinding: 'isDisabled' - } - ), - keepContextLabel: SDL.Label.extend( - { - elementId: 'keepContextLabel', - classNames: 'keepContextLabel', - content: 'Keep context:' - } - ), volumeInput: Ember.TextField.extend( { elementId:'volumeInput', diff --git a/app/view/settings/SeatView.js b/app/view/settings/SeatView.js index 4b151647b..ad62d4ff6 100644 --- a/app/view/settings/SeatView.js +++ b/app/view/settings/SeatView.js @@ -633,7 +633,7 @@ SDL.SeatView = Em.ContainerView.create({ label:SDL.Label.extend({ elementId: 'label', classNames: 'label', - content: 'Horisontal' + content: 'Horizontal' }), input:Ember.TextField.extend({ diff --git a/css/media.css b/css/media.css index 22c27b3c4..26ee56b9f 100644 --- a/css/media.css +++ b/css/media.css @@ -1221,6 +1221,15 @@ .usbIco { background: url(../images/media/ico_usb.png) no-repeat !important } +.ipodIco { + background: url(../images/media/ico_ipod.png) no-repeat !important +} +.bluetoothIco { + background: url(../images/media/ico_bluetooth.png) no-repeat !important +} +.lineInIco { + background: url(../images/media/line_in.png) no-repeat !important +} /* .audioIco { background: url(../images/media/ico_audio.png) no-repeat !important } */ @@ -1265,7 +1274,7 @@ z-index: 900; text-align: center; } -.option .keepContextLabel{ +/* .option .keepContextLabel{ left:25px; top:20px; } @@ -1278,7 +1287,7 @@ height: 20px; color: white; background: #393939; -} +} */ .option .equalizerSettingsCheckBox{ position: absolute; left: 5px; @@ -1313,7 +1322,7 @@ background: #393939; } .option .volumeInput{ - top: 50px; + top: 30px; position: absolute; width: 150px; left: 130px; @@ -1323,12 +1332,12 @@ } .option .volumeLabel{ left:25px; - top:50px; + top:30px; } .option .volumeCheckBox{ position: absolute; left: 5px; - top: 50px; + top: 30px; } .option .equalizerChannelIdInput{ top: 110px; @@ -1505,6 +1514,7 @@ left: 180px; position:absolute; background: black; + color:white; font-size: 125%; } From a062a40da6c051bfcab690dcbba960879f428b82 Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 4 Apr 2018 12:20:51 +0300 Subject: [PATCH 051/102] Fix logic with parameter keepContext Fix logic with parameter keepContext true or false. --- app/controller/MediaController.js | 779 +++++++++++++--------- app/controller/sdl/Abstract/Controller.js | 2 - app/model/media/BluetoothModel.js | 2 +- app/model/media/RadioModel.js | 6 +- app/view/media/audioView.js | 64 +- css/media.css | 2 +- ffw/RCRPC.js | 5 +- 7 files changed, 492 insertions(+), 368 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 1c78e9b00..6e3cca706 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -35,11 +35,21 @@ SDL.MediaController = Em.Object.create( /** * Initial substate */ - init:function(){ - this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length; - this.tempEqualizerSettings.channelName=this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelName; - this.tempEqualizerSettings.channelId=parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelId); - this.tempEqualizerSettings.channelSetting=parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelSetting); + init: function () { + //this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length; + this.tempEqualizerSettIndex = 1; + this.tempEqualizerSettings.channelName = this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelName; + this.tempEqualizerSettings.channelId = parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelId); + this.tempEqualizerSettings.channelSetting = parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelSetting); + for (var i = 4; i <= 100; i++) { + temp = {}; + temp.channelId = parseInt(i); + temp.channelSetting = parseInt(i); + temp.channelName = 'Name' + ' ' + i.toString(); + this.lastRadioControlStruct.equalizerSettings.push(temp); + this.radioControlStruct.equalizerSettings.push(temp); + } + }, activeState: 'media.player.cd', /** Current selected players module Data reference*/ @@ -49,172 +59,161 @@ SDL.MediaController = Em.Object.create( /** * Current volume level in percents */ - keepContext :false, - tempSource:'', - currentVolume: 50, - radioControlStruct:{ - source:'AUDIO', - equalizerSettings:[{ - channelSetting:50, + keepContext: false, + tempSource: 'MOBILE_APP', + currentVolume: 50, + radioControlStruct: { + source: 'AUDIO', + equalizerSettings: [{ + channelSetting: 50, channelId: 1, channelName: 'Treble' }, - { - channelSetting:50, + { + channelSetting: 50, channelId: 2, channelName: 'Midrange' - },{ - channelSetting:50, + }, { + channelSetting: 50, channelId: 3, channelName: 'Bass' - }], - }, - - lastRadioControlStruct:{ - source:'AUDIO', - equalizerSettings:[{ - channelSetting:50, + }], + }, + + lastRadioControlStruct: { + source: 'AUDIO', + equalizerSettings: [{ + channelSetting: 50, channelId: 1, channelName: 'Treble' }, - { - channelSetting:50, + { + channelSetting: 50, channelId: 2, channelName: 'Midrange' - },{ - channelSetting:50, + }, { + channelSetting: 50, channelId: 3, channelName: 'Bass' - }], - }, + }], + }, - tempEqualizerSettIndex: 3, - tempEqualizerSettings: { - }, + tempEqualizerSettIndex: 3, + tempEqualizerSettings: { + }, - radioControlAudioValue: - { - keepContext:true, - volume:true, - equalizerSettings:true, - channelName:true + radioControlAudioValue: + { + keepContext: true, + volume: true, + equalizerSettings: true, + channelName: true - }, - //lastParams:{}, + }, + //lastParams:{}, - usbControl:{ + usbControl: { keepContext: false }, boolStruct: [ - true, - false + true, + false ], - saveButtonPress:function(){ + saveButtonPress: function () { - var equalizerSettings = []; - this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelId= - parseInt(this.tempEqualizerSettings.channelId); - this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelSetting= - parseInt(this.tempEqualizerSettings.channelSetting); - this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex-1].channelName= - this.tempEqualizerSettings.channelName; + var equalizerSettings = []; + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelId = + parseInt(this.tempEqualizerSettings.channelId); + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelSetting = + parseInt(this.tempEqualizerSettings.channelSetting); + this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelName = + this.tempEqualizerSettings.channelName; var lengthLast = this.lastRadioControlStruct.equalizerSettings.length; - for(var i;ilengthCurrent){ - if(lengthLast != lengthCurrent){ - for(var i =lengthCurrent;i lengthCurrent) { + if (lengthLast != lengthCurrent) { + for (var i = lengthCurrent; i < lengthLast; i++) { + equalizerSettings.push(this.lastRadioControlStruct.equalizerSettings[i]); + } } - } - for (var i=0;i 0) { this.set('currentVolume', this.currentVolume - 1); - if(this.radioControlAudioValue.volume) - { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'volume':this.currentVolume}}); + if (this.radioControlAudioValue.volume) { + FFW.RC.onInteriorVehicleDataNotification({ moduleType: 'AUDIO', audioControlData: { 'volume': this.currentVolume } }); } } }, /** * Switching off CD */ - deactivateCD: function() { + deactivateCD: function () { SDL.CDModel.set('active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.bluetooth.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.ipod.active', false); }, /** * Switching off USB */ - deactivateUSB: function() { + deactivateUSB: function () { SDL.USBModel.set('active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.cd.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.ipod.active', false); }, /** * Switching off Radio */ - deactivateRadio: function() { + deactivateRadio: function () { SDL.RadioModel.set('active', false); + SDL.States.set('media.player.cd.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.bluetooth.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.ipod.active', false); }, - deactivateBluetooth: function(){ - SDL.BluetoothModel.set('active',false); - }, - deactivateLineIn: function(){ - SDL.LineInModel.set('active',false); - }, - deactivateIPod:function(){ - SDL.IPodModel.set('active',false); + deactivateBluetooth: function () { + SDL.BluetoothModel.set('active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.cd.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.ipod.active', false); + }, + deactivateLineIn: function () { + SDL.LineInModel.set('active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.bluetooth.active', false); + SDL.States.set('media.player.cd.active', false); + SDL.States.set('media.player.ipod.active', false); + }, + deactivateIPod: function () { + SDL.IPodModel.set('active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.bluetooth.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.cd.active', false); + }, + deactivateAll:function(){ + SDL.States.set('media.player.cd.active', false); + SDL.States.set('media.player.usb.active', false); + SDL.States.set('media.player.radio.active', false); + SDL.States.set('media.player.lineIn.active', false); + SDL.States.set('media.player.ipod.active', false); + SDL.States.set('media.player.bluetooth.active', false); }, /** On player module enter event */ - onPlayerEnter: function(data, state) { + onPlayerEnter: function (data, state) { if (this.currentSelectedPlayer) { this.currentSelectedPlayer.pause(); } @@ -371,43 +424,43 @@ SDL.MediaController = Em.Object.create( /** * Player Prev track event */ - prevTrack: function() { + prevTrack: function () { this.currentSelectedPlayer.prevTrackPress(); }, /** * Player Play track event */ - playTrack: function() { + playTrack: function () { this.currentSelectedPlayer.playTrackPress(); }, /** * Player Next track event */ - nextTrack: function() { + nextTrack: function () { this.currentSelectedPlayer.nextTrackPress(); }, /** * Turn on shuffle help video event */ - turnOnShuffle: function() { + turnOnShuffle: function () { this.currentSelectedPlayer.shufflePress(); }, /** * Repeat mode pressed */ - repeatPress: function() { + repeatPress: function () { this.currentSelectedPlayer.repeatPress(); }, /** * Eject/insert CD */ - ejectCD: function() { + ejectCD: function () { this.currentSelectedPlayer.ejectPress(); }, /** * Change media audio source */ - changeSource: function() { + changeSource: function () { var is_background = SDL.States.currentState.get('path').indexOf('media.') < 0; @@ -424,15 +477,15 @@ SDL.MediaController = Em.Object.create( this.changeSourceFromUSB(is_background); break; } - case 'media.player.bluetooth':{ + case 'media.player.bluetooth': { this.changeSourceFromBluetooth(is_background); break; } - case 'media.player.lieIn':{ + case 'media.player.lieIn': { this.changeSourceFromLineIn(is_background); break; } - case 'media.player.ipod':{ + case 'media.player.ipod': { this.changeSourceFromIpod(is_background); break; } @@ -445,7 +498,7 @@ SDL.MediaController = Em.Object.create( * Switches to next after radio source * @param is source switched from background or not */ - changeSourceFromRadio: function(is_background) { + changeSourceFromRadio: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateRadio(); this.turnOnCD(); @@ -457,7 +510,7 @@ SDL.MediaController = Em.Object.create( * Switches to next after CD source * @param is source switched from background or not */ - changeSourceFromCD: function(is_background) { + changeSourceFromCD: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateCD(); this.turnOnUSB(); @@ -469,7 +522,7 @@ SDL.MediaController = Em.Object.create( * Switches to next after USB source * @param is source switched from background or not */ - changeSourceFromUSB: function(is_background) { + changeSourceFromUSB: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateUSB(); if (SDL.SDLMediaController.currentAppId != null && !is_background) { @@ -481,7 +534,7 @@ SDL.MediaController = Em.Object.create( SDL.States.goToStates(old_state); } }, - changeSourceFromBluetooth: function(is_background){ + changeSourceFromBluetooth: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateBluetooth(); this.turnOnLineIn(); @@ -489,7 +542,7 @@ SDL.MediaController = Em.Object.create( SDL.States.goToStates(old_state); } }, - changeSourceFromLineIn: function(is_background){ + changeSourceFromLineIn: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateLineIn(); this.turnOnIpod(); @@ -497,7 +550,7 @@ SDL.MediaController = Em.Object.create( SDL.States.goToStates(old_state); } }, - changeSourceFromIpod: function(is_background){ + changeSourceFromIpod: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.deactivateIpod(); this.turnOnIpod(); @@ -509,7 +562,7 @@ SDL.MediaController = Em.Object.create( * Switches to next after unknown source * @param is source switched from background or not */ - changeSourceFromUnknown: function(is_background) { + changeSourceFromUnknown: function (is_background) { var old_state = SDL.States.currentState.get('path'); this.turnOnRadio(); if (is_background) { @@ -517,140 +570,272 @@ SDL.MediaController = Em.Object.create( } }, - getAudioControlData:function() - { - if(this.keepContext) - { - return this.getResultWithKeepContext(); - } - var size= this.lastRadioControlStruct.equalizerSettings.length; - for(var i=0;icurrentLength) - { - temp={}; - this.lastRadioControlStruct.equalizerSettings.push(data.equalizerSettings[i]); - temp.channelId=parseInt(data.equalizerSettings[i].channelId); - temp.channelSetting=parseInt(data.equalizerSettings[i].channelSetting); - resultNew.equalizerSettings.push(temp); - } - else{ - temp={}; - if(data.equalizerSettings[i].channelSetting!=null) - { - this.lastRadioControlStruct.equalizerSettings[i].channelSetting= - SDL.deepCopy(data.equalizerSettings[i].channelSetting); - - temp.channelSetting=parseInt(data.equalizerSettings[i].channelSetting); - - } - if(data.equalizerSettings[i].channelId!=null) - { - this.lastRadioControlStruct.equalizerSettings[i].channelId = - SDL.deepCopy(parseInt(data.equalizerSettings[i].channelId)); - temp.channelId=parseInt(data.equalizerSettings[i].channelId); + for (var i = 0; i < dataLength; i++) { + for (var j = 0; j < currentLength; j++) { + if (data.equalizerSettings[i].channelId == this.lastRadioControlStruct.equalizerSettings[j].channelId) { + this.lastRadioControlStruct.equalizerSettings[j].channelSetting = SDL.deepCopy(data.equalizerSettings[i].channelSetting); + if (j == this.tempEqualizerSettIndex - 1) { + this.set('tempEqualizerSettings.equalizerSettings', data.equalizerSettings[i].equalizerSettings); + } } - resultNew.equalizerSettings.push(temp); } } + resultNew.equalizerSettings = SDL.deepCopy(this.lastRadioControlStruct.equalizerSettings); + + this.setLastData(); - result=SDL.deepCopy(resultNew); + result = SDL.deepCopy(resultNew); + } + + return result; + }, + setAudioControlData: function (data) { + result = {}; + //this.keepContext=data.keepContext===true; + + if (data.source != null) { + this.set('lastRadioControlStruct.source', data.source); + this.switchSource(data.source); + result.source = data.source; + } + if (data.volume != null) { + this.set('currentVolume', data.volume); + result.volume = data.volume; + } + + if (data.equalizerSettings != null) { + var dataLength = data.equalizerSettings.length; + var currentLength = this.lastRadioControlStruct.equalizerSettings.length; + resultNew = { equalizerSettings: [] }; + if (result.source != null) { + resultNew.source = data.source; + } + if (result.volume != null) { + resultNew.volume = data.volume; + } + for (var i = 0; i < dataLength; i++) { + for (var j = 0; j < currentLength; j++) { + if (data.equalizerSettings[i].channelId == this.lastRadioControlStruct.equalizerSettings[j].channelId) { + this.lastRadioControlStruct.equalizerSettings[j].channelSetting = SDL.deepCopy(data.equalizerSettings[i].channelSetting); + if (j == this.tempEqualizerSettIndex - 1) { + this.set('tempEqualizerSettings.equalizerSettings', data.equalizerSettings[i].equalizerSettings); + } + } + } } + resultNew.equalizerSettings = SDL.deepCopy(this.lastRadioControlStruct.equalizerSettings); - return result; + + this.setLastData(); + result = SDL.deepCopy(resultNew); + } + + return result; }, - getAudioControlCapabilities:function(){ - var result=[]; + getAudioControlCapabilities: function () { + var result = []; var capabilities = { - moduleName :'AudioControlCapabilities', + moduleName: 'AudioControlCapabilities', sourceAvailable: true, - volumeAvailable : true, - equalizerAvailable : true, - equalizerMaxChannelId : 100 + volumeAvailable: true, + equalizerAvailable: true, + equalizerMaxChannelId: 100 }; result.push(capabilities); return result; @@ -658,22 +843,22 @@ SDL.MediaController = Em.Object.create( /** * turn on scan event */ - turnOnScan: function() { + turnOnScan: function () { }, /** * turn on more info event */ - turnOnMoreInfo: function() { + turnOnMoreInfo: function () { }, /** * turn on options event */ - turnOnOptions: function() { + turnOnOptions: function () { }, /** * turn on browse event */ - turnOnBrowse: function() { + turnOnBrowse: function () { } } ); diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index 784a3f86f..e4d3e1d3b 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -210,7 +210,6 @@ SDL.SDLController = Em.Object.extend( * @param status */ onEventChanged: function(reason, status) { - if(!SDL.MediaController.keepContext){ var eventName = SDL.SDLModel.data.onEventChangedEnum[reason]; if (!eventName) { return; @@ -219,7 +218,6 @@ SDL.SDLController = Em.Object.extend( SDL.SDLModel.data.mediaPlayerActive = status; } FFW.BasicCommunication.OnEventChanged(eventName, status); - } }, /** * Method clears all applications data and unregister models diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js index 05245c92f..55d6baa24 100644 --- a/app/model/media/BluetoothModel.js +++ b/app/model/media/BluetoothModel.js @@ -28,7 +28,7 @@ active: false, selectedIndex: 0, optionsEnabled:false, -statusBar: 'Bluetooth track 1', +statusBar: 'Bluetooth', init: function() { this._super(); this.set('player', SDL.MediaCDPlayer.create({data: this.PlayList})); diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index cf3d0fbc1..afa33f018 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -626,10 +626,12 @@ SDL.RadioModel = Em.Object.create({ delete result['sisData']; } if(Object.keys(result.sisData.stationIDNumber).length==0){ - delete result['sisData.stationIDNumber']; + var temp=result.sisData; + delete temp['stationIDNumber']; } if(Object.keys(result.sisData.stationLocation).length==0){ - delete result['sisData.stationLocation']; + var temp=result.sisData; + delete temp['stationLocation']; } } diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index 6c028279b..be3c48d5d 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -30,8 +30,7 @@ EqualizerSettingsView = Em.ContainerView.create({ childViews:[ 'equalizerSettingsLabel', - 'equalizerSettingsArray', - 'equalizerSettingsAddButton' + 'equalizerSettingsArray' ], equalizerSettingsLabel: SDL.Label.create({ @@ -44,7 +43,6 @@ EqualizerSettingsView = Em.ContainerView.create({ elementId: 'equalizerSettingsArray', classNames: 'equalizerSettingsArray', childViews: [ - 'deleteButton', 'leftButton', 'rightbutton', 'stateInput', @@ -81,44 +79,6 @@ EqualizerSettingsView = Em.ContainerView.create({ content: 'Channel set:' }), - deleteButton: SDL.Button.extend({ - classNames: [ - 'deleteButton' - ], - action: function(){ - var length = SDL.MediaController.lastRadioControlStruct.equalizerSettings.length; - - if(SDL.MediaController.tempEqualizerSettIndex<=3){ - return; - } - if(SDL.MediaController.tempEqualizerSettIndex!=1) - { - for(var i = SDL.MediaController.tempEqualizerSettIndex; i < length; ++i){ - SDL.MediaController.lastRadioControlStruct.equalizerSettings[i-1] = - SDL.MediaController.lastRadioControlStruct.equalizerSettings[i]; - } - } - else{ - for(var i = 0; i < length ; ++i){ - SDL.MediaController.lastRadioControlStruct.equalizerSettings[i] = - SDL.MediaController.lastRadioControlStruct.equalizerSettings[i+1]; - } - } - SDL.MediaController.lastRadioControlStruct.equalizerSettings.pop(); - if(SDL.MediaController.tempEqualizerSettIndex != 1){ - SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.tempEqualizerSettIndex-1); - SDL.MediaController.set('tempEqualizerSettings', - SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); - - } else{ - SDL.MediaController.set('tempEqualizerSettings', - SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); - } - - }, - icon: 'images/settings/close_icon_min.png', - onDown: false - }), channelIdInput:Ember.TextField.extend({ elementId:'channelIdInput', @@ -177,31 +137,11 @@ EqualizerSettingsView = Em.ContainerView.create({ onDown: false, }) }), - - equalizerSettingsAddButton: SDL.Button.extend({ - classNames: [ - 'equalizerSettingsAddButton' - ], - action: function(){ - SDL.MediaController.lastRadioControlStruct.equalizerSettings.push({ - channelSetting: 0, - channelId: 1, - channelName: 'Default' - }); - SDL.MediaController.set('tempEqualizerSettIndex',SDL.MediaController.lastRadioControlStruct.equalizerSettings.length); - SDL.MediaController.set('tempEqualizerSettings', SDL.MediaController.lastRadioControlStruct.equalizerSettings[SDL.MediaController.tempEqualizerSettIndex-1]); - }, - text: 'Add', - onDown: false - }) }); SDL.audioView= Em.ContainerView.extend( { elementId: 'media_options_menu', - // classNameBindings: [ - // 'SDL.States.media.player.audioOptions.active:active_state:inactive_state' - // ], childViews:[ 'optionsMenu', 'preferencesButton' @@ -213,8 +153,6 @@ SDL.audioView= Em.ContainerView.extend( classNameBindings: ['SDL.MediaController.optionsEnabled:active_state:inactive_state'], childViews:[ - // 'keepContextSelect', - // 'keepContextLabel', 'volumeInput', 'volumeLabel', 'volumeCheckBox', diff --git a/css/media.css b/css/media.css index 26ee56b9f..106f2bc2c 100644 --- a/css/media.css +++ b/css/media.css @@ -1509,7 +1509,7 @@ } #equalizerSettingsArray .stateInput{ - width: 27px; + width: 40px; top: 25px; left: 180px; position:absolute; diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index a6f120dba..cdb729b56 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -285,8 +285,9 @@ FFW.RC = FFW.RPCObserver.create( } } if(request.params.moduleData.audioControlData){ - newAudioControlData = - SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); + newAudioControlData = (request.params.moduleData.audioControlData.keepContext!=null)? + SDL.MediaController.setAudioControlDataWithKeepContext(request.params.moduleData.audioControlData) + :SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); } if(request.params.moduleData.hmiSettingsControlData){ newHMISettingsControlData = SDL.HmiSettingsModel.setHmiSettingsData( From 6c8a8bbbf16bc045869a7d47dcd65a6b0d98ca4d Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 4 Apr 2018 15:18:23 +0300 Subject: [PATCH 052/102] Fix light RC module Fix SetInteriorVehicleData response when the parameters didn't update on the HMI --- app/model/LightModel.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 62dcf1205..feb985e51 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -175,14 +175,14 @@ SDL.LightModel = Em.Object.create({ for(var j = 0; j < lightStateLength; ++j){ if(data.lightState[i].id == this.lightState[j].id){ if(null != data.lightState[i].status){ - this.lightState[j].status = data.lightState[i].status; + this.set('lightState.'+j+'.status', data.lightState[i].status); } if(null != data.lightState[i].density){ - this.lightState[j].density = data.lightState[i].density; + this.set('lightState'+j+'density', data.lightState[i].density); } if(null != data.lightState[i].sRGBColor){ - this.lightState[j].sRGBColor = - data.lightState[i].sRGBColor; + this.set('lightState'+j+'sRGBColor', + data.lightState[i].sRGBColor); } if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ SDL.LightModel.set('lightSettings',this.lightState[j]) From 195601398c71e074e66d204f80d1ed07a19f8257 Mon Sep 17 00:00:00 2001 From: Valerii Date: Thu, 5 Apr 2018 17:07:04 +0300 Subject: [PATCH 053/102] Fix SEAT control module at the RC Fix memory mode at the SEAT control module. The changes are at the next files: - app/model/SeatModel.js - app/view/settings/SeatView.js --- app/model/SeatModel.js | 114 +++++++++++++++++++++++++------ app/view/settings/SeatView.js | 124 ++++++++++++++++++++++++++-------- 2 files changed, 191 insertions(+), 47 deletions(-) diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index 20a5455f3..ab8a12b0b 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -37,11 +37,14 @@ SDL.SeatModel = Em.Object.create({ /* * turn on/off */ + + driverMemory:new Object(), + passengerMemory:new Object(), enableStruct:[ 'ON', 'OFF' ], - + ID:'', heatingEnableData: 'OFF', coolingEnabledData: 'OFF', @@ -169,9 +172,9 @@ SDL.SeatModel = Em.Object.create({ update: function(){ this.set('heatingEnableData', this.tempSeatControlData.heatingEnabled ? 'ON': 'OFF'); - this.set('coolingEnabledData', + this.set('coolingEnabledData', this.tempSeatControlData.coolingEnabled ? 'ON': 'OFF'); - this.set('massageEnabledData', + this.set('massageEnabledData', this.tempSeatControlData.massageEnabled ? 'ON': 'OFF'); this.set('massageCushionFirmness0', @@ -195,7 +198,7 @@ SDL.SeatModel = Em.Object.create({ this.tempSeatControlData.massageCushionFirmness[i].firmness = parseInt(this.tempSeatControlData.massageCushionFirmness[i].firmness); } - + this.set('ID',this.tempSeatControlData.id); this.tempSeatControlData.heatingLevel = parseInt(this.tempSeatControlData.heatingLevel); this.tempSeatControlData.coolingLevel = @@ -223,33 +226,47 @@ SDL.SeatModel = Em.Object.create({ goToStates: function(){ SDL.SeatModel.set('tempSeatControlData', - SDL.deepCopy(SDL.SeatModel.seatControlData)); + SDL.deepCopy(SDL.SeatModel.temp[1])); SDL.SeatModel.update(); }, - + temp:[], init: function(){ - this.seatControlData.id = this.supportedSeatStruct[0]; + + this.temp.push(SDL.deepCopy(this.seatControlData)); + this.temp.push(SDL.deepCopy(this.seatControlData)); + this.temp[0].id=this.supportedSeatStruct[0]; + this.temp[1].id=this.supportedSeatStruct[1]; + //this.seatControlData.id = this.supportedSeatStruct[0]; //tempMessageCussion=SDL.deepCopy(this.massageCushionFirmness); var length = this.massageZoneStruct.length; for(var i = 0; i < length; ++i){ - this.seatControlData.massageMode.push( - SDL.deepCopy(this.massageModeData)); - this.seatControlData.massageMode[i].massageZone = - this.massageZoneStruct[i]; + this.temp[0].massageMode.push(SDL.deepCopy(this.massageModeData)); + this.temp[0].massageMode[i].massageZone = + this.massageZoneStruct[i]; + this.temp[1].massageMode.push(SDL.deepCopy(this.massageModeData)); + this.temp[1].massageMode[i].massageZone = + this.massageZoneStruct[i]; + // this.seatControlData.massageMode.push( + // SDL.deepCopy(this.massageModeData)); + // this.seatControlData.massageMode[i].massageZone = + // this.massageZoneStruct[i]; } for(var i=0;i0 & + SDL.SeatModel.tempSeatControlData.memory.id<=10){ + if(SDL.SeatModel.ID=='DRIVER'){ + SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]= + SDL.deepCopy(SDL.SeatModel.tempSeatControlData); + return; + } + if(SDL.SeatModel.ID=='FRONT_PASSENGER'){ + SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]= + SDL.deepCopy(SDL.SeatModel.tempSeatControlData); + return; + } + } + break; + case 'RESTORE': + if(SDL.SeatModel.ID=='DRIVER'){ + if(SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]){ + SDL.SeatModel.set('tempSeatControlData', + SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]); + SDL.SeatModel.update(); + } + } + if(SDL.SeatModel.ID=='FRONT_PASSENGER'){ + if(SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]){ + SDL.SeatModel.set('tempSeatControlData', + SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]); + SDL.SeatModel.update(); + } + } + break; + case 'NONE':break; + } + } }) }), }), @@ -898,31 +944,36 @@ SDL.SeatView = Em.ContainerView.create({ elementId: 'massageEnable_enableSelect', classNames: 'massageEnable_enableSelect', contentBinding: 'SDL.SeatModel.enableStruct', - valueBinding: 'SDL.SeatModel.massageEnabledData' - }) - }), - massageEnable: Em.ContainerView.extend({ - elementId: 'massageEnable', - classNames: 'in_massageEnable_view', - - childViews: [ - 'label', - 'select' - ], - - label: SDL.Label.extend({ - elementId: 'massageEnable_label', - classNames: 'massageEnable_label', - content: 'Massage' - }), - - select: Em.Select.create({ - elementId: 'massageEnable_enableSelect', - classNames: 'massageEnable_enableSelect', - contentBinding: 'SDL.SeatModel.enableStruct', - valueBinding: 'SDL.SeatModel.massageEnabledData' + valueBinding: 'SDL.SeatModel.massageEnabledData', + change:function(){ + SDL.SeatModel.set('tempSeatControlData.massageEnabled', + (SDL.SeatModel.massageEnabledData=='OFF')? true:false); + SDL.SeatModel.update(); + } }) }), + // massageEnable: Em.ContainerView.extend({ + // elementId: 'massageEnable', + // classNames: 'in_massageEnable_view', + + // childViews: [ + // 'label', + // 'select' + // ], + + // label: SDL.Label.extend({ + // elementId: 'massageEnable_label', + // classNames: 'massageEnable_label', + // content: 'Massage' + // }), + + // select: Em.Select.create({ + // elementId: 'massageEnable_enableSelect', + // classNames: 'massageEnable_enableSelect', + // contentBinding: 'SDL.SeatModel.enableStruct', + // valueBinding: 'SDL.SeatModel.massageEnabledData' + // }) + // }), id: Em.ContainerView.extend({ elementId: 'id', classNames: 'in_id_view', @@ -931,7 +982,6 @@ SDL.SeatView = Em.ContainerView.create({ 'label', 'select' ], - label: SDL.Label.extend({ elementId: 'idlabel', classNames: 'idlabel', @@ -942,7 +992,25 @@ SDL.SeatView = Em.ContainerView.create({ elementId: 'idSelect', classNames: 'idSelect', contentBinding: 'SDL.SeatModel.supportedSeatStruct', - valueBinding: 'SDL.SeatModel.tempSeatControlData.id' + valueBinding: 'SDL.SeatModel.ID', + change: function(){ + if(SDL.SeatModel.ID!='DRIVER'){ + SDL.SeatModel.set('temp.1', + SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); + SDL.SeatModel.set('tempSeatControlData', + SDL.deepCopy(SDL.SeatModel.temp[0])); + SDL.SeatModel.update(); + return; + } + if(SDL.SeatModel.ID!='FRONT_PASSENGER'){ + SDL.SeatModel.set('temp.0', + SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); + SDL.SeatModel.tempSeatControlData= + SDL.deepCopy(SDL.SeatModel.temp[1]); + SDL.SeatModel.update(); + return; + } + } }) }), From 783da60b019bfe62861ced348eaa3507b150dba1 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Fri, 1 Jun 2018 11:26:50 +0300 Subject: [PATCH 054/102] Answer review comments. --- app/controller/MediaController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 6e3cca706..aabe2b741 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -41,7 +41,7 @@ SDL.MediaController = Em.Object.create( this.tempEqualizerSettings.channelName = this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelName; this.tempEqualizerSettings.channelId = parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelId); this.tempEqualizerSettings.channelSetting = parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelSetting); - for (var i = 4; i <= 100; i++) { + for (var i = 4; i <= 10; i++) { temp = {}; temp.channelId = parseInt(i); temp.channelSetting = parseInt(i); @@ -832,10 +832,11 @@ SDL.MediaController = Em.Object.create( var result = []; var capabilities = { moduleName: 'AudioControlCapabilities', + keepContextAvailable: true, sourceAvailable: true, volumeAvailable: true, equalizerAvailable: true, - equalizerMaxChannelId: 100 + equalizerMaxChannelId: 10 }; result.push(capabilities); return result; From 53e2bd78e469b2dab6c856875cfc1b02f1bbe508 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 1 Jun 2018 11:44:36 +0300 Subject: [PATCH 055/102] Fix style issues --- app/model/SeatModel.js | 291 ++++++++++++++++++++--------------------- 1 file changed, 141 insertions(+), 150 deletions(-) diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index ab8a12b0b..edb456a63 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -33,17 +33,15 @@ */ SDL.SeatModel = Em.Object.create({ - - /* - * turn on/off - */ - - driverMemory:new Object(), - passengerMemory:new Object(), + driverMemory:new Object(), + + passengerMemory:new Object(), + enableStruct:[ 'ON', 'OFF' ], + ID:'', heatingEnableData: 'OFF', @@ -56,7 +54,7 @@ SDL.SeatModel = Em.Object.create({ 'memory.id', 'memory.action' ], - + /* * List possible zones of a multi-contour massage seat */ @@ -67,7 +65,7 @@ SDL.SeatModel = Em.Object.create({ /* * List possible modes of a massage zone - */ + */ massageModeStruct:[ 'OFF', 'LOW', @@ -76,7 +74,7 @@ SDL.SeatModel = Em.Object.create({ /* * Specify the mode of a massage zone - */ + */ massageCushionStruct:[ 'TOP_LUMBAR', 'MIDDLE_LUMBAR', @@ -87,7 +85,7 @@ SDL.SeatModel = Em.Object.create({ /* * List possible cushions of a multi-contour massage seat - */ + */ supportedSeatStruct:[ 'DRIVER', 'FRONT_PASSENGER' @@ -109,13 +107,12 @@ SDL.SeatModel = Em.Object.create({ /* * The intensity or firmness of a cushion - */ + */ massageCushionFirmness:{ cushion: 'TOP_LUMBAR', firmness: 0 }, - seatMemoryAction: { id: 1, label: 'Label value', @@ -165,12 +162,12 @@ SDL.SeatModel = Em.Object.create({ massageCushionFirmness2: false, massageCushionFirmness3: false, massageCushionFirmness4: false, - massageMode0: true, massageMode1: false, + temp:[], - update: function(){ - this.set('heatingEnableData', + update: function() { + this.set('heatingEnableData', this.tempSeatControlData.heatingEnabled ? 'ON': 'OFF'); this.set('coolingEnabledData', this.tempSeatControlData.coolingEnabled ? 'ON': 'OFF'); @@ -194,65 +191,59 @@ SDL.SeatModel = Em.Object.create({ this.tempSeatControlData.massageMode[1] != null); var length = this.tempSeatControlData.massageCushionFirmness.length; - for(var i = 0; i < length; ++i){ - this.tempSeatControlData.massageCushionFirmness[i].firmness = + for(var i = 0; i < length; ++i) { + this.tempSeatControlData.massageCushionFirmness[i].firmness = parseInt(this.tempSeatControlData.massageCushionFirmness[i].firmness); } this.set('ID',this.tempSeatControlData.id); - this.tempSeatControlData.heatingLevel = + this.tempSeatControlData.heatingLevel = parseInt(this.tempSeatControlData.heatingLevel); - this.tempSeatControlData.coolingLevel = + this.tempSeatControlData.coolingLevel = parseInt(this.tempSeatControlData.coolingLevel); - this.tempSeatControlData.horizontalPosition = + this.tempSeatControlData.horizontalPosition = parseInt(this.tempSeatControlData.horizontalPosition); - this.tempSeatControlData.verticalPosition = + this.tempSeatControlData.verticalPosition = parseInt(this.tempSeatControlData.verticalPosition); - this.tempSeatControlData.frontVerticalPosition = + this.tempSeatControlData.frontVerticalPosition = parseInt(this.tempSeatControlData.frontVerticalPosition); - this.tempSeatControlData.backVerticalPosition = + this.tempSeatControlData.backVerticalPosition = parseInt(this.tempSeatControlData.backVerticalPosition); - this.tempSeatControlData.backTiltAngle = + this.tempSeatControlData.backTiltAngle = parseInt(this.tempSeatControlData.backTiltAngle); - this.tempSeatControlData.headSupportHorizontalPosition = + this.tempSeatControlData.headSupportHorizontalPosition = parseInt(this.tempSeatControlData.headSupportHorizontalPosition); - this.tempSeatControlData.headSupportVerticalPosition = + this.tempSeatControlData.headSupportVerticalPosition = parseInt(this.tempSeatControlData.headSupportVerticalPosition); - this.tempSeatControlData.memory.id = + this.tempSeatControlData.memory.id = parseInt(this.tempSeatControlData.memory.id); SDL.SeatModel.set('tempSeatControlData', SDL.deepCopy(SDL.SeatModel.tempSeatControlData)); }, - - goToStates: function(){ + + goToStates: function() { SDL.SeatModel.set('tempSeatControlData', SDL.deepCopy(SDL.SeatModel.temp[1])); SDL.SeatModel.update(); }, - temp:[], - init: function(){ - + + init: function() { this.temp.push(SDL.deepCopy(this.seatControlData)); this.temp.push(SDL.deepCopy(this.seatControlData)); this.temp[0].id=this.supportedSeatStruct[0]; this.temp[1].id=this.supportedSeatStruct[1]; - //this.seatControlData.id = this.supportedSeatStruct[0]; - //tempMessageCussion=SDL.deepCopy(this.massageCushionFirmness); + var length = this.massageZoneStruct.length; - for(var i = 0; i < length; ++i){ + for (var i = 0; i < length; ++i) { this.temp[0].massageMode.push(SDL.deepCopy(this.massageModeData)); - this.temp[0].massageMode[i].massageZone = + this.temp[0].massageMode[i].massageZone = this.massageZoneStruct[i]; this.temp[1].massageMode.push(SDL.deepCopy(this.massageModeData)); - this.temp[1].massageMode[i].massageZone = + this.temp[1].massageMode[i].massageZone = this.massageZoneStruct[i]; - // this.seatControlData.massageMode.push( - // SDL.deepCopy(this.massageModeData)); - // this.seatControlData.massageMode[i].massageZone = - // this.massageZoneStruct[i]; } - for(var i=0;i= 0){ - var parentValue = value.substring(0, value.indexOf('.')); - if(temp.hasOwnProperty(parentValue)){ - temp.set(value,Em.Object.create( - SDL.SeatModel.tempSeatControlData).get(value)); - } - } else{ - temp[value] = this.tempSeatControlData[value]; + }, + + applySettings: function () { + SDL.SeatModel.tempSeatControlData.coolingEnabled = + (SDL.SeatModel.coolingEnabledData == 'ON'); + SDL.SeatModel.tempSeatControlData.heatingEnabled = + (SDL.SeatModel.heatingEnableData == 'ON'); + SDL.SeatModel.tempSeatControlData.massageEnabled = + (SDL.SeatModel.massageEnabledData == 'ON'); + SDL.SeatModel.update(); + + var temp = Em.Object.create(this.dfs(SDL.deepCopy(this.tempSeatControlData), + SDL.deepCopy(this.seatControlData))); + + var length = this.mandatoryField.length; + for (var i = 0; i < length; ++i) { + var value = this.mandatoryField[i]; + if (value.indexOf('.') >= 0) { + var parentValue = value.substring(0, value.indexOf('.')); + if (temp.hasOwnProperty(parentValue)) { + temp.set(value,Em.Object.create( + SDL.SeatModel.tempSeatControlData).get(value)); + } + } else { + temp[value] = this.tempSeatControlData[value]; + } } - } - - FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', - seatControlData: temp}); - SDL.SeatModel.set('seatControlData', - Em.Object.create(SDL.deepCopy(SDL.SeatModel.tempSeatControlData))); - }, - - isEmptyObject: function(object){ + + FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', + seatControlData: temp}); + SDL.SeatModel.set('seatControlData', + Em.Object.create(SDL.deepCopy(SDL.SeatModel.tempSeatControlData))); + }, + + isEmptyObject: function(object) { var l = 0; - for (var key in object){ - if(object.hasOwnProperty(key)){ - ++l + for (var key in object) { + if(object.hasOwnProperty(key)) { + ++l; } } return l == 0; - }, + }, - dfs:function(from, to){ + dfs:function(from, to) { var result = SDL.deepCopy(from); for (var key in from) { - if(from.hasOwnProperty(key)){ - if(typeof from[key] == 'object'){ - if(Array.isArray(from[key])){ + if (from.hasOwnProperty(key)) { + if (typeof from[key] == 'object') { + if (Array.isArray(from[key])) { var lengthFrom = from[key].length; var lengthTo = to[key].length; - if((lengthFrom != lengthTo)){ + + if ((lengthFrom != lengthTo)) { result[key] = from[key]; continue; } + var temp = this.dfs(from[key],to[key]); - if(!this.isEmptyObject(temp)){ + if (!this.isEmptyObject(temp)) { result[key] = from[key]; continue; } @@ -433,12 +424,12 @@ SDL.SeatModel = Em.Object.create({ delete result[key]; } } else { - if(from[key] === to[key]){ + if (from[key] === to[key]) { delete result[key]; } } } } return result; - } + } }); From 53e594903a5afd038e0641e4fa45e4a5533cef72 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 1 Jun 2018 15:01:26 +0300 Subject: [PATCH 056/102] Fixed issues in audio and seat modules --- app/controller/MediaController.js | 9 +++++---- app/model/SeatModel.js | 11 +++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index aabe2b741..3cd9b2d59 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -63,7 +63,7 @@ SDL.MediaController = Em.Object.create( tempSource: 'MOBILE_APP', currentVolume: 50, radioControlStruct: { - source: 'AUDIO', + source: 'MOBILE_APP', equalizerSettings: [{ channelSetting: 50, channelId: 1, @@ -81,7 +81,7 @@ SDL.MediaController = Em.Object.create( }, lastRadioControlStruct: { - source: 'AUDIO', + source: 'RADIO_TUNER', equalizerSettings: [{ channelSetting: 50, channelId: 1, @@ -577,9 +577,10 @@ SDL.MediaController = Em.Object.create( parseInt(this.lastRadioControlStruct.equalizerSettings[i].channelId); this.lastRadioControlStruct.equalizerSettings[i].channelSetting = parseInt(this.lastRadioControlStruct.equalizerSettings[i].channelSetting); - } - return this.lastRadioControlStruct; + result = SDL.deepCopy(this.lastRadioControlStruct); + result.volume = this.currentVolume; + return result; }, getResultWithKeepContext: function () { equalizerSettings: []; diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index edb456a63..e3316cb4b 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -222,8 +222,10 @@ SDL.SeatModel = Em.Object.create({ }, goToStates: function() { - SDL.SeatModel.set('tempSeatControlData', + SDL.SeatModel.set('seatControlData', SDL.deepCopy(SDL.SeatModel.temp[1])); + SDL.SeatModel.set('tempSeatControlData', + SDL.deepCopy(SDL.SeatModel.seatControlData)); SDL.SeatModel.update(); }, @@ -247,11 +249,8 @@ SDL.SeatModel = Em.Object.create({ tempMessageCussion={}; tempMessageCussion.firmness=SDL.deepCopy(i+1); tempMessageCussion.cushion=SDL.deepCopy(this.massageCushionStruct[i]); - this.temp[0].massageCushionFirmness.push( - tempMessageCussion); - this.temp[1].massageCushionFirmness.push( - tempMessageCussion); - tempMessageCussion=null; + this.temp[0].massageCushionFirmness.push(tempMessageCussion); + this.temp[1].massageCushionFirmness.push(tempMessageCussion); } this.temp[0].memory = this.seatMemoryAction; From 84adacd833075fdcea5ce56c588d7319a8d6b880 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 1 Jun 2018 19:00:16 +0300 Subject: [PATCH 057/102] Fix SetInteriorVehicleData processing for seats --- app/model/SeatModel.js | 16 ++++++++++++++++ app/view/settings/SeatView.js | 28 ++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/app/model/SeatModel.js b/app/model/SeatModel.js index e3316cb4b..b8d04b4d8 100644 --- a/app/model/SeatModel.js +++ b/app/model/SeatModel.js @@ -255,6 +255,14 @@ SDL.SeatModel = Em.Object.create({ this.temp[0].memory = this.seatMemoryAction; this.temp[1].memory = this.seatMemoryAction; + + for (var i = 1; i <= 10; i++) { + this.driverMemory[i] = SDL.deepCopy(this.temp[0]); + this.driverMemory[i].memory.id = i; + this.passengerMemory[i] = SDL.deepCopy(this.temp[1]); + this.passengerMemory[i].memory.id = i; + } + this.tempSeatControlData = SDL.deepCopy(this.temp[1]); }, @@ -309,6 +317,10 @@ SDL.SeatModel = Em.Object.create({ break; case 'NONE': + if(this.tempSeatControlData.id=='DRIVER') { + this.set('tempSeatControlData',this.temp[0]); + return this.temp[0]; + } break; } } @@ -340,6 +352,10 @@ SDL.SeatModel = Em.Object.create({ } break; case 'NONE': + if (this.tempSeatControlData.id=='FRONT_PASSENGER') { + this.set('tempSeatControlData',this.temp[1]); + return this.temp[1]; + } break; } } diff --git a/app/view/settings/SeatView.js b/app/view/settings/SeatView.js index ff8998669..96e22a8f9 100644 --- a/app/view/settings/SeatView.js +++ b/app/view/settings/SeatView.js @@ -881,13 +881,23 @@ SDL.SeatView = Em.ContainerView.create({ if(SDL.SeatModel.tempSeatControlData.memory.id>0 & SDL.SeatModel.tempSeatControlData.memory.id<=10){ if(SDL.SeatModel.ID=='DRIVER'){ + SDL.SeatModel.set('seatControlData', + SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id] + ); + SDL.SeatModel.applySettings(); + SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]= - SDL.deepCopy(SDL.SeatModel.tempSeatControlData); + SDL.deepCopy(SDL.SeatModel.tempSeatControlData); return; } if(SDL.SeatModel.ID=='FRONT_PASSENGER'){ + SDL.SeatModel.set('seatControlData', + SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id] + ); + SDL.SeatModel.applySettings(); + SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]= - SDL.deepCopy(SDL.SeatModel.tempSeatControlData); + SDL.deepCopy(SDL.SeatModel.tempSeatControlData); return; } } @@ -895,16 +905,26 @@ SDL.SeatView = Em.ContainerView.create({ case 'RESTORE': if(SDL.SeatModel.ID=='DRIVER'){ if(SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]){ + SDL.SeatModel.set('seatControlData', + SDL.deepCopy(SDL.SeatModel.tempSeatControlData) + ); SDL.SeatModel.set('tempSeatControlData', - SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id]); + SDL.SeatModel.driverMemory[SDL.SeatModel.tempSeatControlData.memory.id] + ); SDL.SeatModel.update(); + SDL.SeatModel.applySettings(); } } if(SDL.SeatModel.ID=='FRONT_PASSENGER'){ if(SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]){ + SDL.SeatModel.set('seatControlData', + SDL.deepCopy(SDL.SeatModel.tempSeatControlData) + ); SDL.SeatModel.set('tempSeatControlData', - SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id]); + SDL.SeatModel.passengerMemory[SDL.SeatModel.tempSeatControlData.memory.id] + ); SDL.SeatModel.update(); + SDL.SeatModel.applySettings(); } } break; From 2561952b4726dfb8c4b2058370b31b8762b75cf2 Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 1 Jun 2018 19:29:17 +0300 Subject: [PATCH 058/102] Fixed issue in light module --- app/model/LightModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index feb985e51..8f352c309 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -178,10 +178,10 @@ SDL.LightModel = Em.Object.create({ this.set('lightState.'+j+'.status', data.lightState[i].status); } if(null != data.lightState[i].density){ - this.set('lightState'+j+'density', data.lightState[i].density); + this.set('lightState.'+j+'.density', data.lightState[i].density); } if(null != data.lightState[i].sRGBColor){ - this.set('lightState'+j+'sRGBColor', + this.set('lightState.'+j+'.sRGBColor', data.lightState[i].sRGBColor); } if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ From 51fcd9fd285d0ecf911200f052245cb40c549517 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 1 Jun 2018 20:14:39 +0300 Subject: [PATCH 059/102] Fixed HMI_SETTINGS module behaviour --- app/controller/sdl/RController.js | 11 ++++++----- app/model/ClimateControlModel.js | 16 ++-------------- app/model/HmiSettingsModel.js | 26 ++++++++++++++++---------- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index 99529d34e..4e1c91833 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -237,14 +237,15 @@ SDL.RController = SDL.SDLController.extend( var next = this.nextElement(SDL.HmiSettingsModel.temperatureUnitStruct, SDL.HmiSettingsModel.temperatureUnit); SDL.HmiSettingsModel.set('temperatureUnit',next); SDL.ClimateControlModel.set('climateControlData.temperatureUnit', next); - var data = { - temperatureUnit: next - } - if(next == 'FAHRENHEIT'){ + if(next == 'FAHRENHEIT') { SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); - }else{ + } else { SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); } + var data = { + temperatureUnit: next + } + this.sendHMISettingsNotification(data); }, sendHMISettingsNotification: function(data){ diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index 8f99eb0e3..e742862b4 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -344,13 +344,7 @@ SDL.ClimateControlModel = Em.Object.create({ 'desiredTemperature.unit', 'desiredTemperature.value'] ); SDL.HmiSettingsModel.set('temperatureUnit','FAHRENHEIT'); - var data = { - temperatureUnit: 'FAHRENHEIT' - } - if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); - } - }, + }, temperatureUnitCelsiusEnable: function() { this.set('climateControlData.temperatureUnit', 'CELSIUS'); @@ -359,13 +353,7 @@ SDL.ClimateControlModel = Em.Object.create({ 'desiredTemperature.unit', 'desiredTemperature.value'] ); SDL.HmiSettingsModel.set('temperatureUnit','CELSIUS'); - var data = { - temperatureUnit: 'CELSIUS' - } - if (Object.keys(data).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', hmiSettingsControlData: data}); - } - }, + }, refreshDefrostZoneValue: function() { if (this.climateControlData.defrostZoneFrontEnable && diff --git a/app/model/HmiSettingsModel.js b/app/model/HmiSettingsModel.js index 61d4ff228..91d6aa8dc 100644 --- a/app/model/HmiSettingsModel.js +++ b/app/model/HmiSettingsModel.js @@ -85,29 +85,35 @@ SDL.HmiSettingsModel = Em.Object.create({ }, setHmiSettingsData: function(data){ - if(null != data.displayMode){ + var result = {}; + if(data.displayMode && this.displayMode != data.displayMode) { this.set('displayMode',data.displayMode); + result.displayMode = data.displayMode; } - if(null != data.temperatureUnit){ + if(data.temperatureUnit && this.temperatureUnit != data.temperatureUnit) { this.set('temperatureUnit',data.temperatureUnit); if('CELSIUS' == data.temperatureUnit){ SDL.ClimateControlModel.temperatureUnitCelsiusEnable(); }else{ SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(); } + result.temperatureUnit = data.temperatureUnit; } - if(null != data.distanceUnit){ + if(data.distanceUnit && this.distanceUnit != data.distanceUnit) { this.set('distanceUnit',data.distanceUnit); - } + result.distanceUnit = data.distanceUnit; + } + + if (Object.keys(result).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({ + moduleType:'HMI_SETTINGS', + hmiSettingsControlData: result + }); + } - var result = { - temperatureUnit: this.temperatureUnit, - displayMode: this.displayMode, - distanceUnit: this.distanceUnit - }; return result; }, - + getHmiSettingsControlData: function(){ var result = { temperatureUnit: this.temperatureUnit, From a5de388a90804aa37984e64dc0965d0596d87d24 Mon Sep 17 00:00:00 2001 From: Valerii Date: Fri, 1 Jun 2018 20:58:57 +0300 Subject: [PATCH 060/102] Added string validation for the radio module sisData --- app/model/media/RadioModel.js | 69 ++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index afa33f018..879262737 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -1473,34 +1473,75 @@ SDL.RadioModel = Em.Object.create({ { SDL.MediaController.lastRadioControlStruct.source='RADIO_TUNER'; }, + + exitPopUp:function (param){ + if(false == param){ + SDL.RadioModel.toggleProperty('optionsEnabled'); + } + }, + + validateStrings: function(){ + var stationShortLength = this.lastOptionParams.sisData.stationShortName.length; + var stationLongLength = this.lastOptionParams.sisData.stationLongName.length; + var stationMessageLength = this.lastOptionParams.sisData.stationMessage.length; + + if(stationShortLength<4 || stationShortLength>7){ + popUp = SDL.PopUp.create(); + popUp.appendTo('body').popupActivate( + 'Sis Data is not set.' + + '"Station short name" must have minlength = 4 and maxlength = 7 characters.', + this.exitPopUp); + return false; + } + + if(stationLongLength>56){ + popUp = SDL.PopUp.create(); + popUp.appendTo('body').popupActivate( + 'Sis Data is not set.' + + '"Station long name" must have maxlength = 56 characters.', + this.exitPopUp); + return false; + } + if(stationMessageLength>56){ + popUp = SDL.PopUp.create(); + popUp.appendTo('body').popupActivate( + 'Sis Data is not set.' + + '"Station message" must have maxlength = 56 characters.', + this.exitPopUp); + return false; + } + return true; + }, + sendButtonPress: function() { - var currentData = SDL.deepCopy(this.getCurrentOptions()); - var changedData = SDL.deepCopy(this.lastOptionParams); - this.setRadioData(changedData); + if(!this.validateStrings()){return;} + var currentData = SDL.deepCopy(SDL.RadioModel.getCurrentOptions()); + var changedData = SDL.deepCopy(SDL.RadioModel.lastOptionParams); + SDL.RadioModel.setRadioData(changedData); SDL.RadioModel.toggleProperty('optionsEnabled'); var properties = SDL.SDLController.getChangedProperties(changedData, currentData); if (properties.indexOf('band') >= 0) { - if (this.tuneRadio) { - this.directTune(); + if (SDL.RadioModel.tuneRadio) { + SDL.RadioModel.directTune(); } - if (this.scanState) { - this.scanKeyPress(); + if (SDL.RadioModel.scanState) { + SDL.RadioModel.scanKeyPress(); } - if (this.radioControlStruct.band == 'FM') { + if (SDL.RadioModel.radioControlStruct.band == 'FM') { properties.push('frequencyInteger'); properties.push('frequencyFraction'); - this.switchRadioBandFrequency(true); + SDL.RadioModel.switchRadioBandFrequency(true); } - if (this.radioControlStruct.band == 'AM') { + if (SDL.RadioModel.radioControlStruct.band == 'AM') { properties.push('frequencyInteger'); - this.switchRadioBandFrequency(true); + SDL.RadioModel.switchRadioBandFrequency(true); } - if (this.radioControlStruct.band == 'XM') { + if (SDL.RadioModel.radioControlStruct.band == 'XM') { properties.push('frequencyInteger'); - this.switchRadioBandFrequency(true); + SDL.RadioModel.switchRadioBandFrequency(true); } } @@ -1509,7 +1550,7 @@ SDL.RadioModel = Em.Object.create({ }else if(properties.indexOf('stationLocation.latitudeDegrees')>=0){ properties.push('stationLocation.longitudeDegrees'); } - this.sendRadioChangeNotification(properties); + SDL.RadioModel.sendRadioChangeNotification(properties); }, setFrequencyInteger: function(value) { From c045e34383816974b38fdb858e25327ad5687128 Mon Sep 17 00:00:00 2001 From: Andrii Kalinich Date: Fri, 1 Jun 2018 22:07:33 +0300 Subject: [PATCH 061/102] Fixed copyright and removed commented code --- app/controller/MediaController.js | 21 +-------------------- app/model/media/BluetoothModel.js | 2 +- app/model/media/IPodModel.js | 2 +- app/model/media/LineInModel.js | 2 +- app/view/media/audioView.js | 2 +- app/view/settings/SeatView.js | 24 +----------------------- 6 files changed, 6 insertions(+), 47 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index 3cd9b2d59..a9bc8830d 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · @@ -36,7 +36,6 @@ SDL.MediaController = Em.Object.create( * Initial substate */ init: function () { - //this.tempEqualizerSettIndex=this.lastRadioControlStruct.equalizerSettings.length; this.tempEqualizerSettIndex = 1; this.tempEqualizerSettings.channelName = this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelName; this.tempEqualizerSettings.channelId = parseInt(this.lastRadioControlStruct.equalizerSettings[this.tempEqualizerSettIndex - 1].channelId); @@ -52,8 +51,6 @@ SDL.MediaController = Em.Object.create( }, activeState: 'media.player.cd', - /** Current selected players module Data reference*/ - //currentPlayerModuleData: SDL.CDModel, /** Current selected player object reference*/ currentSelectedPlayer: SDL.CDModel.player, /** @@ -110,8 +107,6 @@ SDL.MediaController = Em.Object.create( channelName: true }, - //lastParams:{}, - usbControl: { keepContext: false }, @@ -240,7 +235,6 @@ SDL.MediaController = Em.Object.create( } this.onPlayerEnter(SDL.CDModel, 'cd'); this.returnParameters(); - // SDL.SDLMediaController.deactivateActiveRcApp(); }, /** * Turn on USB @@ -252,7 +246,6 @@ SDL.MediaController = Em.Object.create( } this.onPlayerEnter(SDL.USBModel, 'usb'); this.returnParameters(); - //SDL.SDLMediaController.deactivateActiveRcApp(); }, /** * Turn on Radio @@ -265,7 +258,6 @@ SDL.MediaController = Em.Object.create( SDL.RadioModel.saveCurrentOptions(); SDL.RadioModel.set('active', true); this.returnParameters(); - //SDL.SDLMediaController.deactivateActiveRcApp(); }, turnOnBluetooth: function () { this.deactivateAll(); @@ -703,50 +695,41 @@ SDL.MediaController = Em.Object.create( case 'RADIO_TUNER': this.setFalseStateModel(); SDL.RadioModel.set('active', true); - //SDL.States.set('media.player.radio.active',true); this.set('activeState', 'media.player.radio'); break; case 'USB': this.setFalseStateModel(); SDL.USBModel.set('active', true); - //SDL.States.set('media.player.usb.active',true); this.set('activeState', 'media.player.usb'); break; case 'CD': this.setFalseStateModel(); SDL.CDModel.set('active', true); - //SDL.States.set('media.player.cd.active',true); this.set('activeState', 'media.player.cd'); break; case 'BLUETOOTH_STEREO_BTST': this.setFalseStateModel(); SDL.BluetoothModel.set('active', true); - //SDL.States.set('media.player.bluetooth.active',true); this.set('activeState', 'media.player.bluetooth'); break; case 'LINE_IN': this.setFalseStateModel(); SDL.LineInModel.set('active', true); - // SDL.States.set('media.player.lineIn.active',true); this.set('activeState', 'media.player.lineIn'); break; case 'IPOD': this.setFalseStateModel(); SDL.IPodModel.set('active', true); - //SDL.States.set('media.player.ipod.active',true); this.set('activeState', 'media.player.ipod'); break; case 'MOBILE_APP': this.setFalseStateModel(); SDL.SDLModel.set('data.limitedExist', true); - //SDL.States.set('media.sdlmedia.active',true); this.set('activeState', 'media.sdlmedia'); this.set('state', true); SDL.SDLController.onEventChanged('player', false); this.set('tempSource', ''); break; } - //this.onPlayerEnter(SDL.BluetoothModel,'bluetooth'); - //SDL.States.goToState(curState); } } } @@ -788,8 +771,6 @@ SDL.MediaController = Em.Object.create( }, setAudioControlData: function (data) { result = {}; - //this.keepContext=data.keepContext===true; - if (data.source != null) { this.set('lastRadioControlStruct.source', data.source); this.switchSource(data.source); diff --git a/app/model/media/BluetoothModel.js b/app/model/media/BluetoothModel.js index 55d6baa24..9027dbd2c 100644 --- a/app/model/media/BluetoothModel.js +++ b/app/model/media/BluetoothModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · diff --git a/app/model/media/IPodModel.js b/app/model/media/IPodModel.js index d0a24a48d..a57531c6a 100644 --- a/app/model/media/IPodModel.js +++ b/app/model/media/IPodModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · diff --git a/app/model/media/LineInModel.js b/app/model/media/LineInModel.js index f4116690d..9a004e5cc 100644 --- a/app/model/media/LineInModel.js +++ b/app/model/media/LineInModel.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: · diff --git a/app/view/media/audioView.js b/app/view/media/audioView.js index be3c48d5d..4cb15146e 100644 --- a/app/view/media/audioView.js +++ b/app/view/media/audioView.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Ford Motor Company All rights reserved. + * Copyright (c) 2018, Ford Motor Company All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/app/view/settings/SeatView.js b/app/view/settings/SeatView.js index 96e22a8f9..5f4e9dfec 100644 --- a/app/view/settings/SeatView.js +++ b/app/view/settings/SeatView.js @@ -971,29 +971,7 @@ SDL.SeatView = Em.ContainerView.create({ SDL.SeatModel.update(); } }) - }), - // massageEnable: Em.ContainerView.extend({ - // elementId: 'massageEnable', - // classNames: 'in_massageEnable_view', - - // childViews: [ - // 'label', - // 'select' - // ], - - // label: SDL.Label.extend({ - // elementId: 'massageEnable_label', - // classNames: 'massageEnable_label', - // content: 'Massage' - // }), - - // select: Em.Select.create({ - // elementId: 'massageEnable_enableSelect', - // classNames: 'massageEnable_enableSelect', - // contentBinding: 'SDL.SeatModel.enableStruct', - // valueBinding: 'SDL.SeatModel.massageEnabledData' - // }) - // }), + }), id: Em.ContainerView.extend({ elementId: 'id', classNames: 'in_id_view', From 591846f6280bd3506a8228219672a5b832452732 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Thu, 21 Jun 2018 13:53:51 +0300 Subject: [PATCH 062/102] Fixed onInteriorVehicleDataNotification --- app/model/ClimateControlModel.js | 29 +++++++++++++++++++---------- app/model/HmiSettingsModel.js | 7 ------- ffw/RCRPC.js | 18 +++++++++++++++++- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/app/model/ClimateControlModel.js b/app/model/ClimateControlModel.js index e742862b4..465a429eb 100644 --- a/app/model/ClimateControlModel.js +++ b/app/model/ClimateControlModel.js @@ -213,6 +213,11 @@ SDL.ClimateControlModel = Em.Object.create({ if (data.desiredTemperature != null) { this.setDesiredTemp(data.desiredTemperature); + if(data.desiredTemperature.unit == 'FAHRENHEIT') { + SDL.ClimateControlModel.temperatureUnitFahrenheitEnable(false); + } else { + SDL.ClimateControlModel.temperatureUnitCelsiusEnable(false); + } } if (data.acMaxEnable != null) { @@ -337,21 +342,25 @@ SDL.ClimateControlModel = Em.Object.create({ ); }, - temperatureUnitFahrenheitEnable: function() { + temperatureUnitFahrenheitEnable: function(sendNotification = true) { this.set('climateControlData.temperatureUnit', 'FAHRENHEIT'); - this.sendClimateChangeNotification( - ['currentTemperature.unit', 'currentTemperature.value', - 'desiredTemperature.unit', 'desiredTemperature.value'] - ); + if(sendNotification){ + this.sendClimateChangeNotification( + ['currentTemperature.unit', 'currentTemperature.value', + 'desiredTemperature.unit', 'desiredTemperature.value'] + ); + } SDL.HmiSettingsModel.set('temperatureUnit','FAHRENHEIT'); }, - temperatureUnitCelsiusEnable: function() { + temperatureUnitCelsiusEnable: function(sendNotification = true) { this.set('climateControlData.temperatureUnit', 'CELSIUS'); - this.sendClimateChangeNotification( - ['currentTemperature.unit', 'currentTemperature.value', - 'desiredTemperature.unit', 'desiredTemperature.value'] - ); + if(sendNotification){ + this.sendClimateChangeNotification( + ['currentTemperature.unit', 'currentTemperature.value', + 'desiredTemperature.unit', 'desiredTemperature.value'] + ); + } SDL.HmiSettingsModel.set('temperatureUnit','CELSIUS'); }, diff --git a/app/model/HmiSettingsModel.js b/app/model/HmiSettingsModel.js index 91d6aa8dc..dc0735775 100644 --- a/app/model/HmiSettingsModel.js +++ b/app/model/HmiSettingsModel.js @@ -104,13 +104,6 @@ SDL.HmiSettingsModel = Em.Object.create({ result.distanceUnit = data.distanceUnit; } - if (Object.keys(result).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({ - moduleType:'HMI_SETTINGS', - hmiSettingsControlData: result - }); - } - return result; }, diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index cdb729b56..4dbb1613a 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -275,6 +275,10 @@ FFW.RC = FFW.RPCObserver.create( newClimateControlData = SDL.ClimateController.model.setClimateData( request.params.moduleData.climateControlData); + if (Object.keys(request.params.moduleData.climateControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'CLIMATE', + climateControlData: newClimateControlData}); + } } if (request.params.moduleData.radioControlData) { newRadioControlData = @@ -288,10 +292,18 @@ FFW.RC = FFW.RPCObserver.create( newAudioControlData = (request.params.moduleData.audioControlData.keepContext!=null)? SDL.MediaController.setAudioControlDataWithKeepContext(request.params.moduleData.audioControlData) :SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); + if (Object.keys(request.params.moduleData.audioControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO', + audioControlData: newAudioControlData}); + } } if(request.params.moduleData.hmiSettingsControlData){ newHMISettingsControlData = SDL.HmiSettingsModel.setHmiSettingsData( - request.params.moduleData.hmiSettingsControlData); + request.params.moduleData.hmiSettingsControlData); + if (Object.keys(request.params.moduleData.hmiSettingsControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'HMI_SETTINGS', + hmiSettingsControlData: newHMISettingsControlData}); + } } if(request.params.moduleData.lightControlData){ newLightControlData = SDL.LightModel.setLightControlData( @@ -300,6 +312,10 @@ FFW.RC = FFW.RPCObserver.create( if(request.params.moduleData.seatControlData){ newSeatControlData = SDL.SeatModel.setSeatControlData( request.params.moduleData.seatControlData); + if (Object.keys(request.params.moduleData.seatControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'SEAT', + seatControlData: newSeatControlData}); + } }; // send repsonse var JSONMessage = { From 9c293a96fa435962e179e5d60496525f4db3441a Mon Sep 17 00:00:00 2001 From: conlain-k Date: Tue, 3 Jul 2018 11:04:45 -0500 Subject: [PATCH 063/102] Fix break/brake typo --- app/model/sdl/VehicleInfoModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index f03d4f6af..313c90709 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -115,7 +115,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', 'odometer': 'VEHICLEDATA_ODOMETER', 'beltStatus': 'VEHICLEDATA_BELTSTATUS', - 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBREAKSTATUS', + 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBRAKESTATUS', 'bodyInformation': 'VEHICLEDATA_BODYINFO', 'deviceStatus': 'VEHICLEDATA_DEVICESTATUS', 'eCallInfo': 'VEHICLEDATA_ECALLINFO', From ec57561388ac49f85bd542fb99a00992d368d908 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Wed, 20 Jun 2018 16:18:22 -0400 Subject: [PATCH 064/102] Add basic electronic park break status to hmi --- app/model/sdl/VehicleInfoModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 0561a7373..f03d4f6af 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -115,6 +115,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', 'odometer': 'VEHICLEDATA_ODOMETER', 'beltStatus': 'VEHICLEDATA_BELTSTATUS', + 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBREAKSTATUS', 'bodyInformation': 'VEHICLEDATA_BODYINFO', 'deviceStatus': 'VEHICLEDATA_DEVICESTATUS', 'eCallInfo': 'VEHICLEDATA_ECALLINFO', @@ -168,6 +169,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'externalTemperature': null, 'vin': '52-452-52-752', 'prndl': 'PARK', + 'electronicParkBrakeStatus': 'OPEN', 'tirePressure': { 'pressureTelltale': 'OFF', 'leftFront': { From 6d8a0eeb1659e2702306d881861a56016b79b982 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Thu, 21 Jun 2018 16:54:49 -0400 Subject: [PATCH 065/102] add turn signal to vehicle model --- app/model/sdl/VehicleInfoModel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index f03d4f6af..7bfb57f76 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -110,6 +110,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'instantFuelConsumption': 'VEHICLEDATA_FUELCONSUMPTION', 'fuelRange': 'VEHICLEDATA_FUELRANGE', 'externalTemperature': 'VEHICLEDATA_EXTERNTEMP', + 'turnSignal': 'VEHICLEDATA_TURNSIGNAL', 'vin': 'VEHICLEDATA_VIN', 'prndl': 'VEHICLEDATA_PRNDL', 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', @@ -168,6 +169,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'instantFuelConsumption': 2.2E0, 'externalTemperature': null, 'vin': '52-452-52-752', + 'turnSignal': 'OFF', 'prndl': 'PARK', 'electronicParkBrakeStatus': 'OPEN', 'tirePressure': { From a101060f3d9e990d9446e4a921b5aa86da532578 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Fri, 22 Jun 2018 11:19:09 -0400 Subject: [PATCH 066/102] get the default value right --- app/model/sdl/VehicleInfoModel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 7bfb57f76..8062e8907 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -294,7 +294,6 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'steeringWheelAngle': 1.2E0, 'engineOilLife': 20.4E0, 'abs_State': 'ACTIVE', - 'turnSignal': 'ACTIVE', 'tirePressureValue': { 'leftFront': 2.2E0, 'rightFront': 2.2E0, From 33498b3dd4fa6912f6cfe5c9a84972ab19add96d Mon Sep 17 00:00:00 2001 From: conlain-k Date: Tue, 3 Jul 2018 11:04:45 -0500 Subject: [PATCH 067/102] Fix break/brake typo --- app/model/sdl/VehicleInfoModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/model/sdl/VehicleInfoModel.js b/app/model/sdl/VehicleInfoModel.js index 8062e8907..b11f13f7f 100644 --- a/app/model/sdl/VehicleInfoModel.js +++ b/app/model/sdl/VehicleInfoModel.js @@ -116,7 +116,7 @@ SDL.SDLVehicleInfoModel = Em.Object.create( 'tirePressure': 'VEHICLEDATA_TIREPRESSURE', 'odometer': 'VEHICLEDATA_ODOMETER', 'beltStatus': 'VEHICLEDATA_BELTSTATUS', - 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBREAKSTATUS', + 'electronicParkBrakeStatus': 'VEHICLEDATA_ELECTRONICPARKBRAKESTATUS', 'bodyInformation': 'VEHICLEDATA_BODYINFO', 'deviceStatus': 'VEHICLEDATA_DEVICESTATUS', 'eCallInfo': 'VEHICLEDATA_ECALLINFO', From bfd7ffe56a348e885122ad44b2e55c66a1e7a9ae Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Fri, 20 Jul 2018 17:33:47 +0300 Subject: [PATCH 068/102] Audio Source AM/FM/XM/DAB Add request with `moduletype=AUDIO` for seting source `AM/FM/XM`. --- app/controller/MediaController.js | 17 ++++++++++++++--- app/model/media/RadioModel.js | 28 ++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index a9bc8830d..adab7d5e2 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -592,7 +592,9 @@ SDL.MediaController = Em.Object.create( }, switchSource: function (source) { switch (source) { - case 'RADIO_TUNER': this.turnOnRadio(); break; + case 'AM': + case 'XM': + case 'FM': this.turnOnRadio(); break; case 'BLUETOOTH_STEREO_BTST': this.turnOnBluetooth(); break; case 'CD': this.turnOnCD(); break; case 'USB': this.turnOnUSB(); break; @@ -624,7 +626,9 @@ SDL.MediaController = Em.Object.create( SDL.SDLController.onEventChanged('player', true); } switch (data.source) { - case 'RADIO_TUNER': SDL.States.set('media.player.radio.active', true); + case 'AM': + case 'XM': + case 'FM': SDL.States.set('media.player.radio.active', true); SDL.States.set('media.player.cd.active', false); SDL.States.set('media.player.usb.active', false); SDL.States.set('media.player.bluetooth.active', false); @@ -692,7 +696,9 @@ SDL.MediaController = Em.Object.create( SDL.SDLController.onEventChanged('player', true); } switch (data.source) { - case 'RADIO_TUNER': + case 'AM': + case 'XM': + case 'FM': this.setFalseStateModel(); SDL.RadioModel.set('active', true); this.set('activeState', 'media.player.radio'); @@ -735,6 +741,8 @@ SDL.MediaController = Em.Object.create( } } else { return this.setAudioControlData(data); } + SDL.RadioModel.checkoutRadioSource(data); + if (data.volume != null) { this.set('currentVolume', data.volume); result.volume = data.volume; @@ -772,6 +780,9 @@ SDL.MediaController = Em.Object.create( setAudioControlData: function (data) { result = {}; if (data.source != null) { + + SDL.RadioModel.checkoutRadioSource(data); + this.set('lastRadioControlStruct.source', data.source); this.switchSource(data.source); result.source = data.source; diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 879262737..382edf72b 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -638,6 +638,30 @@ SDL.RadioModel = Em.Object.create({ return result; }, + checkoutRadioSource: function(data){ + if(data.source == 'AM' || + data.source == 'FM' || + data.source == 'XM'){ + + if (data.source != this.radioControlStruct.band) { + SDL.RadioModel.setRadioBand(data.source); + + if (data.source == 'FM') { + this.switchRadioBandFrequency(data.frequencyInteger == null); + } + if (data.source == 'AM') { + this.switchRadioBandFrequency(data.frequencyInteger == null); + } + if (data.source == 'XM') { + this.switchRadioBandFrequency(data.frequencyInteger == null); + } + } else { + this.updateCurrentFrequencyInfo(); + } + } + return; + }, + setRadioData: function(data) { var properties = []; @@ -1466,12 +1490,12 @@ SDL.RadioModel = Em.Object.create({ this.setSource(); var data = SDL.MediaController.getAudioControlData(); if(data){ - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: {'source':data.source}}); + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData: {'source':this.lastOptionParams.band}}); } }, setSource:function() { - SDL.MediaController.lastRadioControlStruct.source='RADIO_TUNER'; + SDL.MediaController.lastRadioControlStruct.source=this.lastOptionParams.band; }, exitPopUp:function (param){ From b4e087f84757475d15a4ec8ae08a25e5c5212996 Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Tue, 24 Jul 2018 14:17:55 +0300 Subject: [PATCH 069/102] Add `UNSUPPORTED_RESOURCE` error response Add `UNSUPPORTED_RESOURCE` error response from `HMI` when the app send `moduleType=AUDIO/RADIO` with `source/band=DAB` Answer to review --- app/model/media/RadioModel.js | 11 +---------- ffw/RCRPC.js | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 382edf72b..be02f1bb6 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -645,16 +645,7 @@ SDL.RadioModel = Em.Object.create({ if (data.source != this.radioControlStruct.band) { SDL.RadioModel.setRadioBand(data.source); - - if (data.source == 'FM') { - this.switchRadioBandFrequency(data.frequencyInteger == null); - } - if (data.source == 'AM') { this.switchRadioBandFrequency(data.frequencyInteger == null); - } - if (data.source == 'XM') { - this.switchRadioBandFrequency(data.frequencyInteger == null); - } } else { this.updateCurrentFrequencyInfo(); } @@ -1495,7 +1486,7 @@ SDL.RadioModel = Em.Object.create({ }, setSource:function() { - SDL.MediaController.lastRadioControlStruct.source=this.lastOptionParams.band; + SDL.MediaController.lastRadioControlStruct.source = this.lastOptionParams.band; }, exitPopUp:function (param){ diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 4dbb1613a..dfd1e9c36 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -281,20 +281,38 @@ FFW.RC = FFW.RPCObserver.create( } } if (request.params.moduleData.radioControlData) { + if(request.params.moduleData.radioControlData.band && + request.params.moduleData.radioControlData.band == 'DAB'){ + this.sendError( + SDL.SDLModel.data.resultCode.UNSUPPORTED_RESOURCE, + request.id, request.method,'DAB not supported' + ); + return; + } else { newRadioControlData = SDL.RadioModel.setRadioData( request.params.moduleData.radioControlData); - if (SDL.RadioModel.radioControlStruct.radioEnable) { - SDL.RadioModel.saveCurrentOptions(); + if (SDL.RadioModel.radioControlStruct.radioEnable) { + SDL.RadioModel.saveCurrentOptions(); + } } } if(request.params.moduleData.audioControlData){ + if(request.params.moduleData.audioControlData.source && + request.params.moduleData.audioControlData.source == 'DAB'){ + this.sendError( + SDL.SDLModel.data.resultCode.UNSUPPORTED_RESOURCE, + request.id, request.method,'DAB not supported' + ); + return; + } else { newAudioControlData = (request.params.moduleData.audioControlData.keepContext!=null)? SDL.MediaController.setAudioControlDataWithKeepContext(request.params.moduleData.audioControlData) :SDL.MediaController.setAudioControlData(request.params.moduleData.audioControlData); - if (Object.keys(request.params.moduleData.audioControlData).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO', + if (Object.keys(request.params.moduleData.audioControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO', audioControlData: newAudioControlData}); + } } } if(request.params.moduleData.hmiSettingsControlData){ From 8fe9372b7804005a13f008cd24b9f270cd665f05 Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 2 May 2018 11:58:12 +0300 Subject: [PATCH 070/102] Add implementation low voltage on the HMI - add button for send system signals to the 'Exit application' view - add websocket server as the submodule which listen signal from the HMI - add system signal client which send system signals to the SDL --- .gitmodules | 3 ++ app/Flags.js | 1 + app/model/sdl/Abstract/data.js | 17 +++++++ app/view/sdl/ExitAppView.js | 68 ++++++++++++++++++++++--- css/sdl.css | 52 ++++++++++++++++++- deploy_server.sh | 54 ++++++++++++++++++++ ffw/RPCSimpleClient.js | 89 ++++++++++++++++++++++++++++++++ index.html | 1 + python_websocket | 1 + tools/start_server.py | 92 ++++++++++++++++++++++++++++++++++ 10 files changed, 368 insertions(+), 10 deletions(-) create mode 100644 .gitmodules create mode 100755 deploy_server.sh create mode 100644 ffw/RPCSimpleClient.js create mode 160000 python_websocket create mode 100644 tools/start_server.py diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..8404407ca --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "python_websocket"] + path = python_websocket + url = https://github.com/Pithikos/python-websocket-server.git diff --git a/app/Flags.js b/app/Flags.js index 8334f18bd..f125fd08a 100644 --- a/app/Flags.js +++ b/app/Flags.js @@ -42,6 +42,7 @@ FLAGS = Em.Object.create( */ SET_LOCALIZATION: 'eng', WEBSOCKET_URL: 'ws://127.0.0.1:8087', + PYTHON_SERVER_URL: 'ws://127.0.0.1:8081', CAN_WEBSOCKET_URL: 'ws://127.0.0.1:2468', TOUCH_EVENT_STARTED: false, BasicCommunication: null, diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index 45d672710..ac5c5b0a1 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -297,6 +297,23 @@ SDL.SDLModelData = Em.Object.create( id: 3 } ], + /** + * List of signals + */ + Signals: [ + { + name: 'WAKE_UP', + id: 0 + }, + { + name: 'IGNITION_OFF', + id: 1 + }, + { + name: 'LOW_VOLTAGE', + id: 2 + } + ], /** * List of states for OnSystemRequest notification */ diff --git a/app/view/sdl/ExitAppView.js b/app/view/sdl/ExitAppView.js index 4df8609f1..9d486c34f 100644 --- a/app/view/sdl/ExitAppView.js +++ b/app/view/sdl/ExitAppView.js @@ -46,7 +46,11 @@ SDL.ExitApp = Em.ContainerView.create( 'onAwakeSDLLabel', 'onAwakeSDLButton', 'onDeactivateSelect', - 'onDeactivateLabel' + 'onDeactivateLabel', + 'signalLabel', + 'signalSelect', + 'sendAppStateButton', + 'sendSignalButton' ], /** * Title of VehicleInfo PopUp view @@ -72,6 +76,28 @@ SDL.ExitApp = Em.ContainerView.create( content: 'Exit Application reason' } ), + /** + * Title of signal PopUp view + */ + signalLabel: SDL.Label.extend( + { + elementId: 'signalLabel', + classNames: 'signalLabel', + content: 'Signal' + } + ), + /** + * HMI element Select with parameters of signal states + */ + signalSelect: Em.Select.extend( + { + elementId: 'signalSelect', + classNames: 'signalSelect', + contentBinding: 'SDL.SDLModel.data.Signals', + optionValuePath: 'content.id', + optionLabelPath: 'content.name' + } + ), /** * HMI element Select with parameters of TBTClientStates */ @@ -81,13 +107,7 @@ SDL.ExitApp = Em.ContainerView.create( classNames: 'exitAppViewSelect', contentBinding: 'SDL.SDLModel.data.exitAppState', optionValuePath: 'content.id', - optionLabelPath: 'content.name', - /** - * Selected data sent on model for further processing - */ - click: function() { - SDL.SDLController.exitAppViewSelected(this.selection.name); - } + optionLabelPath: 'content.name' } ), onAwakeSDLLabel: SDL.Label.extend( @@ -107,6 +127,38 @@ SDL.ExitApp = Em.ContainerView.create( onDown: false } ), + /** + * HMI element Button for send exit state + */ + sendAppStateButton:SDL.Button.extend( + { + elementId:'sendAppStateButton', + classNames: 'button sendAppStateButton', + text: 'Send state', + action:function(){ + SDL.SDLController.exitAppViewSelected(SDL.ExitApp.exitAppViewSelect.selection.name); + }, + target: 'SDL.SDLController', + buttonAction: true, + onDown: false + } + ), + /** + * HMI element Button for send signal + */ + sendSignalButton:SDL.Button.extend( + { + elementId:'sendSignalButton', + classNames: 'button sendSignalButton', + text: 'Send signal', + action:function(){ + FFW.RPCSimpleClient.send(SDL.ExitApp.signalSelect.selection.name); + }, + target: 'SDL.SDLController', + buttonAction: true, + onDown: false +} +), onDeactivateLabel: SDL.Label.extend( { elementId: 'onDeactivateLabel', diff --git a/css/sdl.css b/css/sdl.css index 179bac85b..14f9c5837 100644 --- a/css/sdl.css +++ b/css/sdl.css @@ -610,13 +610,22 @@ #VehicleInfo .speedLabel, #PrimaryDevice .chooseLabel { top: 70px; - width: 600px; + width: 290px; left: 40px; height: 20px; padding: 10px; background: #535353; } +#exitAppView .signalLabel{ + top: 70px; + width: 290px; + left: 355px; + height: 20px; + padding: 10px; + background: #535353; + } + #VehicleInfo .vehicleDataChange { top: 125px; width: 150px; @@ -667,7 +676,17 @@ top: 125px; position: absolute; width: 150px; - left: 275px; + left: 40px; + height: 40px; + color: white; + background: #393939; +} + +#exitAppView .signalSelect{ + top: 125px; + position: absolute; + width: 150px; + left: 355px; height: 40px; color: white; background: #393939; @@ -762,6 +781,35 @@ border: 1px solid white; } +#exitAppView .sendAppStateButton { + right: 268px; + top: 125px; + width: 127px; + left: 200px; + height: 18px; + padding: 10px; + line-height: 22px; + border-radius: 0px; + border: 1px solid white; +} + +#exitAppView .sendSignalButton { + right: 268px; + top: 125px; + width: 127px; + left: 516px; + height: 18px; + padding: 10px; + line-height: 22px; + border-radius: 0px; + border: 1px solid white; +} + +#exitAppView .onAwakeSDLButton.pressed, +#exitAppView .sendAppStateButton.pressed { + border: 1px solid red; +} + #VehicleInfo .odometrTitle { top: 180px; width: 290px; diff --git a/deploy_server.sh b/deploy_server.sh new file mode 100755 index 000000000..824fcdca9 --- /dev/null +++ b/deploy_server.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Copyright (c) 2018 Ford Motor Company, +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of Ford Motor Company nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +TARGET_SCRIPT="start_server.py" +TARGET_DIR="./python_websocket" +SOURCE_DIR="./tools" + +DeployServer() { + git submodule init + git submodule update +} + +StartServer() { + echo "Starting HMI signals listener..." + cp $SOURCE_DIR/$TARGET_SCRIPT $TARGET_DIR + python3 $TARGET_DIR/$TARGET_SCRIPT + rm $TARGET_DIR/$TARGET_SCRIPT + echo "HMI signals listener was stopped" +} + +if find $TARGET_DIR -mindepth 1 | read; then + StartServer +else + echo "Fetching HMI dependencies..." + DeployServer + StartServer +fi diff --git a/ffw/RPCSimpleClient.js b/ffw/RPCSimpleClient.js new file mode 100644 index 000000000..09fd744e7 --- /dev/null +++ b/ffw/RPCSimpleClient.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2018, Ford Motor Company All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: · + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. · Redistributions in binary + * form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided + * with the distribution. · Neither the name of the Ford Motor Company nor the + * names of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +FFW.RPCSimpleClient = Em.Object.create({ + + socket:null, + sendData: [], + init:function(){ + }, + connect:function(){ + this.socket = new WebSocket(FLAGS.PYTHON_SERVER_URL); + var self = this; + this.socket.onopen = function(evt) { + self.onWSOpen(evt); + }; + this.socket.onclose = function(evt) { + self.onWSClose(evt); + }; + this.socket.onmessage = function(evt) { + self.onWSMessage(evt); + }; + }, + triggerMessageSend: function() { + var self = this; + setTimeout( + function() { + self.onSend(); + }, 100 + ); + }, + send:function(data){ + this.sendData.push(data); + + if(!this.socket) { + this.connect(); + return; + } + this.triggerMessageSend(); + }, + onSend: function(){ + var msg = this.sendData.pop(); + Em.Logger.log('Message to be sent: ' + msg); + + if (this.socket && this.socket.readyState == this.socket.OPEN){ + this.socket.send(msg); + } + if (this.sendData.length > 0) { + this.triggerMessageSend(); + } else { + this.socket.close(); + } + }, + onWSMessage: function(evt) { + Em.Logger.log('Message received: ' + evt.data); + }, + onWSOpen: function(evt) { + Em.Logger.log('RPCSimpleCLient.onWSOpen'); + if (this.sendData.length > 0) { + this.triggerMessageSend(); + } + }, + onWSClose: function(evt) { + Em.Logger.log('RPCSimpleClient: Connection is closed'); + this.set('socket', null); + } + } +); diff --git a/index.html b/index.html index 1bd467929..c9b5ade6f 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,7 @@ + diff --git a/python_websocket b/python_websocket new file mode 160000 index 000000000..ae6ee7f5d --- /dev/null +++ b/python_websocket @@ -0,0 +1 @@ +Subproject commit ae6ee7f5d400cde43e2cb89b8c5aec812e927082 diff --git a/tools/start_server.py b/tools/start_server.py new file mode 100644 index 000000000..048781df7 --- /dev/null +++ b/tools/start_server.py @@ -0,0 +1,92 @@ +# Copyright (c) 2018 Ford Motor Company, +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of Ford Motor Company nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from websocket_server import WebsocketServer +from threading import Thread +from time import sleep +import os +import signal + +# Called for every client connecting (after handshake) +def new_client(client, server): + print("New client connected and was given id %d\r" % client['id']) + # server.server_close() + +# Called for every client disconnecting +def client_left(client, server): + print("Client(%d) disconnected\r" % client['id']) + +# Called when a client sends a message +def message_received(client, server, message): + print("Client(%d) said: %s\r" % (client['id'], message)) + + # The value is taken from the file src/appMain/smartDeviceLink.ini + # Offset from SIGRTMIN + offset = {'LOW_VOLTAGE': 1, 'WAKE_UP': 2, 'IGNITION_OFF': 3} + + signal_value = signal.Signals['SIGRTMIN'].value + signal_value += offset[message] + + cmd_command = 'ps -ef | grep smartDeviceLinkCore | grep -v grep | awk \'{print $2}\' | xargs kill -' + str(signal_value) + os.system(cmd_command) + +def getch(): + import sys, tty, termios + fd = sys.stdin.fileno() + old_settings = termios.tcgetattr(fd) + try: + tty.setraw(sys.stdin.fileno()) + ch = sys.stdin.read(1) + finally: + termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) + + return ch + +def startServer(server): + print("HMI signals listener was started\r") + server.set_fn_new_client(new_client) + server.set_fn_client_left(client_left) + server.set_fn_message_received(message_received) + server.run_forever() + +def keyBoardEvent(): + global server + char = ' ' + while char != 'q': + char = getch() + +server = WebsocketServer(8081) +serverThread = Thread(target = startServer, args = (server, )) +keyBoardThread = Thread(target = keyBoardEvent) +keyBoardThread.start() +serverThread.start() + +keyBoardThread.join() +print("Closing server...") +server.shutdown() +server.server_close() From 675f41384fea085d98c1cd6562899ce4d1e6196d Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Tue, 14 Aug 2018 12:05:17 +0300 Subject: [PATCH 071/102] Remove `gpsLocation` struct and reuse `GPSData` struct --- app/model/media/RadioModel.js | 20 +++++++------- app/view/media/player/radioView.js | 44 +++++++++++++++--------------- css/media.css | 4 +-- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 879262737..636d25fc3 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -186,7 +186,7 @@ SDL.RadioModel = Em.Object.create({ stationLocation:{ longitudeDegrees:0.1, latitudeDegrees:0.1, - altitudeMeters:0.1 + altitude:0.1 }, stationMessage:'station message' }, @@ -218,8 +218,8 @@ SDL.RadioModel = Em.Object.create({ }, stationLongName:true, stationLocation:{ - gpsLocation:true, - altitudeMeters:true + gpsData:true, + altitude:true }, stationMessage:true }, @@ -611,11 +611,11 @@ SDL.RadioModel = Em.Object.create({ if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId){ result.sisData.stationIDNumber.fccFacilityId=parseInt(this.radioControlStruct.sisData.stationIDNumber.fccFacilityId); } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsLocation){ + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsData){ result.sisData.stationLocation.longitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.longitudeDegrees); result.sisData.stationLocation.latitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.latitudeDegrees); - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitudeMeters){ - result.sisData.stationLocation.altitudeMeters=parseFloat(this.radioControlStruct.sisData.stationLocation.altitudeMeters); + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitude){ + result.sisData.stationLocation.altitude=parseFloat(this.radioControlStruct.sisData.stationLocation.altitude); } } @@ -751,7 +751,7 @@ SDL.RadioModel = Em.Object.create({ 'stationLocation':{ 'longitudeDegrees':this.radioControlStruct.sisData.stationLocation.longitudeDegrees, 'latitudeDegrees':this.radioControlStruct.sisData.stationLocation.latitudeDegrees, - 'altitudeMeters': this.radioControlStruct.sisData.stationLocation.altitudeMeters + 'altitude': this.radioControlStruct.sisData.stationLocation.altitude }, 'stationIDNumber':{ 'countryCode':this.radioControlStruct.sisData.stationIDNumber.countryCode, @@ -793,7 +793,7 @@ SDL.RadioModel = Em.Object.create({ this.set('lastOptionParams.sisData.stationLocation', {}); this.set('lastOptionParams.sisData.stationLocation.longitudeDegrees', result.sisData.stationLocation.longitudeDegrees); this.set('lastOptionParams.sisData.stationLocation.latitudeDegrees', result.sisData.stationLocation.latitudeDegrees); - this.set('lastOptionParams.sisData.stationLocation.altitudeMeters', result.sisData.stationLocation.altitudeMeters); + this.set('lastOptionParams.sisData.stationLocation.altitude', result.sisData.stationLocation.altitude); this.set('lastOptionParams.sisData.stationIDNumber', {}); this.set('lastOptionParams.sisData.stationIDNumber.countryCode', result.sisData.stationIDNumber.countryCode); this.set('lastOptionParams.sisData.stationIDNumber.fccFacilityId', result.sisData.stationIDNumber.fccFacilityId); @@ -1615,8 +1615,8 @@ SDL.RadioModel = Em.Object.create({ if(data.stationLocation.latitudeDegrees!=null){ this.set('radioControlStruct.sisData.stationLocation.latitudeDegrees',data.stationLocation.latitudeDegrees); } - if(data.stationLocation.altitudeMeters!=null){ - this.set('radioControlStruct.sisData.stationLocation.altitudeMeters',data.stationLocation.altitudeMeters); + if(data.stationLocation.altitude!=null){ + this.set('radioControlStruct.sisData.stationLocation.altitude',data.stationLocation.altitude); } }, setAvailableHDs: function(value) { diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 968fea480..457a75612 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -116,8 +116,8 @@ SDL.RadioView = Em.ContainerView 'stationLongNameCheckBox', 'stationLongNameLabel', 'stationLongNameInput', - 'gpsLocationLabel', - 'gpsLocationCheckBox', + 'gpsDataLabel', + 'gpsDataCheckBox', 'longitudeLabel', 'longitudeInput', 'latitudeLabel', @@ -210,11 +210,11 @@ SDL.RadioView = Em.ContainerView attributeBindings: ['disabled'], elementId: 'altitudeCheckBox', classNames: 'altitudeCheckBox', - checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitude', isDisabled: function() { - return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData; }.property( - 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData' ), disabledBinding: 'isDisabled' } @@ -231,14 +231,14 @@ SDL.RadioView = Em.ContainerView attributeBindings: ['disabled'], elementId: 'altitudeInput', classNames: 'altitudeInput', - valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.altitudeMeters', + valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.altitude', isDisabled: function() { - return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation ? - !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation - :!SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters; + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData ? + !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData + :!SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitude; }.property( - 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation', - 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitudeMeters' + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData', + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.altitude' ), disabledBinding: 'isDisabled' } @@ -259,9 +259,9 @@ SDL.RadioView = Em.ContainerView classNames: 'latitudeInput', valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.latitudeDegrees', isDisabled: function() { - return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData; }.property( - 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData' ), disabledBinding: 'isDisabled' } @@ -282,18 +282,18 @@ SDL.RadioView = Em.ContainerView classNames: 'longitudeInput', valueBinding: 'SDL.RadioModel.lastOptionParams.sisData.stationLocation.longitudeDegrees', isDisabled: function() { - return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation; + return !SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData; }.property( - 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData' ), disabledBinding: 'isDisabled' } ), - gpsLocationCheckBox: Em.Checkbox.extend( + gpsDataCheckBox: Em.Checkbox.extend( { - elementId: 'gpsLocationCheckBox', - classNames: 'gpsLocationCheckBox', - checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsLocation' + elementId: 'gpsDataCheckBox', + classNames: 'gpsDataCheckBox', + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.sisData.stationLocation.gpsData' } ), stationLongNameCheckBox: Em.Checkbox.extend( @@ -361,10 +361,10 @@ SDL.RadioView = Em.ContainerView content: 'Sis Data list' } ), - gpsLocationLabel: SDL.Label.extend( + gpsDataLabel: SDL.Label.extend( { - elementId: 'gpsLocationLabel', - classNames: 'gpsLocationLabel', + elementId: 'gpsDataLabel', + classNames: 'gpsDataLabel', content: 'GPS Location:' } ), diff --git a/css/media.css b/css/media.css index 106f2bc2c..def941c05 100644 --- a/css/media.css +++ b/css/media.css @@ -243,14 +243,14 @@ } -#radio_options_view_container .gpsLocationLabel { +#radio_options_view_container .gpsDataLabel { left: 40px; top: 330px; } -#radio_options_view_container .gpsLocationCheckBox { +#radio_options_view_container .gpsDataCheckBox { position: absolute; left: 25px; top: 330px; From 08eb716654d738b1eea0acdee20c87626dab0d00 Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Tue, 14 Aug 2018 12:15:12 +0300 Subject: [PATCH 072/102] Remove `sRGBColor` struct and reuse `RGBColor` struct. Change light capabilities parameter `sRGBColorSpaceAvailable` to `rgbColorSpaceAvailable`. --- app/model/LightModel.js | 12 ++++++------ app/model/media/RadioModel.js | 3 +++ app/view/media/player/radioView.js | 2 +- app/view/settings/light/sendMessage.js | 20 ++++++++++---------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 8f352c309..2c5438178 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -109,7 +109,7 @@ SDL.LightModel = Em.Object.create({ id: 'FRONT_LEFT_HIGH_BEAM', status: 'OFF', density: 0.1, - sRGBColor:{ + color:{ red: 0, green: 100, blue: 255 @@ -125,7 +125,7 @@ SDL.LightModel = Em.Object.create({ id: struct[i], status: 'OFF', density: 1, - sRGBColor:{ + color:{ red: 255, green: 255, blue: 255 @@ -148,7 +148,7 @@ SDL.LightModel = Em.Object.create({ result.push({ name: struct[i], densityAvailable: true, - sRGBColorSpaceAvailable: true, + RGBColorSpaceAvailable: true, }); } return capabilities; @@ -180,9 +180,9 @@ SDL.LightModel = Em.Object.create({ if(null != data.lightState[i].density){ this.set('lightState.'+j+'.density', data.lightState[i].density); } - if(null != data.lightState[i].sRGBColor){ - this.set('lightState.'+j+'.sRGBColor', - data.lightState[i].sRGBColor); + if(null != data.lightState[i].color){ + this.set('lightState.'+j+'.color', + data.lightState[i].color); } if(data.lightState[i].id == SDL.LightModel.lightSettings.id){ SDL.LightModel.set('lightSettings',this.lightState[j]) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 636d25fc3..89f9106d0 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -1549,6 +1549,9 @@ SDL.RadioModel = Em.Object.create({ properties.push('stationLocation.latitudeDegrees'); }else if(properties.indexOf('stationLocation.latitudeDegrees')>=0){ properties.push('stationLocation.longitudeDegrees'); + }else if(properties.indexOf('stationLocation.altitude')>=0){ + properties.push('stationLocation.latitudeDegrees'); + properties.push('stationLocation.longitudeDegrees'); } SDL.RadioModel.sendRadioChangeNotification(properties); }, diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 457a75612..297f99092 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -365,7 +365,7 @@ SDL.RadioView = Em.ContainerView { elementId: 'gpsDataLabel', classNames: 'gpsDataLabel', - content: 'GPS Location:' + content: 'Station Location:' } ), stationShortNameCheckbox: Em.Checkbox.extend( diff --git a/app/view/settings/light/sendMessage.js b/app/view/settings/light/sendMessage.js index 75268e89f..4d494c635 100644 --- a/app/view/settings/light/sendMessage.js +++ b/app/view/settings/light/sendMessage.js @@ -25,9 +25,9 @@ SDL.SendMessage = Em.ContainerView.create({ }, setSetting: function(){ SDL.LightModel.lightSettings.density = parseFloat(SDL.LightModel.lightSettings.density); - SDL.LightModel.lightSettings.sRGBColor.red = parseInt(SDL.LightModel.lightSettings.sRGBColor.red); - SDL.LightModel.lightSettings.sRGBColor.green = parseInt(SDL.LightModel.lightSettings.sRGBColor.green); - SDL.LightModel.lightSettings.sRGBColor.blue = parseInt(SDL.LightModel.lightSettings.sRGBColor.blue); + SDL.LightModel.lightSettings.color.red = parseInt(SDL.LightModel.lightSettings.color.red); + SDL.LightModel.lightSettings.color.green = parseInt(SDL.LightModel.lightSettings.color.green); + SDL.LightModel.lightSettings.color.blue = parseInt(SDL.LightModel.lightSettings.color.blue); var length = SDL.LightModel.lightState.length; var data = SDL.deepCopy(SDL.LightModel.lightSettings); @@ -39,10 +39,10 @@ SDL.SendMessage = Em.ContainerView.create({ break; } } - if(data.sRGBColor.red == oldData.sRGBColor.red && - data.sRGBColor.green == oldData.sRGBColor.green && - data.sRGBColor.blue == oldData.sRGBColor.blue){ - delete data['sRGBColor']; + if(data.color.red == oldData.color.red && + data.color.green == oldData.color.green && + data.color.blue == oldData.color.blue){ + delete data['color']; } if(data.density == oldData.density){ delete data['density']; @@ -112,21 +112,21 @@ SDL.SendMessage = Em.ContainerView.create({ { elementId: 'rInput', classNames: 'rInput', - valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.red', + valueBinding: 'SDL.LightModel.lightSettings.color.red', } ), gInput: Ember.TextField.extend( { elementId: 'gInput', classNames: 'gInput', - valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.green', + valueBinding: 'SDL.LightModel.lightSettings.color.green', } ), bInput: Ember.TextField.extend( { elementId: 'bInput', classNames: 'bInput', - valueBinding: 'SDL.LightModel.lightSettings.sRGBColor.blue', + valueBinding: 'SDL.LightModel.lightSettings.color.blue', } ), setButton: SDL.Button.extend({ From 11b961b7b89836e9025859a1973be65402a3aeae Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Wed, 15 Aug 2018 19:32:57 +0300 Subject: [PATCH 073/102] Rename `RGBColorSpaceAvailable` to `rgbColorSpaceAvailable` --- app/model/LightModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 2c5438178..412242eda 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -148,7 +148,7 @@ SDL.LightModel = Em.Object.create({ result.push({ name: struct[i], densityAvailable: true, - RGBColorSpaceAvailable: true, + rgbColorSpaceAvailable: true, }); } return capabilities; From ba4797778dd40d205c932e5a2df23ab0ce659720 Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Wed, 15 Aug 2018 21:30:24 +0300 Subject: [PATCH 074/102] LightName struct --- app/model/LightModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 412242eda..3e7082da8 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -53,8 +53,8 @@ SDL.LightModel = Em.Object.create({ 'REAR_RIGHT_FOG_LIGHT', 'REAR_LEFT_TAIL_LIGHT', 'REAR_RIGHT_TAIL_LIGHT', - 'REAR_LEFT_BREAK_LIGHT', - 'REAR_RIGHT_BREAK_LIGHT', + 'REAR_LEFT_BRAKE_LIGHT', + 'REAR_RIGHT_BRAKE_LIGHT', 'REAR_LEFT_TURN_LIGHT', 'REAR_RIGHT_TURN_LIGHT', 'REAR_REGISTRATION_PLATE_LIGHT' From 4171c6d306123ffb28ef7c682fcc34ef7f9e05c6 Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Fri, 17 Aug 2018 12:29:37 +0300 Subject: [PATCH 075/102] Answer for two issue First issue is about bug when audio source selected twice and HMI deactivates this source on the screen. Second issue is about bug when on the HMI RC access mode is `ASK_DRIVER` and HMI shows info in the pop up isn't correct. --- app/controller/MediaController.js | 12 ++++++------ app/controller/sdl/RController.js | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/controller/MediaController.js b/app/controller/MediaController.js index a9bc8830d..7112638b8 100644 --- a/app/controller/MediaController.js +++ b/app/controller/MediaController.js @@ -229,8 +229,8 @@ SDL.MediaController = Em.Object.create( this.set('tempSource',''); }, turnOnCD: function () { - this.deactivateAll(); if (!SDL.States.media.player.cd.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.cd'); } this.onPlayerEnter(SDL.CDModel, 'cd'); @@ -240,8 +240,8 @@ SDL.MediaController = Em.Object.create( * Turn on USB */ turnOnUSB: function () { - this.deactivateAll(); if (!SDL.States.media.player.usb.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.usb'); } this.onPlayerEnter(SDL.USBModel, 'usb'); @@ -251,8 +251,8 @@ SDL.MediaController = Em.Object.create( * Turn on Radio */ turnOnRadio: function () { - this.deactivateAll(); if (!SDL.States.media.player.radio.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.radio'); } SDL.RadioModel.saveCurrentOptions(); @@ -260,8 +260,8 @@ SDL.MediaController = Em.Object.create( this.returnParameters(); }, turnOnBluetooth: function () { - this.deactivateAll(); if (!SDL.States.media.player.bluetooth.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.bluetooth'); } this.onPlayerEnter(SDL.BluetoothModel, 'bluetooth'); @@ -269,8 +269,8 @@ SDL.MediaController = Em.Object.create( }, turnOnLineIn: function () { - this.deactivateAll(); if (!SDL.States.media.player.lineIn.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.lineIn'); } this.onPlayerEnter(SDL.LineInModel, 'lineIn'); @@ -278,8 +278,8 @@ SDL.MediaController = Em.Object.create( }, turnOnIPod: function () { - this.deactivateAll(); if (!SDL.States.media.player.ipod.active) { + this.deactivateAll(); SDL.States.goToStates('media.player.ipod'); } this.onPlayerEnter(SDL.IPodModel, 'ipod'); diff --git a/app/controller/sdl/RController.js b/app/controller/sdl/RController.js index 4e1c91833..c20641871 100644 --- a/app/controller/sdl/RController.js +++ b/app/controller/sdl/RController.js @@ -474,6 +474,14 @@ SDL.RController = SDL.SDLController.extend( module = 'Climate'; } else if (request.params.moduleType == 'RADIO') { module = 'Radio'; + }else if (request.params.moduleType == 'SEAT') { + module = 'Seat'; + }else if (request.params.moduleType == 'AUDIO') { + module = 'Audio'; + }else if (request.params.moduleType == 'LIGHT') { + module = 'Light'; + }else if (request.params.moduleType == 'HMI_SETTINGS') { + module = 'HMI settings'; } var popUp = SDL.PopUp.create().appendTo('body').popupActivate( From ada3c8ddf6bf0471abd9f18d6a0702fb854027dd Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 30 May 2018 14:43:58 +0300 Subject: [PATCH 076/102] Update remote control lights Add new parameters to LightName struct: - `REAR_CARGO_LIGHTS` - `REAR_TRUCK_BED_LIGHTS` - `REAR_TRAILER_LIGHTS` - `LEFT_SPOT_LIGHTS` - `RIGHT_SPOT_LIGHTS` - `LEFT_PUDDLE_LIGHTS` - `RIGHT_PUDDLE_LIGHTS` - `EXTERIOR_ALL_LIGHTS` Update LightStatus struct: - `RAMP_UP` - `RAMP_DOWN` - `UNKNOWN` - `INVALID` Update light capabilities: - `statusAvailable` --- app/model/LightModel.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/model/LightModel.js b/app/model/LightModel.js index 3e7082da8..8c3a744af 100644 --- a/app/model/LightModel.js +++ b/app/model/LightModel.js @@ -75,6 +75,13 @@ SDL.LightModel = Em.Object.create({ 'LEFT_TURN_LIGHTS', 'RIGHT_TURN_LIGHTS', 'HAZARD_LIGHTS', + 'REAR_CARGO_LIGHTS', + 'REAR_TRUCK_BED_LIGHTS', + 'REAR_TRAILER_LIGHTS', + 'LEFT_SPOT_LIGHTS', + 'RIGHT_SPOT_LIGHTS', + 'LEFT_PUDDLE_LIGHTS', + 'RIGHT_PUDDLE_LIGHTS' ], /* @@ -94,7 +101,8 @@ SDL.LightModel = Em.Object.create({ 'EXTERIOR_FRONT_LIGHTS', 'EXTERIOR_REAR_LIGHTS', 'EXTERIOR_LEFT_LIGHTS', - 'EXTERIOR_RIGHT_LIGHTS' + 'EXTERIOR_RIGHT_LIGHTS', + 'EXTERIOR_ALL_LIGHTS' ], /* @@ -102,7 +110,11 @@ SDL.LightModel = Em.Object.create({ */ lightStatusStruct:[ 'ON', - 'OFF' + 'OFF', + 'RAMP_UP', + 'RAMP_DOWN', + 'UNKNOWN', + 'INVALID' ], lightSettings: { @@ -149,6 +161,7 @@ SDL.LightModel = Em.Object.create({ name: struct[i], densityAvailable: true, rgbColorSpaceAvailable: true, + statusAvailable: true, }); } return capabilities; From c67a4c5bf034602f38cbdc436bc1ffc2de74d793 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Mon, 18 Jun 2018 19:27:04 +0300 Subject: [PATCH 077/102] Added file with RC_Capabilities. --- capabilities/rc_capabilities.js | 384 ++++++++++++++++++++++++++++++++ ffw/RCRPC.js | 40 +--- index.html | 4 + 3 files changed, 389 insertions(+), 39 deletions(-) create mode 100644 capabilities/rc_capabilities.js diff --git a/capabilities/rc_capabilities.js b/capabilities/rc_capabilities.js new file mode 100644 index 000000000..4f9ee8203 --- /dev/null +++ b/capabilities/rc_capabilities.js @@ -0,0 +1,384 @@ +SDL.remoteControlCapability = +{ + buttonCapabilities: [{ + longPressAvailable: true, + name: 'AC_MAX', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'AC', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'RECIRCULATE', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'FAN_UP', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'FAN_DOWN', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'TEMP_UP', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'TEMP_DOWN', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'DEFROST_MAX', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'DEFROST', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'DEFROST_REAR', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'UPPER_VENT', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'LOWER_VENT', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'VOLUME_UP', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'VOLUME_DOWN', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'EJECT', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'SOURCE', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'SHUFFLE', + shortPressAvailable: true, + upDownAvailable: false + }, { + longPressAvailable: true, + name: 'REPEAT', + shortPressAvailable: true, + upDownAvailable: false + }], + climateControlCapabilities: [{ + acEnableAvailable: true, + acMaxEnableAvailable: true, + autoModeEnableAvailable: true, + circulateAirEnableAvailable: true, + currentTemperatureAvailable: true, + defrostZone: ['FRONT', 'REAR', 'ALL', 'NONE'], + defrostZoneAvailable: true, + desiredTemperatureAvailable: true, + dualModeEnableAvailable: true, + heatedMirrorsAvailable: true, + heatedRearWindowAvailable: true, + heatedSteeringWheelAvailable: true, + heatedWindshieldAvailable: true, + fanSpeedAvailable: true, + moduleName: 'primary_climate', + ventilationMode: ['UPPER', 'LOWER', 'BOTH', 'NONE'], + ventilationModeAvailable: true + }], + radioControlCapabilities: [{ + availableHDsAvailable: true, + hdChannelAvailable: true, + moduleName: 'radio', + radioBandAvailable: true, + radioEnableAvailable: true, + radioFrequencyAvailable: true, + rdsDataAvailable: true, + signalChangeThresholdAvailable: true, + signalStrengthAvailable: true, + sisDataAvailable: true, + stateAvailable: true + }], + audioControlCapabilities: [{ + moduleName: 'audio', + sourceAvailable: true, + volumeAvailable: true, + equalizerAvailable: true, + keepContextAvailable: true, + equalizerMaxChannelId: 10 + }], + lightControlCapabilities: { + moduleName: 'light', + supportedLights: [{ + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_HIGH_BEAM', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_HIGH_BEAM', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_LOW_BEAM', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_LOW_BEAM', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_PARKING_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_PARKING_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_FOG_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_FOG_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_DAYTIME_RUNNING_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_DAYTIME_RUNNING_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_LEFT_TURN_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FRONT_RIGHT_TURN_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_LEFT_FOG_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_RIGHT_FOG_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_LEFT_TAIL_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_RIGHT_TAIL_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_LEFT_BREAK_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_RIGHT_BREAK_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_LEFT_TURN_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_RIGHT_TURN_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_REGISTRATION_PLATE_LIGHT', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'HIGH_BEAMS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'LOW_BEAMS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'FOG_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'RUNNING_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'PARKING_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'BRAKE_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'REAR_REVERSING_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'SIDE_MARKER_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'LEFT_TURN_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'RIGHT_TURN_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'HAZARD_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'AMBIENT_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'OVERHEAD_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'READING_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'TRUNK_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'EXTERIOR_FRONT_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'EXTERIOR_REAR_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'EXTERIOR_LEFT_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: true, + densityAvailable: true, + name: 'EXTERIOR_RIGHT_LIGHTS', + sRGBColorSpaceAvailable: true + }, { + statusAvailable: false, + densityAvailable: false, + name: 'REAR_CARGO_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'REAR_TRUCK_BED_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'REAR_TRAILER_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'LEFT_SPOT_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'RIGHT_SPOT_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'LEFT_PUDDLE_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: false, + densityAvailable: false, + name: 'RIGHT_PUDDLE_LIGHTS', + sRGBColorSpaceAvailable: false + }, { + statusAvailable: true, + densityAvailable: false, + name: 'EXTERIOR_ALL_LIGHTS', + sRGBColorSpaceAvailable: false + }] + }, + hmiSettingsControlCapabilities: { + moduleName: 'hmiSettings', + distanceUnitAvailable: true, + temperatureUnitAvailable: true, + displayModeUnitAvailable: true + } +} diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index dfd1e9c36..341ce90fb 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -177,44 +177,6 @@ FFW.RC = FFW.RPCObserver.create( case 'RC.GetCapabilities': { Em.Logger.log('FFW.' + request.method + ' Request'); - var remoteControlCapability = {}; - - var climateControlCapabilities = - SDL.ClimateController.model.getClimateControlCapabilities(); - var radioControlCapabilities = - SDL.RadioModel.getRadioControlCapabilities(); - var audioControlCapabilities = - SDL.MediaController.getAudioControlCapabilities(); - var hmiSettingsControlCapabilities = - SDL.HmiSettingsModel.getHmiSettingsCapabilities(); - var lightControlCapabilities = - SDL.LightModel.getLightCapabilities(); - var seatControlCapabilities = - SDL.SeatModel.getSeatCapabilities(); - - var buttonCapabilities = []; - - buttonCapabilities = buttonCapabilities.concat( - SDL.ClimateController.model.getClimateButtonCapabilities() - ); - buttonCapabilities = buttonCapabilities.concat( - SDL.RadioModel.getRadioButtonCapabilities() - ); - - remoteControlCapability.climateControlCapabilities = - climateControlCapabilities; - remoteControlCapability.radioControlCapabilities = - radioControlCapabilities; - remoteControlCapability.hmiSettingsControlCapabilities = - hmiSettingsControlCapabilities; - remoteControlCapability.lightControlCapabilities = - lightControlCapabilities; - remoteControlCapability.seatControlCapabilities = - seatControlCapabilities; - remoteControlCapability.buttonCapabilities = - buttonCapabilities; - remoteControlCapability.audioControlCapabilities = - audioControlCapabilities; // send repsonse var JSONMessage = { @@ -223,7 +185,7 @@ FFW.RC = FFW.RPCObserver.create( 'result': { 'code': SDL.SDLModel.data.resultCode.SUCCESS, 'method': request.method, - 'remoteControlCapability': remoteControlCapability + 'remoteControlCapability': SDL.remoteControlCapability } }; this.client.send(JSONMessage); diff --git a/index.html b/index.html index 82ec0487e..97872bf14 100644 --- a/index.html +++ b/index.html @@ -249,6 +249,10 @@ src="app/view/home/statusNavigationView.js"> + + + + From 4948c9681be29ef1b2b202ec452503dd68a44430 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Thu, 21 Jun 2018 11:40:05 +0300 Subject: [PATCH 078/102] Fixed onInteriorVehicleDataNotification --- ffw/RCRPC.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 341ce90fb..d5b29b461 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -288,6 +288,11 @@ FFW.RC = FFW.RPCObserver.create( if(request.params.moduleData.lightControlData){ newLightControlData = SDL.LightModel.setLightControlData( request.params.moduleData.lightControlData); + + if (Object.keys(newLightControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'LIGHT', + lightControlData: request.params.moduleData.lightControlData}); + } } if(request.params.moduleData.seatControlData){ newSeatControlData = SDL.SeatModel.setSeatControlData( From e08a956c6953c8c0d6c7261c834cd44d1789230f Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Tue, 10 Jul 2018 16:35:14 +0300 Subject: [PATCH 079/102] Interior Vehicle Data Subscription Management and Data Caching in SDL Erase appId processing on the GIVD request at the next file: - ffw/RCRPC.js --- ffw/RCRPC.js | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index dfd1e9c36..5e03e697e 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -233,14 +233,6 @@ FFW.RC = FFW.RPCObserver.create( { Em.Logger.log('FFW.' + request.method + ' Request'); - if (!this.consentedAppCheck(request)) { - this.sendError( - SDL.SDLModel.data.resultCode.REJECTED, - request.id, request.method - ); - return; - } - if (request.params.moduleData.radioControlData) { if (request.params.moduleData.radioControlData.radioEnable == null && SDL.RadioModel.radioControlStruct.radioEnable == false) { @@ -380,22 +372,6 @@ FFW.RC = FFW.RPCObserver.create( { Em.Logger.log('FFW.' + request.method + ' Request'); - if (request.params.appID == undefined) { - this.sendError( - SDL.SDLModel.data.resultCode.INVALID_DATA, request.id, - request.method, 'appID parameter missing!' - ); - return; - } - - if (!this.consentedAppCheck(request)) { - this.sendError( - SDL.SDLModel.data.resultCode.REJECTED, - request.id, request.method - ); - return; - } - var moduleType = request.params.moduleType; var climateControlData = null; var radioControlData = null; @@ -616,32 +592,5 @@ FFW.RC = FFW.RPCObserver.create( Em.Logger.log('FFW.RC.OnInteriorVehicleData Notification'); FFW.RC.client.send(JSONMessage); }, - /** - * Verification for consented apps - * HMI should reject secon unconsented app - * @param request - */ - consentedAppCheck: function(request) { - var appID = request.params.appID; - var moduleType = null; - if (request.params.moduleDescription) { - moduleType = request.params.moduleDescription.moduleType; - } else if (request.params.moduleData) { - moduleType = request.params.moduleData.moduleType; - } else { - moduleType = request.params.moduleType; - } - - var deviceName = SDL.SDLController.getApplicationModel(appID) - .deviceName; - - if ((SDL.SDLModel.driverDeviceInfo && - deviceName != SDL.SDLModel.driverDeviceInfo.name) || - !SDL.SDLModel.reverseFunctionalityEnabled) { - return false; - } - - return true; - } } ); From f6cb40b2ae8b359d640079bdb2b472a66ea87f4e Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Mon, 20 Aug 2018 15:02:45 +0300 Subject: [PATCH 080/102] Update RC capabilities according to Revise SDL-0099 --- capabilities/rc_capabilities.js | 96 ++++++++++++++++----------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/capabilities/rc_capabilities.js b/capabilities/rc_capabilities.js index 4f9ee8203..50c6cecb1 100644 --- a/capabilities/rc_capabilities.js +++ b/capabilities/rc_capabilities.js @@ -137,242 +137,242 @@ SDL.remoteControlCapability = statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_HIGH_BEAM', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_HIGH_BEAM', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_LOW_BEAM', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_LOW_BEAM', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_PARKING_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_PARKING_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_FOG_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_FOG_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_DAYTIME_RUNNING_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_DAYTIME_RUNNING_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_LEFT_TURN_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FRONT_RIGHT_TURN_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_LEFT_FOG_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_RIGHT_FOG_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_LEFT_TAIL_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_RIGHT_TAIL_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_LEFT_BREAK_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_RIGHT_BREAK_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_LEFT_TURN_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_RIGHT_TURN_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_REGISTRATION_PLATE_LIGHT', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'HIGH_BEAMS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'LOW_BEAMS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'FOG_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'RUNNING_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'PARKING_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'BRAKE_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'REAR_REVERSING_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'SIDE_MARKER_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'LEFT_TURN_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'RIGHT_TURN_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'HAZARD_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'AMBIENT_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'OVERHEAD_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'READING_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'TRUNK_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'EXTERIOR_FRONT_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'EXTERIOR_REAR_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'EXTERIOR_LEFT_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, name: 'EXTERIOR_RIGHT_LIGHTS', - sRGBColorSpaceAvailable: true + rgbColorSpaceAvailable: true }, { statusAvailable: false, densityAvailable: false, name: 'REAR_CARGO_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'REAR_TRUCK_BED_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'REAR_TRAILER_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'LEFT_SPOT_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'RIGHT_SPOT_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'LEFT_PUDDLE_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: false, densityAvailable: false, name: 'RIGHT_PUDDLE_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }, { statusAvailable: true, densityAvailable: false, name: 'EXTERIOR_ALL_LIGHTS', - sRGBColorSpaceAvailable: false + rgbColorSpaceAvailable: false }] }, hmiSettingsControlCapabilities: { From 11a70223ca91659db29b1611c245f56633f6951c Mon Sep 17 00:00:00 2001 From: JackLivio Date: Mon, 20 Aug 2018 15:22:15 -0400 Subject: [PATCH 081/102] Fix Brake Typo --- capabilities/rc_capabilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/capabilities/rc_capabilities.js b/capabilities/rc_capabilities.js index 50c6cecb1..122ff9abe 100644 --- a/capabilities/rc_capabilities.js +++ b/capabilities/rc_capabilities.js @@ -216,12 +216,12 @@ SDL.remoteControlCapability = }, { statusAvailable: true, densityAvailable: true, - name: 'REAR_LEFT_BREAK_LIGHT', + name: 'REAR_LEFT_BRAKE_LIGHT', rgbColorSpaceAvailable: true }, { statusAvailable: true, densityAvailable: true, - name: 'REAR_RIGHT_BREAK_LIGHT', + name: 'REAR_RIGHT_BRAKE_LIGHT', rgbColorSpaceAvailable: true }, { statusAvailable: true, From aff16a149be277c39b5333b4c59c1c652c7a9a88 Mon Sep 17 00:00:00 2001 From: Andrii Kalinich Date: Tue, 21 Aug 2018 11:37:30 +0300 Subject: [PATCH 082/102] Fix double send of OnInteriorVehicleData notification During SetIVD request handling --- app/StateManager.js | 40 +++++++++++++++++++++++----------------- ffw/RCRPC.js | 6 ++++++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/app/StateManager.js b/app/StateManager.js index dcba75c83..58d29a6a8 100644 --- a/app/StateManager.js +++ b/app/StateManager.js @@ -251,9 +251,10 @@ var StateManager = Em.StateManager.extend( radio: Em.State.create( { enter: function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { SDL.RadioModel.sendAudioNotification(); + } if (!SDL.RadioModel.radioControlStruct.radioEnable) { SDL.RadioModel.radioEnableKeyPress(); } @@ -273,9 +274,10 @@ var StateManager = Em.StateManager.extend( cd: Em.State.create( { enter: function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); - SDL.CDModel.sendAudioNotification(); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { + SDL.CDModel.sendAudioNotification(); + } this._super(); }, exit: function() { @@ -295,9 +297,10 @@ var StateManager = Em.StateManager.extend( usb: Em.State.create( { enter: function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); - SDL.USBModel.sendAudioNotification(); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { + SDL.USBModel.sendAudioNotification(); + } this._super(); }, exit: function() { @@ -320,9 +323,10 @@ var StateManager = Em.StateManager.extend( { enter:function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); - SDL.BluetoothModel.sendAudioNotification(); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { + SDL.BluetoothModel.sendAudioNotification(); + } this._super(); }, exit:function() @@ -343,9 +347,10 @@ var StateManager = Em.StateManager.extend( { enter:function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); - SDL.LineInModel.sendAudioNotification(); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { + SDL.LineInModel.sendAudioNotification(); + } this._super(); }, exit:function() @@ -367,9 +372,10 @@ var StateManager = Em.StateManager.extend( { enter:function() { - SDL.MediaController.set('activeState', - SDL.States.nextState); - SDL.IPodModel.sendAudioNotification(); + SDL.MediaController.set('activeState', SDL.States.nextState); + if (!FFW.RC.isSetVdInProgress) { + SDL.IPodModel.sendAudioNotification(); + } this._super(); }, exit:function() diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 5e03e697e..c793444ec 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -40,6 +40,10 @@ FFW.RC = FFW.RPCObserver.create( * @type {Boolean} */ isReady: true, + /** + * If true then RC controller currently handles SetIVD request + */ + isSetVdInProgress: false, /** * Contains response codes for request that should be processed but there * were some kind of errors Error codes will be injected into response. @@ -232,6 +236,7 @@ FFW.RC = FFW.RPCObserver.create( case 'RC.SetInteriorVehicleData': { Em.Logger.log('FFW.' + request.method + ' Request'); + this.set('isSetVdInProgress', true); if (request.params.moduleData.radioControlData) { if (request.params.moduleData.radioControlData.radioEnable == null @@ -366,6 +371,7 @@ FFW.RC = FFW.RPCObserver.create( } this.client.send(JSONMessage); + this.set('isSetVdInProgress', false); break; } case 'RC.GetInteriorVehicleData': From 69cd5f97901144bfaa28388753e7fb253f32499d Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Tue, 21 Aug 2018 15:23:37 -0400 Subject: [PATCH 083/102] Add LOW_VOLTAGE information to README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 972c1a96f..29ebb77fe 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,13 @@ A quick guide to installing, configuring, and running HMI. 1. run SmartDeviceLinkCore 2. run chromium-browser [root_of_cloned_sdl_hmi_repo/index.html] +## Simulating signals for LOW_VOLTAGE feature +In order to simulate UNIX signals used by the LOW_VOLTAGE feature, some additional setup is required + + 1. run `deploy_server.sh` + 2. run the HMI normally + 3. open the `Exit Application` menu, choose a signal from the menu and press `Send signal` + ## A quick note about dependencies All dependencies are installed after the SDL Core is successfully installed. @@ -17,3 +24,5 @@ SDL HMI utility is only for acquaintance with the SDL project. ## Look at configuration file app/FLAGS.js. You can found there: - SDL WebSocket connection string - WEBSOCKET_URL + - Python WebSocket url for handling signals - +PYTHON_SERVER_URL From 32f997923ededb557e2147550d1472714d8b13a2 Mon Sep 17 00:00:00 2001 From: Valerii Date: Wed, 30 May 2018 14:09:24 +0300 Subject: [PATCH 084/102] Update remote control radio parameter Add new parameter to RadioControlData: - `hdRadioEnable` Update max value from 3 to 7 for the next parameters: - `availableHDs` - `hdChannel` Add new radio control capabilities: - `hdRadioenableAvailable` - `siriusxmRadioAvailable` --- app/model/media/RadioModel.js | 93 ++++++++++++++++++----- app/view/media/player/radioView.js | 115 ++++++++++++++++++++--------- ffw/RCRPC.js | 29 +++++++- images/media/hd_logo_gray.png | Bin 0 -> 15592 bytes 4 files changed, 182 insertions(+), 55 deletions(-) create mode 100644 images/media/hd_logo_gray.png diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 741872283..91c4338e6 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -81,10 +81,33 @@ SDL.RadioModel = Em.Object.create({ availableHDs: 3, hdChannelsStruct: [ - 0, 1, 2, - 3 + 3, + 4, + 5, + 6, + 7 + ], + + hdChannelCurrent:[ + true, + false, + false, + false, + false, + false, + false + ], + + hdChannelAvailableCurrent:[ + true, + true, + true, + true, + true, + true, + true ], stateStruct: [ @@ -165,6 +188,7 @@ SDL.RadioModel = Em.Object.create({ radioControlStruct: { frequencyInteger: 87, frequencyFraction: 9, + hdRadioEnable: true, band: 'FM', rdsData: { PS: 'name', @@ -236,7 +260,7 @@ SDL.RadioModel = Em.Object.create({ 'radioStation': { 'frequency': 89, 'fraction': 5, - 'availableHDs': 3, + 'availableHDs': 7, 'currentHD': 1 }, 'songInfo': { @@ -479,6 +503,8 @@ SDL.RadioModel = Em.Object.create({ hdChannelAvailable: true, rdsDataAvailable: true, availableHDsAvailable: true, + hdRadioEnableAvailable: true, + siriusxmRadioAvailable: true, stateAvailable: true, signalStrengthAvailable: true, signalChangeThresholdAvailable: true, @@ -542,6 +568,7 @@ SDL.RadioModel = Em.Object.create({ frequencyInteger: this.radioControlStruct.frequencyInteger, frequencyFraction: this.radioControlStruct.frequencyFraction, radioEnable: this.radioControlStruct.radioEnable, + hdRadioEnable: this.radioControlStruct.hdRadioEnable, rdsData: {}, sisData:{ stationIDNumber:{}, @@ -576,15 +603,16 @@ SDL.RadioModel = Em.Object.create({ if (forceGetAll || this.radioControlCheckboxes.rdsData.REG) { result.rdsData.REG = this.radioControlStruct.rdsData.REG; } - - if (forceGetAll || this.radioControlCheckboxes.availableHDs) { - if (this.radioControlStruct.availableHDs > 0) { - result.availableHDs = this.radioControlStruct.availableHDs; + if(this.radioControlStruct.hdRadioEnable){ + if (forceGetAll || this.radioControlCheckboxes.availableHDs) { + if (this.radioControlStruct.availableHDs > 0) { + result.availableHDs = this.radioControlStruct.availableHDs; + } } - } - if (forceGetAll || this.radioControlCheckboxes.hdChannel) { - if (this.radioControlStruct.hdChannel > 0) { - result.hdChannel = this.radioControlStruct.hdChannel; + if (forceGetAll || this.radioControlCheckboxes.hdChannel) { + if (this.radioControlStruct.hdChannel > 0) { + result.hdChannel = this.radioControlStruct.hdChannel; + } } } if (forceGetAll || this.radioControlCheckboxes.signalStrength) { @@ -653,6 +681,19 @@ SDL.RadioModel = Em.Object.create({ return; }, + setCurrentHd:function(data){ + for(var i =0; i 0)) { + SDL.RadioModel.setHDRadioEnable(SDL.RadioModel.radioControlStruct.hdRadioEnable ? + false : true); + SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable']); + SDL.RadioModel.set('radioControlCheckboxes.availableHDs',SDL.RadioModel.radioControlStruct.hdRadioEnable); + SDL.RadioModel.set('radioControlCheckboxes.hdChannel',SDL.RadioModel.radioControlStruct.hdRadioEnable); + } + }, optionsMenu: Em.ContainerView.create( { @@ -684,9 +692,17 @@ SDL.RadioView = Em.ContainerView ), availableHDsCheckbox: Em.Checkbox.extend( { + attributeBindings: ['disabled'], elementId: 'availableHDsCheckbox', classNames: 'availableHDsCheckbox', - checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.availableHDs' + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.availableHDs', + isDisabled: function() { + return !SDL.RadioModel.lastOptionParams.hdRadioEnable; + }.property( + 'SDL.RadioModel.lastOptionParams.hdRadioEnable' + ), + disabledBinding: 'isDisabled', + } ), availableHDsLabel: SDL.Label.extend( @@ -713,9 +729,16 @@ SDL.RadioView = Em.ContainerView ), hdChannelCheckbox: Em.Checkbox.extend( { + attributeBindings: ['disabled'], elementId: 'hdChannelCheckbox', classNames: 'hdChannelCheckbox', - checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.hdChannel' + checkedBinding: 'SDL.RadioModel.radioControlCheckboxes.hdChannel', + isDisabled: function() { + return !SDL.RadioModel.lastOptionParams.hdRadioEnable; + }.property( + 'SDL.RadioModel.lastOptionParams.hdRadioEnable' + ), + disabledBinding: 'isDisabled', } ), hdChannelLabel: SDL.Label.extend( @@ -734,11 +757,8 @@ SDL.RadioView = Em.ContainerView var result = SDL.RadioModel.hdChannelsStruct.slice(); var index = result.indexOf( SDL.RadioModel.lastOptionParams.availableHDs); - result.splice(index + 1, index + result.length - 1); - var maxHdValue = result[result.length - 1]; - if (maxHdValue > 0) { - result.splice(0, 1); - } + result.splice(index+1, result.length); + var maxHdValue = result[result.length]; if (!this.content || result) { this.set('content', result); } @@ -869,39 +889,28 @@ SDL.RadioView = Em.ContainerView if (SDL.RadioModel.radioControlStruct.band == 'XM') { return false; } + else if(!SDL.RadioModel.radioControlStruct.hdRadioEnable){ + return false; + } + SDL.RadioModel.setHDRadioEnable(SDL.RadioModel.radioControlStruct.availableHDs > 0); return (SDL.RadioModel.radioControlStruct.availableHDs > 0); }.property('SDL.RadioModel.radioControlStruct.band', - 'SDL.RadioModel.radioControlStruct.availableHDs'), - HDChannel1: function() { - return (SDL.RadioModel.radioControlStruct.hdChannel == 1); - }.property('SDL.RadioModel.radioControlStruct.hdChannel'), - HDChannel1Availability: function() { - return (SDL.RadioModel.radioControlStruct.availableHDs >= 1); - }.property('SDL.RadioModel.radioControlStruct.availableHDs'), - HDChannel2: function() { - return (SDL.RadioModel.radioControlStruct.hdChannel == 2); - }.property('SDL.RadioModel.radioControlStruct.hdChannel'), - HDChannel2Availability: function() { - return (SDL.RadioModel.radioControlStruct.availableHDs >= 2); - }.property('SDL.RadioModel.radioControlStruct.availableHDs'), - HDChannel3: function() { - return (SDL.RadioModel.radioControlStruct.hdChannel == 3); - }.property('SDL.RadioModel.radioControlStruct.hdChannel'), - HDChannel3Availability: function() { - return (SDL.RadioModel.radioControlStruct.availableHDs >= 3); - }.property('SDL.RadioModel.radioControlStruct.availableHDs'), + 'SDL.RadioModel.radioControlStruct.availableHDs', + 'SDL.RadioModel.radioControlStruct.hdRadioEnable'), STAName: function() { return 'STA-' + SDL.RadioModel.station.toString().replace('.', ''); }.property('SDL.RadioModel.station'), StationName: function() { var station = SDL.RadioModel.station; - if (SDL.RadioModel.radioControlStruct.availableHDs > 0) { + if (SDL.RadioModel.radioControlStruct.availableHDs > 0 & + SDL.RadioModel.radioControlStruct.hdRadioEnable) { station += '-' + SDL.RadioModel.radioControlStruct.hdChannel; } return station; }.property('SDL.RadioModel.station', 'SDL.RadioModel.radioControlStruct.hdChannel', - 'SDL.RadioModel.radioControlStruct.availableHDs'), + 'SDL.RadioModel.radioControlStruct.availableHDs', + 'SDL.RadioModel.radioControlStruct.hdRadioEnable'), songInfo: function() { var data = SDL.RadioModel.radioDetails; if (data) { @@ -926,30 +935,64 @@ SDL.RadioView = Em.ContainerView .compile( '{{#with view}}' + '
' + - '
' + + '
' + '{{#if HDRadio}}' + '' + - '{{#if HDChannel1Availability}}' + - '{{#if HDChannel1}}' + + '{{else}}' + + '' + + '{{/if}}' + + '
' + + '{{#if HDRadio}}' + + '
' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[0]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[0]}}' + ' 1 ' + '{{else}}' + ' 1 ' + '{{/if}}' + '{{/if}}' + - '{{#if HDChannel2Availability}}' + - '{{#if HDChannel2}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[1]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[1]}}' + ' 2 ' + '{{else}}' + ' 2 ' + '{{/if}}' + '{{/if}}' + - '{{#if HDChannel3Availability}}' + - '{{#if HDChannel3}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[2]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[2]}}' + ' 3 ' + '{{else}}' + ' 3 ' + '{{/if}}' + '{{/if}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[3]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[3]}}' + + ' 4 ' + + '{{else}}' + + ' 4 ' + + '{{/if}}' + + '{{/if}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[4]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[4]}}' + + ' 5 ' + + '{{else}}' + + ' 5 ' + + '{{/if}}' + + '{{/if}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[5]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[5]}}' + + ' 6 ' + + '{{else}}' + + ' 6 ' + + '{{/if}}' + + '{{/if}}' + + '{{#if SDL.RadioModel.hdChannelAvailableCurrent.[6]}}' + + '{{#if SDL.RadioModel.hdChannelCurrent.[6]}}' + + ' 7 ' + + '{{else}}' + + ' 7 ' + + '{{/if}}' + + '{{/if}}' + '{{/if}}' + '
' + '
{{STAName}}
' + diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 0a763a92f..8550a52f4 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -299,7 +299,7 @@ FFW.RC = FFW.RPCObserver.create( seatControlData: newSeatControlData}); } }; - // send repsonse + // send response var JSONMessage = { 'jsonrpc': '2.0', 'id': request.id, @@ -565,5 +565,32 @@ FFW.RC = FFW.RPCObserver.create( Em.Logger.log('FFW.RC.OnInteriorVehicleData Notification'); FFW.RC.client.send(JSONMessage); }, + /** + * Verification for consented apps + * HMI should reject secon unconsented app + * @param request + */ + consentedAppCheck: function(request) { + var appID = request.params.appID; + var moduleType = null; + if (request.params.moduleDescription) { + moduleType = request.params.moduleDescription.moduleType; + } else if (request.params.moduleData) { + moduleType = request.params.moduleData.moduleType; + } else { + moduleType = request.params.moduleType; + } + + var deviceName = SDL.SDLController.getApplicationModel(appID) + .deviceName; + + if ((SDL.SDLModel.driverDeviceInfo && + deviceName != SDL.SDLModel.driverDeviceInfo.name) || + !SDL.SDLModel.reverseFunctionalityEnabled) { + return false; + } + + return true; + }, } ); diff --git a/images/media/hd_logo_gray.png b/images/media/hd_logo_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..a450d28369f5bb81151ee389a5707477ca1a07cd GIT binary patch literal 15592 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 literal 0 HcmV?d00001 From 16c17ae1125f54d3d0c058499fd653506718733f Mon Sep 17 00:00:00 2001 From: v-malko4 Date: Fri, 15 Jun 2018 17:55:38 +0300 Subject: [PATCH 085/102] Add parameters to notification hdRadioEnable Add parameters to notification in case when switching hdRadio enable --- app/view/media/player/radioView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index fff167e50..2d2727d45 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -54,9 +54,15 @@ SDL.RadioView = Em.ContainerView if (SDL.RadioModel.radioControlStruct.band != 'XM' & (SDL.RadioModel.radioControlStruct.availableHDs > 0)) { SDL.RadioModel.setHDRadioEnable(SDL.RadioModel.radioControlStruct.hdRadioEnable ? false : true); - SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable']); SDL.RadioModel.set('radioControlCheckboxes.availableHDs',SDL.RadioModel.radioControlStruct.hdRadioEnable); SDL.RadioModel.set('radioControlCheckboxes.hdChannel',SDL.RadioModel.radioControlStruct.hdRadioEnable); + if(SDL.RadioModel.radioControlStruct.hdRadioEnable){ + SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable','availableHDs','hdChannel']); + } + else{ + SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable']); + } + } }, From 7cbba3bfbc4ea003258b784ec350c9eb70b00077 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Tue, 19 Jun 2018 11:43:50 +0300 Subject: [PATCH 086/102] Fix XM channel numbers. --- app/model/media/RadioModel.js | 125 +++++++++++++++++++++++++++------- 1 file changed, 99 insertions(+), 26 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 91c4338e6..66d90680a 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -149,29 +149,102 @@ SDL.RadioModel = Em.Object.create({ ] }, - xmStations: {2: "SiriusXM Hits", 3: "Venus", 4: "SiriusXM Spotlight", - 5: "50s on 5", 6: "60s on 6", 7: "70s on 7", 8: "80s on 8", 9: "90s on 9", - 10: "Pop2K", 11: "KIIS-Los Angeles", 12: "Z100/NY", 13: "Pitbull", 14: "The Coffee House", - 15: "The Pulse", 16: "The Blend", 17: "PopRocks", 18: "The Beatles Channel", - 19: "Elvis Radio", 20: "E Street Radio", 21: "Underground Garage", 22: "Pearl Jam Radio", - 23: "Grateful Dead Channel", 24: "Radio Margaritaville", 25: "Classic Rewind", - 26: "Classic Vinyl", 27: "Deep Tracks", 28: "The Spectrum", 29: "Jam_ON", 30: "The Loft", - 31: "Tom Petty Radio", 32: "The Bridge", 33: "1st Wave", 34: "Lithium", 35: "SiriusXMU", - 36: "Alt Nation", 37: "Octane", 38: "Ozzys Boneyard", 39: "Hair Nation", 40: "Liquid Metal", - 41: "SiriusXM Turbo", 42: "The Joint", 43: "Backspin", 44: "Hip-Hop Nation", 45: "Shade 45", - 46: "The Heat", 47: "SiriusXM FLY", 48: "Heart & Soul", 49: "Soul Town", 50: "The Groove", - 51: "BPM", 52: "Electric Area", 53: "SiriusXM Chill", 54: "Studio 54 Radio", - 55: "The Garth Channel", 56: "The Highway", 57: "No Shoes Radio", 58: "Prime Country", - 59: "Willies Roadhouse", 60: "Outlaw Country", 61: "Y2Kountry", 62: "Bluegrass Junction", - 63: "The Message", 64: "Kirk Praise", 65: "enLighten", 66: "Watercolors", 67: "Real Jazz", - 68: "Spa", 69: "Escape", 70: "SiriusXM Love", 71: "Siriusly Sinatra", 72: "On Broadway", - 73: "40s Junction", 74: "BB King", 75: "Met Opera Radio", 76: "Symphony Hall", - 77: "KIDZ BOP Radio", 78: "Kids Place Live", 79: "Radio Disney", 80: "ESPN Radio", - 81: "ESPN Xtra", 82: "Mad Dog Sports Radio", 83: "FOX Sports on SiriusXM", - 84: "SiriusXM College Sports Nation", 85: "SiriusXM FC", 88: "SiriusXM NFL Radio", - 90: "SiriusXM NASCAR Radio", 91: "SiriusXM NHL Network Radio™", 93: "SiriusXM Rush", - 94: "SiriusXM Comedy Greats", 95: "Comedy Central Radio", 96: "The Foxxhole", - 97: "Jeff & Larrys Comedy Roundup", 98: "Laugh USA", 99: "Raw Dog Comedy Hits", 100: "Howard 100"}, + xmStations: + {1: "SiriusXM Hits", + 2: "The Pulse", + 3: "The Highway", + 4: "The Joint", + 5: "Y2Kountry", + 6: "Laugh USA", + 7: "SiriusXM Spotlight", + 8: "90s on 9", + 9: "Pop2K", + 10: "KIIS-Los Angeles", + 11: "Z100/NY", + 12: "Pitbull", + 13: "The Coffee House", + 14: "Venus", + 15: "The Blend", + 16: "Raw Dog Comedy Hits", + 17: "PopRocks", + 18: "The Beatles Channel", + 19: "Elvis Radio", + 20: "E Street Radio", + 21: "Underground Garage", + 22: "Pearl Jam Radio", + 23: "Grateful Dead Channel", + 24: "Radio Margaritaville", + 25: "Classic Rewind", + 26: "Classic Vinyl", + 27: "Deep Tracks", + 28: "The Spectrum", + 29: "Jam_ON", + 30: "The Loft", + 31: "Tom Petty Radio", + 32: "The Bridge", + 33: "1st Wave", + 34: "Lithium", + 35: "SiriusXMU", + 36: "Alt Nation", + 37: "Octane", + 38: "Ozzys Boneyard", + 39: "Hair Nation", + 40: "Liquid Metal", + 41: "SiriusXM Turbo", + 42: "60s on 6", + 43: "Backspin", + 44: "Hip-Hop Nation", + 45: "Shade 45", + 46: "The Heat", + 47: "SiriusXM FLY", + 48: "Heart & Soul", + 49: "Soul Town", + 50: "The Groove", + 51: "BPM", + 52: "Electric Area", + 53: "SiriusXM Chill", + 54: "Studio 54 Radio", + 55: "The Garth Channel", + 56: "50s on 5", + 57: "No Shoes Radio", + 58: "Prime Country", + 59: "Willies Roadhouse", + 60: "Outlaw Country", + 61: "70s on 7", + 62: "Bluegrass Junction", + 63: "The Message", + 64: "Kirk Praise", + 65: "enLighten", + 66: "Watercolors", + 67: "Real Jazz", + 68: "Spa", + 69: "Escape", + 70: "SiriusXM Love", + 71: "Siriusly Sinatra", + 72: "On Broadway", + 73: "40s Junction", + 74: "BB King", + 75: "Met Opera Radio", + 76: "Symphony Hall", + 77: "KIDZ BOP Radio", + 78: "Kids Place Live", + 79: "Radio Disney", + 80: "ESPN Radio", + 81: "ESPN Xtra", + 82: "Mad Dog Sports Radio", + 83: "FOX Sports on SiriusXM", + 84: "SiriusXM College Sports Nation", + 85: "SiriusXM FC", + 88: "SiriusXM NFL Radio", + 90: "SiriusXM NASCAR Radio", + 91: "SiriusXM NHL Network Radio™", + 93: "SiriusXM Rush", + 94: "SiriusXM Comedy Greats", + 95: "Comedy Central Radio", + 96: "The Foxxhole", + 97: "Jeff & Larrys Comedy Roundup", + 98: "80s on 8", + 99: "Howard 100"}, directTuneItems: { 'FM': [], @@ -1309,10 +1382,10 @@ SDL.RadioModel = Em.Object.create({ data -= 1; } - if (data > 100) { + if (data > 99) { data = 1; } else if (data < 1) { - data = 100; + data = 99; } this.setFrequencyInteger(data); @@ -1525,7 +1598,7 @@ SDL.RadioModel = Em.Object.create({ this.setFrequencyInteger(540); } if (this.radioControlStruct.band === 'XM') { - this.setFrequencyInteger(2); + this.setFrequencyInteger(1); } } this.set('statusBar', this.radioControlStruct.band + ' Radio'); From 9de70a229c536441f2704bf43013b48ef282d38c Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Tue, 19 Jun 2018 11:52:59 +0300 Subject: [PATCH 087/102] Added file with RC_Capabilities. Add new radio control capabilities: hdRadioenableAvailable siriusxmRadioAvailable --- capabilities/rc_capabilities.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/capabilities/rc_capabilities.js b/capabilities/rc_capabilities.js index 122ff9abe..4a00365f1 100644 --- a/capabilities/rc_capabilities.js +++ b/capabilities/rc_capabilities.js @@ -113,6 +113,7 @@ SDL.remoteControlCapability = radioControlCapabilities: [{ availableHDsAvailable: true, hdChannelAvailable: true, + hdRadioEnableAvailable: true, moduleName: 'radio', radioBandAvailable: true, radioEnableAvailable: true, @@ -120,6 +121,7 @@ SDL.remoteControlCapability = rdsDataAvailable: true, signalChangeThresholdAvailable: true, signalStrengthAvailable: true, + siriusxmRadioAvailable: true, sisDataAvailable: true, stateAvailable: true }], From 9f7de60be38239084ed633b4f3043818659dd795 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Wed, 20 Jun 2018 14:39:38 +0300 Subject: [PATCH 088/102] Fixed onInteriorVehicleDataNotification --- app/model/media/RadioModel.js | 56 +++++++++++++++++++++++++++++++---- ffw/RCRPC.js | 7 +++-- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 66d90680a..c383d5821 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -773,6 +773,37 @@ SDL.RadioModel = Em.Object.create({ if (data.radioEnable != null) { this.setRadioEnable(data.radioEnable); properties.push('radioEnable'); + if(data.radioEnable){ + properties.push('hdRadioEnable'); + properties.push('frequencyInteger'); + properties.push('band'); + switch(this.radioControlStruct.band){ + case 'AM': + properties.push('availableHDs'); + properties.push('hdChannel'); + if(this.radioControlStruct.hdRadioEnable){ + properties.push('sisData.*'); + properties.push('stationIDNumber.*'); + properties.push('stationLocation.*'); + } + break; + case 'FM': + properties.push('availableHDs'); + properties.push('hdChannel'); + properties.push('frequencyFraction'); + properties.push('rdsData.*'); + if(this.radioControlStruct.hdRadioEnable){ + properties.push('sisData.*'); + properties.push('stationIDNumber.*'); + properties.push('stationLocation.*'); + } + break; + default: + properties.push('signalStrength'); + properties.push('signalChangeThreshold'); + properties.push('state'); + } + } } if (this.radioControlStruct.radioEnable) { @@ -780,6 +811,10 @@ SDL.RadioModel = Em.Object.create({ this.setHDRadioEnable(data.hdRadioEnable); this.set('radioControlCheckboxes.availableHDs',data.hdRadioEnable); this.set('radioControlCheckboxes.hdChannel',data.hdRadioEnable); + if(data.hdRadioEnable && properties.indexOf('availableHDs') == -1){ + properties.push('availableHDs'); + properties.push('hdChannel'); + } } if (data.frequencyInteger != null) { this.setFrequencyInteger(data.frequencyInteger); @@ -836,9 +871,10 @@ SDL.RadioModel = Em.Object.create({ this.setRadioState(data.state); } - properties = []; for (var key in data) { - properties.push(key); + if(properties.indexOf(key) == -1){ + properties.push(key); + } } if (properties.indexOf('band') >= 0) { @@ -1232,7 +1268,7 @@ SDL.RadioModel = Em.Object.create({ this.set('station', this.temp); } - if (this.optionsEnabled) { + if (this.optionsEnabled) { this.toggleOptions(); } @@ -1247,7 +1283,10 @@ SDL.RadioModel = Em.Object.create({ 'band', 'availableHDs', 'hdChannel', - 'rdsData.*' + 'rdsData.*', + this.radioControlStruct.hdRadioEnable ? 'sisData.*': '', + this.radioControlStruct.hdRadioEnable ? 'stationIDNumber.*': '', + this.radioControlStruct.hdRadioEnable ? 'stationLocation.*': '' ]); } else if (data.band == 'AM') { @@ -1256,7 +1295,11 @@ SDL.RadioModel = Em.Object.create({ 'frequencyInteger', 'band', 'availableHDs', - 'hdChannel']); + 'hdChannel', + this.radioControlStruct.hdRadioEnable ? 'sisData.*': '', + this.radioControlStruct.hdRadioEnable ? 'stationIDNumber.*': '', + this.radioControlStruct.hdRadioEnable ? 'stationLocation.*': '' + ]); } else { this.sendRadioChangeNotification(['radioEnable', 'hdRadioEnable', @@ -1264,7 +1307,8 @@ SDL.RadioModel = Em.Object.create({ 'band', 'signalStrength', 'signalChangeThreshold', - 'state']); + 'state' + ]); } }, diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 8550a52f4..7ff786cfa 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -251,9 +251,12 @@ FFW.RC = FFW.RPCObserver.create( newRadioControlData = SDL.RadioModel.setRadioData( request.params.moduleData.radioControlData); - if (SDL.RadioModel.radioControlStruct.radioEnable) { - SDL.RadioModel.saveCurrentOptions(); + if (SDL.RadioModel.radioControlStruct.radioEnable) { + if (Object.keys(newRadioControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', + radioControlData: newRadioControlData}); } + SDL.RadioModel.saveCurrentOptions(); } } if(request.params.moduleData.audioControlData){ From 3431d9065df7c8fbd9cf1e23c748559b1fe1d1a5 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Fri, 22 Jun 2018 15:31:49 +0300 Subject: [PATCH 089/102] Fixed OnInteriorVehicleData and GetInteriorVehicleData --- app/model/media/RadioModel.js | 142 +++++++++++++++++++---------- app/view/media/player/radioView.js | 2 +- 2 files changed, 96 insertions(+), 48 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index c383d5821..f72578b3f 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -649,43 +649,80 @@ SDL.RadioModel = Em.Object.create({ }, }; - if (forceGetAll || this.radioControlCheckboxes.band) { - result.band = this.radioControlStruct.band; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.PS) { - result.rdsData.PS = this.radioControlStruct.rdsData.PS; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.RT) { - result.rdsData.RT = this.radioControlStruct.rdsData.RT; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.CT) { - result.rdsData.CT = this.radioControlStruct.rdsData.CT; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.PI) { - result.rdsData.PI = this.radioControlStruct.rdsData.PI; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.PTY) { - result.rdsData.PTY = parseInt(this.radioControlStruct.rdsData.PTY); - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.TP) { - result.rdsData.TP = this.radioControlStruct.rdsData.TP; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.TA) { - result.rdsData.TA = this.radioControlStruct.rdsData.TA; - } - if (forceGetAll || this.radioControlCheckboxes.rdsData.REG) { - result.rdsData.REG = this.radioControlStruct.rdsData.REG; - } - if(this.radioControlStruct.hdRadioEnable){ - if (forceGetAll || this.radioControlCheckboxes.availableHDs) { - if (this.radioControlStruct.availableHDs > 0) { - result.availableHDs = this.radioControlStruct.availableHDs; + if(this.radioControlStruct.band != 'XM'){ + if (forceGetAll || this.radioControlCheckboxes.rdsData.PS) { + result.rdsData.PS = this.radioControlStruct.rdsData.PS; } - } - if (forceGetAll || this.radioControlCheckboxes.hdChannel) { - if (this.radioControlStruct.hdChannel > 0) { - result.hdChannel = this.radioControlStruct.hdChannel; + if (forceGetAll || this.radioControlCheckboxes.rdsData.RT) { + result.rdsData.RT = this.radioControlStruct.rdsData.RT; + } + if (forceGetAll || this.radioControlCheckboxes.rdsData.CT) { + result.rdsData.CT = this.radioControlStruct.rdsData.CT; + } + if (forceGetAll || this.radioControlCheckboxes.rdsData.PI) { + result.rdsData.PI = this.radioControlStruct.rdsData.PI; + } + if (forceGetAll || this.radioControlCheckboxes.rdsData.PTY) { + result.rdsData.PTY = parseInt(this.radioControlStruct.rdsData.PTY); + } + if (forceGetAll || this.radioControlCheckboxes.rdsData.TP) { + result.rdsData.TP = this.radioControlStruct.rdsData.TP; } + if (forceGetAll || this.radioControlCheckboxes.rdsData.TA) { + result.rdsData.TA = this.radioControlStruct.rdsData.TA; + } + if (forceGetAll || this.radioControlCheckboxes.rdsData.REG) { + result.rdsData.REG = this.radioControlStruct.rdsData.REG; + } + + if (forceGetAll || this.radioControlCheckboxes.signalStrength) { + result.signalStrength = parseInt(this.radioControlStruct.signalStrength); + } + + if (forceGetAll || this.radioControlCheckboxes.signalChangeThreshold) { + result.signalChangeThreshold = parseInt(this.radioControlStruct.signalChangeThreshold); + } + + if (forceGetAll || this.radioControlCheckboxes.state) { + result.state = this.radioControlStruct.state; + } + + result.hdRadioEnable = this.radioControlStruct.hdRadioEnable; + + if(this.radioControlStruct.hdRadioEnable){ + if(forceGetAll || this.radioControlCheckboxes.sisData.stationShortName){ + result.sisData.stationShortName=this.radioControlStruct.sisData.stationShortName; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLongName){ + result.sisData.stationLongName=this.radioControlStruct.sisData.stationLongName; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationMessage){ + result.sisData.stationMessage=this.radioControlStruct.sisData.stationMessage; + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.countryCode){ + result.sisData.stationIDNumber.countryCode=parseInt(this.radioControlStruct.sisData.stationIDNumber.countryCode); + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId){ + result.sisData.stationIDNumber.fccFacilityId=parseInt(this.radioControlStruct.sisData.stationIDNumber.fccFacilityId); + } + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsLocation){ + result.sisData.stationLocation.longitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.longitudeDegrees); + result.sisData.stationLocation.latitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.latitudeDegrees); + if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitudeMeters){ + result.sisData.stationLocation.altitudeMeters=parseFloat(this.radioControlStruct.sisData.stationLocation.altitudeMeters); + } + } + + if (forceGetAll || this.radioControlCheckboxes.availableHDs) { + if (this.radioControlStruct.availableHDs > 0) { + result.availableHDs = this.radioControlStruct.availableHDs; + } + } + if (forceGetAll || this.radioControlCheckboxes.hdChannel) { + if (this.radioControlStruct.hdChannel > 0) { + result.hdChannel = this.radioControlStruct.hdChannel; + } + } } } if (forceGetAll || this.radioControlCheckboxes.signalStrength) { @@ -718,14 +755,14 @@ SDL.RadioModel = Em.Object.create({ if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitude){ result.sisData.stationLocation.altitude=parseFloat(this.radioControlStruct.sisData.stationLocation.altitude); } + + if (forceGetAll || this.radioControlCheckboxes.band) { + result.band = this.radioControlStruct.band; } if (Object.keys(result.rdsData).length == 0) { delete result['rdsData']; } - if(Object.keys(result.sisData).length==0){ - delete result['sisData']; - } if(Object.keys(result.sisData.stationIDNumber).length==0){ var temp=result.sisData; delete temp['stationIDNumber']; @@ -734,6 +771,9 @@ SDL.RadioModel = Em.Object.create({ var temp=result.sisData; delete temp['stationLocation']; } + if(Object.keys(result.sisData).length==0){ + delete result['sisData']; + } } return result; @@ -781,6 +821,9 @@ SDL.RadioModel = Em.Object.create({ case 'AM': properties.push('availableHDs'); properties.push('hdChannel'); + properties.push('signalStrength'); + properties.push('signalChangeThreshold'); + properties.push('state'); if(this.radioControlStruct.hdRadioEnable){ properties.push('sisData.*'); properties.push('stationIDNumber.*'); @@ -792,6 +835,9 @@ SDL.RadioModel = Em.Object.create({ properties.push('hdChannel'); properties.push('frequencyFraction'); properties.push('rdsData.*'); + properties.push('signalStrength'); + properties.push('signalChangeThreshold'); + properties.push('state'); if(this.radioControlStruct.hdRadioEnable){ properties.push('sisData.*'); properties.push('stationIDNumber.*'); @@ -799,9 +845,7 @@ SDL.RadioModel = Em.Object.create({ } break; default: - properties.push('signalStrength'); - properties.push('signalChangeThreshold'); - properties.push('state'); + break; } } } @@ -811,7 +855,8 @@ SDL.RadioModel = Em.Object.create({ this.setHDRadioEnable(data.hdRadioEnable); this.set('radioControlCheckboxes.availableHDs',data.hdRadioEnable); this.set('radioControlCheckboxes.hdChannel',data.hdRadioEnable); - if(data.hdRadioEnable && properties.indexOf('availableHDs') == -1){ + if(data.hdRadioEnable){ + properties.push('sisData.*'); properties.push('availableHDs'); properties.push('hdChannel'); } @@ -891,7 +936,7 @@ SDL.RadioModel = Em.Object.create({ } } - var result = this.getRadioControlData(true); + var result = this.getRadioControlData(false); return SDL.SDLController.filterObjectProperty(result, properties); }, @@ -1283,6 +1328,9 @@ SDL.RadioModel = Em.Object.create({ 'band', 'availableHDs', 'hdChannel', + 'signalStrength', + 'signalChangeThreshold', + 'state', 'rdsData.*', this.radioControlStruct.hdRadioEnable ? 'sisData.*': '', this.radioControlStruct.hdRadioEnable ? 'stationIDNumber.*': '', @@ -1295,6 +1343,9 @@ SDL.RadioModel = Em.Object.create({ 'frequencyInteger', 'band', 'availableHDs', + 'signalStrength', + 'signalChangeThreshold', + 'state', 'hdChannel', this.radioControlStruct.hdRadioEnable ? 'sisData.*': '', this.radioControlStruct.hdRadioEnable ? 'stationIDNumber.*': '', @@ -1304,10 +1355,7 @@ SDL.RadioModel = Em.Object.create({ this.sendRadioChangeNotification(['radioEnable', 'hdRadioEnable', 'frequencyInteger', - 'band', - 'signalStrength', - 'signalChangeThreshold', - 'state' + 'band' ]); } }, diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 2d2727d45..67857767e 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -57,7 +57,7 @@ SDL.RadioView = Em.ContainerView SDL.RadioModel.set('radioControlCheckboxes.availableHDs',SDL.RadioModel.radioControlStruct.hdRadioEnable); SDL.RadioModel.set('radioControlCheckboxes.hdChannel',SDL.RadioModel.radioControlStruct.hdRadioEnable); if(SDL.RadioModel.radioControlStruct.hdRadioEnable){ - SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable','availableHDs','hdChannel']); + SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable','availableHDs','hdChannel', 'sisData.*']); } else{ SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable']); From 56cd98ce09503f655ee236951a0d7f970e6d3c00 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Sat, 23 Jun 2018 15:36:21 +0300 Subject: [PATCH 090/102] fix sending sisData --- app/model/media/RadioModel.js | 3 +++ app/view/media/player/radioView.js | 2 +- ffw/RCRPC.js | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index f72578b3f..1a3d4f43a 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -857,6 +857,8 @@ SDL.RadioModel = Em.Object.create({ this.set('radioControlCheckboxes.hdChannel',data.hdRadioEnable); if(data.hdRadioEnable){ properties.push('sisData.*'); + properties.push('stationIDNumber.*'); + properties.push('stationLocation.*'); properties.push('availableHDs'); properties.push('hdChannel'); } @@ -1347,6 +1349,7 @@ SDL.RadioModel = Em.Object.create({ 'signalChangeThreshold', 'state', 'hdChannel', + 'rdsData.*', this.radioControlStruct.hdRadioEnable ? 'sisData.*': '', this.radioControlStruct.hdRadioEnable ? 'stationIDNumber.*': '', this.radioControlStruct.hdRadioEnable ? 'stationLocation.*': '' diff --git a/app/view/media/player/radioView.js b/app/view/media/player/radioView.js index 67857767e..4e10f5108 100755 --- a/app/view/media/player/radioView.js +++ b/app/view/media/player/radioView.js @@ -57,7 +57,7 @@ SDL.RadioView = Em.ContainerView SDL.RadioModel.set('radioControlCheckboxes.availableHDs',SDL.RadioModel.radioControlStruct.hdRadioEnable); SDL.RadioModel.set('radioControlCheckboxes.hdChannel',SDL.RadioModel.radioControlStruct.hdRadioEnable); if(SDL.RadioModel.radioControlStruct.hdRadioEnable){ - SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable','availableHDs','hdChannel', 'sisData.*']); + SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable','availableHDs','hdChannel', 'sisData.*', 'stationIDNumber.*', 'stationLocation.*']); } else{ SDL.RadioModel.sendRadioChangeNotification(['hdRadioEnable']); diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index 7ff786cfa..b6a84e5d7 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -252,12 +252,12 @@ FFW.RC = FFW.RPCObserver.create( SDL.RadioModel.setRadioData( request.params.moduleData.radioControlData); if (SDL.RadioModel.radioControlStruct.radioEnable) { - if (Object.keys(newRadioControlData).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', - radioControlData: newRadioControlData}); - } SDL.RadioModel.saveCurrentOptions(); } + if (Object.keys(newRadioControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', + radioControlData: newRadioControlData}); + } } if(request.params.moduleData.audioControlData){ if(request.params.moduleData.audioControlData.source && From 0f697862c6e9f79f8d0badb95313afa7d373677c Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Mon, 20 Aug 2018 13:39:31 +0300 Subject: [PATCH 091/102] Fixed formatting and fixes after rebase --- app/model/media/RadioModel.js | 109 ++++++++++++---------------------- ffw/RCRPC.js | 22 +++---- 2 files changed, 49 insertions(+), 82 deletions(-) diff --git a/app/model/media/RadioModel.js b/app/model/media/RadioModel.js index 1a3d4f43a..e2f17a05a 100755 --- a/app/model/media/RadioModel.js +++ b/app/model/media/RadioModel.js @@ -649,7 +649,7 @@ SDL.RadioModel = Em.Object.create({ }, }; - if(this.radioControlStruct.band != 'XM'){ + if(this.radioControlStruct.band != 'XM') { if (forceGetAll || this.radioControlCheckboxes.rdsData.PS) { result.rdsData.PS = this.radioControlStruct.rdsData.PS; } @@ -673,107 +673,74 @@ SDL.RadioModel = Em.Object.create({ } if (forceGetAll || this.radioControlCheckboxes.rdsData.REG) { result.rdsData.REG = this.radioControlStruct.rdsData.REG; - } + } if (forceGetAll || this.radioControlCheckboxes.signalStrength) { result.signalStrength = parseInt(this.radioControlStruct.signalStrength); } - if (forceGetAll || this.radioControlCheckboxes.signalChangeThreshold) { result.signalChangeThreshold = parseInt(this.radioControlStruct.signalChangeThreshold); } - if (forceGetAll || this.radioControlCheckboxes.state) { result.state = this.radioControlStruct.state; } - - result.hdRadioEnable = this.radioControlStruct.hdRadioEnable; - if(this.radioControlStruct.hdRadioEnable){ - if(forceGetAll || this.radioControlCheckboxes.sisData.stationShortName){ + if (this.radioControlStruct.hdRadioEnable) { + if (forceGetAll || this.radioControlCheckboxes.availableHDs) { + if (this.radioControlStruct.availableHDs > 0) { + result.availableHDs = this.radioControlStruct.availableHDs; + } + } + if (forceGetAll || this.radioControlCheckboxes.hdChannel) { + if (this.radioControlStruct.hdChannel > 0) { + result.hdChannel = this.radioControlStruct.hdChannel; + } + } + if (forceGetAll || this.radioControlCheckboxes.sisData.stationShortName) { result.sisData.stationShortName=this.radioControlStruct.sisData.stationShortName; } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLongName){ + if (forceGetAll || this.radioControlCheckboxes.sisData.stationLongName) { result.sisData.stationLongName=this.radioControlStruct.sisData.stationLongName; } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationMessage){ + if (forceGetAll || this.radioControlCheckboxes.sisData.stationMessage) { result.sisData.stationMessage=this.radioControlStruct.sisData.stationMessage; } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.countryCode){ + if (forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.countryCode) { result.sisData.stationIDNumber.countryCode=parseInt(this.radioControlStruct.sisData.stationIDNumber.countryCode); } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId){ + if (forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId) { result.sisData.stationIDNumber.fccFacilityId=parseInt(this.radioControlStruct.sisData.stationIDNumber.fccFacilityId); } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsLocation){ + if (forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsData) { result.sisData.stationLocation.longitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.longitudeDegrees); result.sisData.stationLocation.latitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.latitudeDegrees); - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitudeMeters){ - result.sisData.stationLocation.altitudeMeters=parseFloat(this.radioControlStruct.sisData.stationLocation.altitudeMeters); + if (forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitude) { + result.sisData.stationLocation.altitude=parseFloat(this.radioControlStruct.sisData.stationLocation.altitude); } } + } - if (forceGetAll || this.radioControlCheckboxes.availableHDs) { - if (this.radioControlStruct.availableHDs > 0) { - result.availableHDs = this.radioControlStruct.availableHDs; - } - } - if (forceGetAll || this.radioControlCheckboxes.hdChannel) { - if (this.radioControlStruct.hdChannel > 0) { - result.hdChannel = this.radioControlStruct.hdChannel; - } - } - } - } - if (forceGetAll || this.radioControlCheckboxes.signalStrength) { - result.signalStrength = parseInt(this.radioControlStruct.signalStrength); - } - if (forceGetAll || this.radioControlCheckboxes.signalChangeThreshold) { - result.signalChangeThreshold = parseInt(this.radioControlStruct.signalChangeThreshold); - } - if (forceGetAll || this.radioControlCheckboxes.state) { - result.state = this.radioControlStruct.state; - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationShortName){ - result.sisData.stationShortName=this.radioControlStruct.sisData.stationShortName; - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLongName){ - result.sisData.stationLongName=this.radioControlStruct.sisData.stationLongName; - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationMessage){ - result.sisData.stationMessage=this.radioControlStruct.sisData.stationMessage; - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.countryCode){ - result.sisData.stationIDNumber.countryCode=parseInt(this.radioControlStruct.sisData.stationIDNumber.countryCode); - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationIDNumber.fccFacilityId){ - result.sisData.stationIDNumber.fccFacilityId=parseInt(this.radioControlStruct.sisData.stationIDNumber.fccFacilityId); - } - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.gpsData){ - result.sisData.stationLocation.longitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.longitudeDegrees); - result.sisData.stationLocation.latitudeDegrees=parseFloat(this.radioControlStruct.sisData.stationLocation.latitudeDegrees); - if(forceGetAll || this.radioControlCheckboxes.sisData.stationLocation.altitude){ - result.sisData.stationLocation.altitude=parseFloat(this.radioControlStruct.sisData.stationLocation.altitude); + if (Object.keys(result.rdsData).length == 0) { + delete result['rdsData']; + } + if(Object.keys(result.sisData.stationIDNumber).length==0){ + var temp=result.sisData; + delete temp['stationIDNumber']; + } + if(Object.keys(result.sisData.stationLocation).length==0){ + var temp=result.sisData; + delete temp['stationLocation']; + } + if(Object.keys(result.sisData).length==0){ + delete result['sisData']; + } } + + result.hdRadioEnable = this.radioControlStruct.hdRadioEnable; if (forceGetAll || this.radioControlCheckboxes.band) { result.band = this.radioControlStruct.band; } - - if (Object.keys(result.rdsData).length == 0) { - delete result['rdsData']; - } - if(Object.keys(result.sisData.stationIDNumber).length==0){ - var temp=result.sisData; - delete temp['stationIDNumber']; - } - if(Object.keys(result.sisData.stationLocation).length==0){ - var temp=result.sisData; - delete temp['stationLocation']; - } - if(Object.keys(result.sisData).length==0){ - delete result['sisData']; - } } return result; diff --git a/ffw/RCRPC.js b/ffw/RCRPC.js index b6a84e5d7..a059b1f5d 100644 --- a/ffw/RCRPC.js +++ b/ffw/RCRPC.js @@ -248,15 +248,16 @@ FFW.RC = FFW.RPCObserver.create( ); return; } else { - newRadioControlData = - SDL.RadioModel.setRadioData( - request.params.moduleData.radioControlData); - if (SDL.RadioModel.radioControlStruct.radioEnable) { - SDL.RadioModel.saveCurrentOptions(); - } - if (Object.keys(newRadioControlData).length > 0) { - FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', - radioControlData: newRadioControlData}); + newRadioControlData = + SDL.RadioModel.setRadioData( + request.params.moduleData.radioControlData); + if (SDL.RadioModel.radioControlStruct.radioEnable) { + SDL.RadioModel.saveCurrentOptions(); + } + if (Object.keys(newRadioControlData).length > 0) { + FFW.RC.onInteriorVehicleDataNotification({moduleType:'RADIO', + radioControlData: newRadioControlData}); + } } } if(request.params.moduleData.audioControlData){ @@ -322,7 +323,6 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.climateControlData = newClimateControlData; } - if (newRadioControlData) { JSONMessage.result.moduleData.radioControlData = newRadioControlData; @@ -339,7 +339,7 @@ FFW.RC = FFW.RPCObserver.create( JSONMessage.result.moduleData.seatControlData = newSeatControlData; } - + this.client.send(JSONMessage); this.set('isSetVdInProgress', false); break; From f7e94288c0adf6d320d6c014e33a05a45da23de8 Mon Sep 17 00:00:00 2001 From: Yurii Postolov Date: Thu, 5 Apr 2018 01:09:04 +0300 Subject: [PATCH 092/102] Implementation of appIcon_resumption Fixes in setAppIcon logic --- app/controller/sdl/Abstract/Controller.js | 73 +-------------- app/model/sdl/Abstract/Model.js | 25 +++++- app/model/sdl/RModel.js | 104 +++++++++++++++++++++- 3 files changed, 126 insertions(+), 76 deletions(-) diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index 8f94cac55..5a99b33de 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -844,78 +844,7 @@ SDL.SDLController = Em.Object.extend( * @param {Number} * applicationType */ - registerApplication: function(params, applicationType) { - if (applicationType === undefined || applicationType === null) { - SDL.SDLModel.data.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.deviceInfo.name, - appType: params.appType, - isMedia: 0, - disabledToActivate: params.greyOut ? true : false - } - ) - ); - } else { - SDL.SDLModel.data.get('registeredApps').pushObject( - this.applicationModels[applicationType].create( - { - appID: params.appID, - appName: params.appName, - deviceName: params.deviceInfo.name, - appType: params.appType, - isMedia: applicationType == 0 ? true : false, - initialized: true, - disabledToActivate: params.greyOut ? true : false - } - ) - ); - } - var exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'DRIVER_DISTRACTION_VIOLATION\'', - 'position': 0 - }, - cmdID: -1 - } - }; - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'USER_EXIT\'', - 'position': 0 - }, - cmdID: -2 - } - }; - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'UNAUTHORIZED_TRANSPORT_REGISTRATION\'', - 'position': 0 - }, - cmdID: -3 - } - }; - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - }, + /** * Unregister application * diff --git a/app/model/sdl/Abstract/Model.js b/app/model/sdl/Abstract/Model.js index bfc2d0434..e116f6125 100644 --- a/app/model/sdl/Abstract/Model.js +++ b/app/model/sdl/Abstract/Model.js @@ -69,7 +69,7 @@ SDL.SDLModel = Em.Object.extend({ applicationStatusBar: '', - updateStatusBar: function() { + updateStatusBar: function() { if (this.data.limitedExist && SDL.SDLController.getApplicationModel(this.data.stateLimited)) { @@ -658,9 +658,14 @@ SDL.SDLModel = Em.Object.extend({ var applicationType = null,//Default value - NonMediaModel see SDL.SDLController.applicationModels app = SDL.SDLController.getApplicationModel(params.appID); + if (app != null && params.icon != null) { + console.log('Resuming application icon for ' + params.appID); + this.setAppIconByAppId(params.appID, params.icon); + } + if (app != undefined && app.initialized == false) { - if (app.isMedia != params.isMediaApplication) { // If current not initialized model doe not matches the registered application type + if (app.isMedia != params.isMediaApplication) { // If current not initialized model does not matches the registered application type this.convertModel(params); // then model should be changed } else { app.disabledToActivate = params.greyOut; @@ -714,6 +719,20 @@ SDL.SDLModel = Em.Object.extend({ } }, + setAppIconByAppId: function(appId, path) { + var img = new Image(); + img.onload = function() { + console.log('Icon for ' + appId + ' was set to ' + path); + SDL.SDLController.getApplicationModel(appID).set('appIcon', path); + }; + img.onerror = function(event) { + console.log('Error: Icon for ' + appId + ' was not set properly'); + return false; + }; + + img.src = path; + }, + /** * Method to convert existed model to registered type */ @@ -900,7 +919,7 @@ SDL.SDLModel = Em.Object.extend({ img.onload = function() { var model=SDL.SDLController.getApplicationModel(message.appID); // code to set the src on success - model.set('appIcon', message.syncFileName.value); + model.set('appIcon', img.src + '?' + new Date().getTime()); model.set('isTemplateIcon', message.syncFileName.isTemplate === true); FFW.UI.sendUIResult(SDL.SDLModel.data.resultCode.SUCCESS, id, method); }; diff --git a/app/model/sdl/RModel.js b/app/model/sdl/RModel.js index 40e1cce71..066dce78e 100644 --- a/app/model/sdl/RModel.js +++ b/app/model/sdl/RModel.js @@ -129,6 +129,12 @@ SDL.RModel = SDL.SDLModel.extend({ return; // if application already registered and correctly initialized and BC.UpdateAppList came from SDL than nothing shoul happend } + if (params.appID != null && params.icon != null) { + console.log('Resuming application icon for ' + params.appID); + this.setAppIconByAppId(params.appID, params.icon); + } + + if (params.isMediaApplication === true) { //Magic number 0 - Default media model applicationType = 0; @@ -148,7 +154,8 @@ SDL.RModel = SDL.SDLModel.extend({ } } - SDL.SDLController.registerApplication(params, applicationType); + + this.registerApplication(params, applicationType); if (SDL.SDLModel.data.unRegisteredApps.indexOf(params.appID) >= 0) { setTimeout(function() { @@ -181,6 +188,23 @@ SDL.RModel = SDL.SDLModel.extend({ } }, + setAppIconByAppId: function(appID, path) { + var img = new Image(); + img.onload = function() { + var model = SDL.SDLController.getApplicationModel(appID); + if (model != null) { + console.log('Icon for ' + appID + ' was set to ' + path); + model.set('appIcon', img.src + '?' + new Date().getTime()); + } + }; + img.onerror = function(event) { + console.log('Error: Icon for ' + appID + ' was not set properly'); + return false; + }; + + img.src = path; + }, + /** * Method to delete activation button from VR commands and delete device * parameters from model @@ -196,6 +220,84 @@ SDL.RModel = SDL.SDLModel.extend({ delete map[params.appID]; this.set('appRCStatus', map); } + }, + + + registerApplication: function(params, applicationType) { + if (applicationType === undefined || applicationType === null) { + SDL.SDLModel.data.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.deviceInfo.name, + appType: params.appType, + isMedia: 0, + disabledToActivate: params.greyOut ? true : false + } + ) + ); + } else { + SDL.SDLModel.data.get('registeredApps').pushObject( + this.applicationModels[applicationType].create( + { + appID: params.appID, + appName: params.appName, + deviceName: params.deviceInfo.name, + appType: params.appType, + isMedia: applicationType == 0 ? true : false, + initialized: true, + disabledToActivate: params.greyOut ? true : false + } + ) + ); + } + var exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'DRIVER_DISTRACTION_VIOLATION\'', + 'position': 0 + }, + cmdID: -1 + } + }; + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'USER_EXIT\'', + 'position': 0 + }, + cmdID: -2 + } + }; + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'UNAUTHORIZED_TRANSPORT_REGISTRATION\'', + 'position': 0 + }, + cmdID: -3 + } + } + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + }, + applicationModels: { + 0: SDL.SDLMediaModel, + 1: SDL.SDLNonMediaModel } } From 583b780ef48e5b067a5f5ae68940cead7989ba66 Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Thu, 31 May 2018 11:26:27 +0300 Subject: [PATCH 093/102] Removed redundant and unrelated changes Also fixed formatting and added description --- app/controller/sdl/Abstract/Controller.js | 73 ++++++++++++++++- app/model/sdl/Abstract/Model.js | 28 ++++--- app/model/sdl/RModel.js | 99 +---------------------- 3 files changed, 92 insertions(+), 108 deletions(-) diff --git a/app/controller/sdl/Abstract/Controller.js b/app/controller/sdl/Abstract/Controller.js index 5a99b33de..8f94cac55 100644 --- a/app/controller/sdl/Abstract/Controller.js +++ b/app/controller/sdl/Abstract/Controller.js @@ -844,7 +844,78 @@ SDL.SDLController = Em.Object.extend( * @param {Number} * applicationType */ - + registerApplication: function(params, applicationType) { + if (applicationType === undefined || applicationType === null) { + SDL.SDLModel.data.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.deviceInfo.name, + appType: params.appType, + isMedia: 0, + disabledToActivate: params.greyOut ? true : false + } + ) + ); + } else { + SDL.SDLModel.data.get('registeredApps').pushObject( + this.applicationModels[applicationType].create( + { + appID: params.appID, + appName: params.appName, + deviceName: params.deviceInfo.name, + appType: params.appType, + isMedia: applicationType == 0 ? true : false, + initialized: true, + disabledToActivate: params.greyOut ? true : false + } + ) + ); + } + var exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'DRIVER_DISTRACTION_VIOLATION\'', + 'position': 0 + }, + cmdID: -1 + } + }; + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'USER_EXIT\'', + 'position': 0 + }, + cmdID: -2 + } + }; + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + exitCommand = { + 'id': -10, + 'params': { + 'menuParams': { + 'parentID': 0, + 'menuName': 'Exit \'UNAUTHORIZED_TRANSPORT_REGISTRATION\'', + 'position': 0 + }, + cmdID: -3 + } + }; + SDL.SDLController.getApplicationModel(params.appID).addCommand( + exitCommand + ); + }, /** * Unregister application * diff --git a/app/model/sdl/Abstract/Model.js b/app/model/sdl/Abstract/Model.js index e116f6125..208f04163 100644 --- a/app/model/sdl/Abstract/Model.js +++ b/app/model/sdl/Abstract/Model.js @@ -69,7 +69,7 @@ SDL.SDLModel = Em.Object.extend({ applicationStatusBar: '', - updateStatusBar: function() { + updateStatusBar: function() { if (this.data.limitedExist && SDL.SDLController.getApplicationModel(this.data.stateLimited)) { @@ -656,7 +656,7 @@ SDL.SDLModel = Em.Object.extend({ var message = {}; var applicationType = null,//Default value - NonMediaModel see SDL.SDLController.applicationModels - app = SDL.SDLController.getApplicationModel(params.appID); + app = SDL.SDLController.getApplicationModel(params.appID); if (app != null && params.icon != null) { console.log('Resuming application icon for ' + params.appID); @@ -664,9 +664,8 @@ SDL.SDLModel = Em.Object.extend({ } if (app != undefined && app.initialized == false) { - if (app.isMedia != params.isMediaApplication) { // If current not initialized model does not matches the registered application type - this.convertModel(params); // then model should be changed + this.convertModel(params); // then model should be changed } else { app.disabledToActivate = params.greyOut; } @@ -719,19 +718,30 @@ SDL.SDLModel = Em.Object.extend({ } }, - setAppIconByAppId: function(appId, path) { + /** + * Method to set specified application icon to the new one + * + * @param {Number} + * appID + * @param {String} + * path + */ + setAppIconByAppId: function(appID, path) { var img = new Image(); img.onload = function() { - console.log('Icon for ' + appId + ' was set to ' + path); - SDL.SDLController.getApplicationModel(appID).set('appIcon', path); + var model = SDL.SDLController.getApplicationModel(appID); + if (model != null) { + console.log('Icon for ' + appID + ' was set to ' + path); + model.set('appIcon', img.src + '?' + new Date().getTime()); + } }; img.onerror = function(event) { - console.log('Error: Icon for ' + appId + ' was not set properly'); + console.log('Error: Icon for ' + appID + ' was not set properly'); return false; }; img.src = path; - }, + }, /** * Method to convert existed model to registered type diff --git a/app/model/sdl/RModel.js b/app/model/sdl/RModel.js index 066dce78e..e88e9994c 100644 --- a/app/model/sdl/RModel.js +++ b/app/model/sdl/RModel.js @@ -134,7 +134,6 @@ SDL.RModel = SDL.SDLModel.extend({ this.setAppIconByAppId(params.appID, params.icon); } - if (params.isMediaApplication === true) { //Magic number 0 - Default media model applicationType = 0; @@ -154,8 +153,7 @@ SDL.RModel = SDL.SDLModel.extend({ } } - - this.registerApplication(params, applicationType); + SDL.SDLController.registerApplication(params, applicationType); if (SDL.SDLModel.data.unRegisteredApps.indexOf(params.appID) >= 0) { setTimeout(function() { @@ -188,23 +186,6 @@ SDL.RModel = SDL.SDLModel.extend({ } }, - setAppIconByAppId: function(appID, path) { - var img = new Image(); - img.onload = function() { - var model = SDL.SDLController.getApplicationModel(appID); - if (model != null) { - console.log('Icon for ' + appID + ' was set to ' + path); - model.set('appIcon', img.src + '?' + new Date().getTime()); - } - }; - img.onerror = function(event) { - console.log('Error: Icon for ' + appID + ' was not set properly'); - return false; - }; - - img.src = path; - }, - /** * Method to delete activation button from VR commands and delete device * parameters from model @@ -220,84 +201,6 @@ SDL.RModel = SDL.SDLModel.extend({ delete map[params.appID]; this.set('appRCStatus', map); } - }, - - - registerApplication: function(params, applicationType) { - if (applicationType === undefined || applicationType === null) { - SDL.SDLModel.data.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.deviceInfo.name, - appType: params.appType, - isMedia: 0, - disabledToActivate: params.greyOut ? true : false - } - ) - ); - } else { - SDL.SDLModel.data.get('registeredApps').pushObject( - this.applicationModels[applicationType].create( - { - appID: params.appID, - appName: params.appName, - deviceName: params.deviceInfo.name, - appType: params.appType, - isMedia: applicationType == 0 ? true : false, - initialized: true, - disabledToActivate: params.greyOut ? true : false - } - ) - ); - } - var exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'DRIVER_DISTRACTION_VIOLATION\'', - 'position': 0 - }, - cmdID: -1 - } - }; - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'USER_EXIT\'', - 'position': 0 - }, - cmdID: -2 - } - }; - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - exitCommand = { - 'id': -10, - 'params': { - 'menuParams': { - 'parentID': 0, - 'menuName': 'Exit \'UNAUTHORIZED_TRANSPORT_REGISTRATION\'', - 'position': 0 - }, - cmdID: -3 - } - } - SDL.SDLController.getApplicationModel(params.appID).addCommand( - exitCommand - ); - }, - applicationModels: { - 0: SDL.SDLMediaModel, - 1: SDL.SDLNonMediaModel } } From 8eb681d531455021bdf47fb2ced653f5311d3ddc Mon Sep 17 00:00:00 2001 From: theresalech Date: Thu, 13 Sep 2018 15:28:37 -0400 Subject: [PATCH 094/102] add third_party.md Resolves issue #118 --- third_party.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 third_party.md diff --git a/third_party.md b/third_party.md new file mode 100644 index 000000000..452e9853b --- /dev/null +++ b/third_party.md @@ -0,0 +1,57 @@ +### SDL HMI + +Copyright (C) 2018 SmartDeviceLink Consortium, Inc. + +#### License +Copyright (c) 2017 - 2018, SmartDeviceLink Consortium, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of SmartDeviceLink Consortium, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#### Third Party Licenses + +Both the source and binary distributions of this software contain +some third party software. All the third party software included +or linked is redistributed under the terms and conditions of their +original licenses. + +The third party software included and used by this project is: + +**Ember.js 1.0** + +* Copyright (c) 2018 Yehuda Katz, Tom Dale and Ember.js contributors +* Licensed under MIT License +* See [https://github.com/emberjs/ember.js/downloads](https://github.com/emberjs/ember.js/downloads) + +**Handlebars.js 1.0.0 beta 6** + +* Copyright (C) 2011-2017 by Yehuda Katz +* Licensed under MIT License +* See [https://github.com/wycats/handlebars.js](https://github.com/wycats/handlebars.js) + +**iScroll 4.1.6** + +* Copyright (c) 2011 Matteo Spinelli, [http://cubiq.org](http://cubiq.org) +* Licensed under MIT License +* See [https://github.com/cubiq/iscrolL](https://github.com/cubiq/iscroll) + +**jQuery 1.7.2** + +* Copyright 2011, John Resig +* Dual licensed under the MIT or GPL Version 2 licenses +* See [https://github.com/jquery/jquery-ui/tree/master/external/jquery-1.7.2](https://github.com/jquery/jquery-ui/tree/master/external/jquery-1.7.2) + +**Ace (Ajax.rg Cloud9 Editor)** + +* Copyright (c) 2010, Ajax.org B.V +* Licensed under BSD 3-clause New or Revised License +* See [https://github.com/ajaxorg/ace](https://github.com/ajaxorg/ace) \ No newline at end of file From d27b07cdf1c587e55d443a2f860d1537e54410dd Mon Sep 17 00:00:00 2001 From: ShobhitAd Date: Thu, 27 Sep 2018 08:40:02 -0700 Subject: [PATCH 095/102] Fixed split on undefined error in TTSPopUp --- app/view/sdl/TTSPopUp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/view/sdl/TTSPopUp.js b/app/view/sdl/TTSPopUp.js index 3da09e11b..82ed1dc62 100644 --- a/app/view/sdl/TTSPopUp.js +++ b/app/view/sdl/TTSPopUp.js @@ -110,7 +110,7 @@ SDL.TTSPopUp = Em.ContainerView.create( this.set('appID', appID); this.set('content', msg); - if (files != '') { + if (files != undefined && files != '') { var files_to_play = files.split('\n'); for (var i = 0; i < files_to_play.length; ++i) { this.player.addFile(files_to_play[i]); From e2dfe7efb6a2ed523c1f4de47a6f19831aceca84 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Tue, 9 Oct 2018 15:59:48 -0400 Subject: [PATCH 096/102] Implement audio streaming indicator --- app/model/sdl/Abstract/AppModel.js | 4 ++-- app/model/sdl/Abstract/data.js | 2 +- app/view/media/sdl/controllsView.js | 2 +- ffw/UIRPC.js | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/model/sdl/Abstract/AppModel.js b/app/model/sdl/Abstract/AppModel.js index beff386b7..a201d92fe 100644 --- a/app/model/sdl/Abstract/AppModel.js +++ b/app/model/sdl/Abstract/AppModel.js @@ -74,9 +74,9 @@ SDL.ABSAppModel = Em.Object.extend( return this.mediaPlayerIndicator === SDL.SDLModel.data.mediaPlayerIndicatorEnum.PLAY_PAUSE; }.property('this.mediaPlayerIndicator'), - bufferingIndicator: function() { + stopIndicator: function() { return this.mediaPlayerIndicator === - SDL.SDLModel.data.mediaPlayerIndicatorEnum.BUFFERING ? 'BUFFERING' : null; + SDL.SDLModel.data.mediaPlayerIndicatorEnum.STOP ? 'STOP' : null; }.property('this.mediaPlayerIndicator'), /** * Application's container for current processed requests on HMI diff --git a/app/model/sdl/Abstract/data.js b/app/model/sdl/Abstract/data.js index ef84efd1f..6e8f581ae 100644 --- a/app/model/sdl/Abstract/data.js +++ b/app/model/sdl/Abstract/data.js @@ -59,7 +59,7 @@ SDL.SDLModelData = Em.Object.create( 'PLAY_PAUSE': 0, 'PLAY': 1, 'PAUSE': 2, - 'BUFFERING': 3 + 'STOP': 3 }, /** * Structure specified for PoliceUpdate retry sequence diff --git a/app/view/media/sdl/controllsView.js b/app/view/media/sdl/controllsView.js index c615ebf52..e855d4c7f 100644 --- a/app/view/media/sdl/controllsView.js +++ b/app/view/media/sdl/controllsView.js @@ -94,7 +94,7 @@ SDL.SDLMediaControlls = Em.ContainerView.create( ], //classNameBindings: 'SDL.SDLController.model.PLAY_PAUSE::unsubscribed', presetName: 'PLAY_PAUSE', - textBinding: 'SDL.SDLController.model.bufferingIndicator', + textBinding: 'SDL.SDLController.model.stopIndicator', actionUp: function() { SDL.SDLController.onSoftButtonOkActionUp(this.presetName); }, diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index de3fe4209..df263b883 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -296,6 +296,9 @@ FFW.UI = FFW.RPCObserver.create( if(request.params.enableSeek) { this.OnSeekMediaClockTimer(request.params.startTime, request.params.appID); } + if(request.params.audioStreamingIndicator) { + SDL.SDLController.SetAudioStreamingIndicator(request.params) + } this.sendUIResult(resultCode, request.id, request.method); } else { this.sendError( From f227388d390ea68b39525b0ea32e3bd518c98abf Mon Sep 17 00:00:00 2001 From: JackLivio Date: Tue, 9 Oct 2018 17:33:22 -0400 Subject: [PATCH 097/102] Hide image on load error --- app/view/info/nonMediaView.js | 2 +- app/view/media/sdl/controllsView.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/view/info/nonMediaView.js b/app/view/info/nonMediaView.js index 3541fb43b..515f12999 100644 --- a/app/view/info/nonMediaView.js +++ b/app/view/info/nonMediaView.js @@ -95,7 +95,7 @@ SDL.InfoNonMedia = Em.ContainerView.create( ], template: Ember.Handlebars.compile( - '' + '' ) } ), diff --git a/app/view/media/sdl/controllsView.js b/app/view/media/sdl/controllsView.js index c615ebf52..5429af0d7 100644 --- a/app/view/media/sdl/controllsView.js +++ b/app/view/media/sdl/controllsView.js @@ -56,8 +56,8 @@ SDL.SDLMediaControlls = Em.ContainerView.create( '
{{SDL.SDLController.model.appInfo.field2}}
' + '
{{SDL.SDLController.model.appInfo.field3}}
' + '
{{SDL.SDLController.model.appInfo.mediaClock}}
' + - '' + - '' + + '' + + '' + '
' + '{{/with}}' ) } From e3c546523a3893c3608140b90540844acd90ff4e Mon Sep 17 00:00:00 2001 From: JackLivio Date: Wed, 10 Oct 2018 15:48:37 -0400 Subject: [PATCH 098/102] Add display name parameter to sdl hmi --- ffw/UIRPC.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index de3fe4209..b6ebffef9 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -374,6 +374,7 @@ FFW.UI = FFW.RPCObserver.create( 'result': { 'displayCapabilities': { 'displayType': 'GEN2_8_DMA', + 'displayName': 'SDL_HMI', 'textFields': [ { 'name': 'mainField1', @@ -922,6 +923,7 @@ FFW.UI = FFW.RPCObserver.create( 'result': { 'displayCapabilities': { 'displayType': 'GEN2_8_DMA', + 'displayName': 'SDL_HMI', 'textFields': [ { 'name': 'mainField1', From 95d0c037673049ff3f70d2ee0a8388fa4cdde733 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Wed, 10 Oct 2018 17:08:14 -0400 Subject: [PATCH 099/102] Fix nonmedia text fields --- app/view/info/nonMediaView.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/view/info/nonMediaView.js b/app/view/info/nonMediaView.js index 3541fb43b..06f1a09ec 100644 --- a/app/view/info/nonMediaView.js +++ b/app/view/info/nonMediaView.js @@ -113,7 +113,7 @@ SDL.InfoNonMedia = Em.ContainerView.create( field1: SDL.Label.extend( { - contentBinding: 'controller.model.appInfo.field1', + contentBinding: 'SDL.SDLController.model.appInfo.field1', attributeBindings: ['style'], style: function() { if (SDL.SDLController.model) { @@ -127,7 +127,7 @@ SDL.InfoNonMedia = Em.ContainerView.create( field2: SDL.Label.extend( { - contentBinding: 'controller.model.appInfo.field2', + contentBinding: 'SDL.SDLController.model.appInfo.field2', attributeBindings: ['style'], style: function() { if (SDL.SDLController.model) { @@ -141,13 +141,13 @@ SDL.InfoNonMedia = Em.ContainerView.create( field3: SDL.Label.extend( { - contentBinding: 'controller.model.appInfo.field3' + contentBinding: 'SDL.SDLController.model.appInfo.field3' } ), field4: SDL.Label.extend( { - contentBinding: 'controller.model.appInfo.field4' + contentBinding: 'SDL.SDLController.model.appInfo.field4' } ) From d2ecfaec774830e6a7593027a7f8bba91b98da11 Mon Sep 17 00:00:00 2001 From: "Andriy Byzhynar (GitHub)" Date: Thu, 11 Oct 2018 16:03:27 -0400 Subject: [PATCH 100/102] Add missed seatControlCapabilities to Hmi Cpabilities --- capabilities/rc_capabilities.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/capabilities/rc_capabilities.js b/capabilities/rc_capabilities.js index 4a00365f1..74a148c07 100644 --- a/capabilities/rc_capabilities.js +++ b/capabilities/rc_capabilities.js @@ -133,6 +133,24 @@ SDL.remoteControlCapability = keepContextAvailable: true, equalizerMaxChannelId: 10 }], + seatControlCapabilities: [{ + moduleName: "Seat", + heatingEnabledAvailable: true, + coolingEnabledAvailable: true, + heatingLevelAvailable: true, + coolingLevelAvailable: true, + horizontalPositionAvailable: true, + verticalPositionAvailable: true, + frontVerticalPositionAvailable: true, + backVerticalPositionAvailable: true, + backTiltAngleAvailable: true, + headSupportHorizontalPositionAvailable: true, + headSupportVerticalPositionAvailable: true, + massageEnabledAvailable: true, + massageModeAvailable: true, + massageCushionFirmnessAvailable: true, + memoryAvailable: true + }], lightControlCapabilities: { moduleName: 'light', supportedLights: [{ From cb479c2949f3408123abef8aecd5217ba81c2145 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Thu, 18 Oct 2018 15:56:56 -0400 Subject: [PATCH 101/102] Update capabilities for setDisplayLayoutResponse --- capabilities/display_capabilities.js | 1649 ++++++++++++++++++++++++++ ffw/UIRPC.js | 475 +------- index.html | 1 + 3 files changed, 1671 insertions(+), 454 deletions(-) create mode 100644 capabilities/display_capabilities.js diff --git a/capabilities/display_capabilities.js b/capabilities/display_capabilities.js new file mode 100644 index 000000000..ea25204fa --- /dev/null +++ b/capabilities/display_capabilities.js @@ -0,0 +1,1649 @@ +SDL.templateCapabilities = { + "MEDIA": { + "displayCapabilities": { + "displayType": "GEN2_8_DMA", + "textFields": [{ + "name": "mainField1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "statusBar", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaClock", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaTrack", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "scrollableMessageBody", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "initialInteractionText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "ETA", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "totalDistance", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderHeader", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderFooter", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "notificationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "secondaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "tertiaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "timeToDestination", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "turnText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuTitle", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationDescription", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "addressLines", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "phoneNumber", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + } + ], + "imageFields": [{ + "name": "softButtonImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceSecondaryImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "vrHelpItem", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "turnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "menuIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "cmdIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "graphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "secondaryGraphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + } + ], + "mediaClockFormats": [ + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", + "CLOCKTEXT3", "CLOCKTEXT4" + ], + "graphicSupported": true, + "imageCapabilities": ["DYNAMIC", "STATIC"], + "templatesAvailable": ["MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP"], + "screenParams": { + "resolution": { + "resolutionWidth": 800, + "resolutionHeight": 480 + }, + "touchEventAvailable": { + "pressAvailable": true, + "multiTouchAvailable": true, + "doublePressAvailable": false + } + }, + "numCustomPresetsAvailable": 10 + }, + "buttonCapabilities": [{ + "name": "PRESET_0", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_1", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_2", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_3", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_4", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_5", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_6", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_7", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_8", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_9", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "OK", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKLEFT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKRIGHT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEUP", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEDOWN", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }], + "softButtonCapabilities": [{ + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true, + "imageSupported": true + }], + "presetBankCapabilities": { + "onScreenPresetsAvailable": true + } + }, + "ONSCREEN_PRESETS": { + "displayCapabilities": { + "displayType": "GEN2_8_DMA", + "textFields": [{ + "name": "mainField1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "statusBar", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaClock", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaTrack", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "scrollableMessageBody", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "initialInteractionText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "ETA", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "totalDistance", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderHeader", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderFooter", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "notificationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "secondaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "tertiaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "timeToDestination", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "turnText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuTitle", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationDescription", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "addressLines", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "phoneNumber", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + } + ], + "imageFields": [{ + "name": "softButtonImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceSecondaryImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "vrHelpItem", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "turnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "menuIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "cmdIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "graphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "secondaryGraphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + } + ], + "mediaClockFormats": [ + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", + "CLOCKTEXT3", "CLOCKTEXT4" + ], + "graphicSupported": true, + "imageCapabilities": ["DYNAMIC", "STATIC"], + "templatesAvailable": ["MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP"], + "screenParams": { + "resolution": { + "resolutionWidth": 800, + "resolutionHeight": 480 + }, + "touchEventAvailable": { + "pressAvailable": true, + "multiTouchAvailable": true, + "doublePressAvailable": false + } + }, + "numCustomPresetsAvailable": 10 + }, + "buttonCapabilities": [{ + "name": "PRESET_0", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_1", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_2", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_3", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_4", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_5", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_6", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_7", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_8", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_9", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "OK", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKLEFT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKRIGHT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEUP", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEDOWN", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }], + "softButtonCapabilities": [{ + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true, + "imageSupported": true + }], + "presetBankCapabilities": { + "onScreenPresetsAvailable": true + } + }, + "NON-MEDIA": { + "displayCapabilities": { + "displayType": "GEN2_8_DMA", + "textFields": [{ + "name": "mainField1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField4", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "statusBar", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaClock", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaTrack", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "scrollableMessageBody", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "initialInteractionText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "ETA", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "totalDistance", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderHeader", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderFooter", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "notificationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "secondaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "tertiaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "timeToDestination", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "turnText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuTitle", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationDescription", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "addressLines", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "phoneNumber", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + } + ], + "imageFields": [{ + "name": "softButtonImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceSecondaryImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "vrHelpItem", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "turnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "menuIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "cmdIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "graphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "secondaryGraphic", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + } + ], + "mediaClockFormats": [ + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", + "CLOCKTEXT3", "CLOCKTEXT4" + ], + "graphicSupported": true, + "imageCapabilities": ["DYNAMIC", "STATIC"], + "templatesAvailable": ["MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP"], + "screenParams": { + "resolution": { + "resolutionWidth": 800, + "resolutionHeight": 480 + }, + "touchEventAvailable": { + "pressAvailable": true, + "multiTouchAvailable": true, + "doublePressAvailable": false + } + }, + "numCustomPresetsAvailable": 8 + }, + "buttonCapabilities": [{ + "name": "PRESET_0", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_1", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_2", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_3", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_4", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_5", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_6", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "PRESET_7", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "OK", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKLEFT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "SEEKRIGHT", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEUP", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }, { + "name": "TUNEDOWN", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }], + "softButtonCapabilities": [{ + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true, + "imageSupported": true + }], + "presetBankCapabilities": { + "onScreenPresetsAvailable": true + } + }, + "NAV_FULLSCREEN_MAP": { + "displayCapabilities": { + "displayType": "GEN2_8_DMA", + "textFields": [{ + "name": "mainField1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mainField4", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "statusBar", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaClock", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "mediaTrack", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "alertText3", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "scrollableMessageBody", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "initialInteractionText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "ETA", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "totalDistance", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "navigationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText1", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "audioPassThruDisplayText2", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderHeader", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "sliderFooter", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "notificationText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "secondaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "tertiaryText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "timeToDestination", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "turnText", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "menuTitle", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationName", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "locationDescription", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "addressLines", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + }, + { + "name": "phoneNumber", + "characterSet": "TYPE2SET", + "width": 500, + "rows": 1 + } + ], + "imageFields": [{ + "name": "choiceImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "choiceSecondaryImage", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "vrHelpItem", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "turnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "menuIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "cmdIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + }, + { + "name": "showConstantTBTNextTurnIcon", + "imageTypeSupported": [ + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + ], + "imageResolution": { + "resolutionWidth": 64, + "resolutionHeight": 64 + } + } + ], + "mediaClockFormats": [ + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", + "CLOCKTEXT3", "CLOCKTEXT4" + ], + "graphicSupported": true, + "imageCapabilities": ["DYNAMIC", "STATIC"], + "templatesAvailable": ["MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP"], + "screenParams": { + "resolution": { + "resolutionWidth": 800, + "resolutionHeight": 480 + }, + "touchEventAvailable": { + "pressAvailable": true, + "multiTouchAvailable": true, + "doublePressAvailable": false + } + } + }, + "buttonCapabilities": [{ + "name": "CUSTOM_BUTTON", + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true + }], + "softButtonCapabilities": [{ + "shortPressAvailable": true, + "longPressAvailable": true, + "upDownAvailable": true, + "imageSupported": true + }], + "presetBankCapabilities": { + "onScreenPresetsAvailable": false + } + } +} \ No newline at end of file diff --git a/ffw/UIRPC.js b/ffw/UIRPC.js index de3fe4209..89b79d362 100644 --- a/ffw/UIRPC.js +++ b/ffw/UIRPC.js @@ -357,9 +357,6 @@ FFW.UI = FFW.RPCObserver.create( case 'DEFAULT': case 'ONSCREEN_PRESETS': case 'NAV_FULLSCREEN_MAP': - case 'NAV_KEYBOARD': - case 'NAV_LIST': - case 'REMOTE_CONTROL': { sendResponseFlag = true; break; @@ -367,462 +364,32 @@ FFW.UI = FFW.RPCObserver.create( } if (sendResponseFlag) { Em.Logger.log('FFW.' + request.method + 'Response'); + var displayLayout = request.params.displayLayout; + if (displayLayout === "DEFAULT") { + var model = SDL.SDLController.getApplicationModel(request.params.appID); + for (var i=0; i +