Skip to content

Commit 2db0b73

Browse files
authored
Merge pull request #153 from smartdevicelink/develop
Release 5.0.0
2 parents 5fc453a + 780cd5c commit 2db0b73

104 files changed

Lines changed: 10669 additions & 985 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "python_websocket"]
2+
path = python_websocket
3+
url = https://github.com/Pithikos/python-websocket-server.git

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ A quick guide to installing, configuring, and running HMI.
88
1. run SmartDeviceLinkCore
99
2. run chromium-browser [root_of_cloned_sdl_hmi_repo/index.html]
1010

11+
## Simulating signals for LOW_VOLTAGE feature
12+
In order to simulate UNIX signals used by the LOW_VOLTAGE feature, some additional setup is required
13+
14+
1. run `deploy_server.sh`
15+
2. run the HMI normally
16+
3. open the `Exit Application` menu, choose a signal from the menu and press `Send signal`
17+
1118
## A quick note about dependencies
1219
All dependencies are installed after the SDL Core is successfully installed.
1320

@@ -17,3 +24,5 @@ SDL HMI utility is only for acquaintance with the SDL project.
1724
## Look at configuration file app/FLAGS.js. You can found there:
1825
- SDL WebSocket connection string -
1926
WEBSOCKET_URL
27+
- Python WebSocket url for handling signals -
28+
PYTHON_SERVER_URL

app/AppViews.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ SDL.AppViews = Em.ContainerView.extend(
7474
SDL.DriverDistraction,
7575
SDL.ExitApp,
7676
SDL.PrimaryDevice,
77-
SDL.SystemRequest
77+
SDL.SystemRequest,
78+
SDL.SendMessage
7879
],
7980
/*
8081
* This method is called when the app is fully rendered and ready to be

app/BasicCommunicationRPC.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ FFW.BasicCommunication = FFW.RPCObserver
511511
this.sendBCResult(
512512
SDL.SDLModel.data.resultCode.SUCCESS, request.id, request.method
513513
);
514-
}
514+
}
515515
}
516516
},
517517
/********************* Requests BEGIN *********************/
@@ -899,7 +899,7 @@ FFW.BasicCommunication = FFW.RPCObserver
899899
'method': 'BasicCommunication.OnReady'
900900
};
901901
this.client.send(JSONMessage);
902-
},
902+
},
903903
/**
904904
* Sent notification to SDL when HMI closes
905905
*/

app/Flags.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ FLAGS = Em.Object.create(
4242
*/
4343
SET_LOCALIZATION: 'eng',
4444
WEBSOCKET_URL: 'ws://127.0.0.1:8087',
45+
PYTHON_SERVER_URL: 'ws://127.0.0.1:8081',
4546
CAN_WEBSOCKET_URL: 'ws://127.0.0.1:2468',
4647
TOUCH_EVENT_STARTED: false,
4748
BasicCommunication: null,

app/StateManager.js

Lines changed: 134 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,8 @@ var StateManager = Em.StateManager.extend(
164164
},
165165
policies: Em.State.create(
166166
{
167-
statisticsInfo: Em.State.create(
168-
{}
169-
),
170-
getUrls: Em.State.create(
171-
{}
172-
),
167+
statisticsInfo: Em.State.create({}),
168+
getUrls: Em.State.create({}),
173169
connectionSettings: Em.State.create(
174170
{
175171
enter: function() {
@@ -193,12 +189,8 @@ var StateManager = Em.StateManager.extend(
193189
}
194190
}
195191
),
196-
appPermissions: Em.State.create(
197-
{}
198-
),
199-
systemError: Em.State.create(
200-
{}
201-
),
192+
appPermissions: Em.State.create({}),
193+
systemError: Em.State.create({}),
202194
deviceStateChange: Em.State.create(
203195
{
204196
enter: function() {
@@ -215,7 +207,33 @@ var StateManager = Em.StateManager.extend(
215207
}
216208
)
217209
}
218-
)
210+
),
211+
HMISettings: Em.State.create({}),
212+
213+
light: Em.State.create({
214+
singleLight: Em.State.create({
215+
enter: function() {
216+
this._super();
217+
}
218+
}),
219+
exteriorLight: Em.State.create({
220+
enter: function() {
221+
this._super();
222+
}
223+
}),
224+
interiorLight: Em.State.create({
225+
enter: function() {
226+
this._super();
227+
}
228+
}),
229+
locationLight: Em.State.create({
230+
enter: function() {
231+
this._super();
232+
}
233+
})
234+
}),
235+
236+
seat: Em.State.create({}),
219237
}
220238
),
221239
/** Media state */
@@ -233,8 +251,10 @@ var StateManager = Em.StateManager.extend(
233251
radio: Em.State.create(
234252
{
235253
enter: function() {
236-
SDL.MediaController.set('activeState',
237-
SDL.States.nextState);
254+
SDL.MediaController.set('activeState', SDL.States.nextState);
255+
if (!FFW.RC.isSetVdInProgress) {
256+
SDL.RadioModel.sendAudioNotification();
257+
}
238258
if (!SDL.RadioModel.radioControlStruct.radioEnable) {
239259
SDL.RadioModel.radioEnableKeyPress();
240260
}
@@ -244,23 +264,29 @@ var StateManager = Em.StateManager.extend(
244264
SDL.MediaController.deactivateCD();
245265
SDL.MediaController.currentSelectedPlayer.pause();
246266
SDL.MediaController.deactivateUSB();
247-
if (SDL.RadioModel.radioControlStruct.radioEnable) {
248-
SDL.RadioModel.radioEnableKeyPress();
249-
}
267+
SDL.MediaController.deactivateBluetooth();
268+
SDL.MediaController.deactivateLineIn();
269+
SDL.MediaController.deactivateIPod();
250270
this._super();
251271
}
252272
}
253273
),
254274
cd: Em.State.create(
255275
{
256276
enter: function() {
257-
SDL.MediaController.set('activeState',
258-
SDL.States.nextState);
277+
SDL.MediaController.set('activeState', SDL.States.nextState);
278+
if (!FFW.RC.isSetVdInProgress) {
279+
SDL.CDModel.sendAudioNotification();
280+
}
259281
this._super();
260282
},
261283
exit: function() {
262284
SDL.MediaController.deactivateRadio();
263285
SDL.MediaController.deactivateUSB();
286+
SDL.MediaController.deactivateBluetooth();
287+
SDL.MediaController.deactivateLineIn();
288+
SDL.MediaController.deactivateIPod();
289+
264290
this._super();
265291
},
266292
moreinfo: Em.State.create(
@@ -271,33 +297,110 @@ var StateManager = Em.StateManager.extend(
271297
usb: Em.State.create(
272298
{
273299
enter: function() {
274-
SDL.MediaController.set('activeState',
275-
SDL.States.nextState);
300+
SDL.MediaController.set('activeState', SDL.States.nextState);
301+
if (!FFW.RC.isSetVdInProgress) {
302+
SDL.USBModel.sendAudioNotification();
303+
}
276304
this._super();
277305
},
278306
exit: function() {
279307
this._super();
280308
SDL.MediaController.deactivateRadio();
281309
SDL.MediaController.deactivateCD();
310+
SDL.MediaController.deactivateBluetooth();
311+
SDL.MediaController.deactivateLineIn();
312+
SDL.MediaController.deactivateIPod();
282313
},
283314
moreinfo: Em.State.create(
284315
{
285-
enter: function() {
286-
this._super();
287-
// reset Messages
288-
}
316+
289317
}
290318
)
291319
}
292-
)
293-
}
320+
),
321+
322+
bluetooth: Em.State.create(
323+
{
324+
enter:function()
325+
{
326+
SDL.MediaController.set('activeState', SDL.States.nextState);
327+
if (!FFW.RC.isSetVdInProgress) {
328+
SDL.BluetoothModel.sendAudioNotification();
329+
}
330+
this._super();
331+
},
332+
exit:function()
333+
{
334+
this._super();
335+
SDL.MediaController.deactivateRadio();
336+
SDL.MediaController.deactivateCD();
337+
SDL.MediaController.deactivateUSB();
338+
SDL.MediaController.deactivateLineIn();
339+
SDL.MediaController.deactivateIPod();
340+
},
341+
moreinfo:Em.State.create(
342+
{}
343+
)
344+
}
345+
),
346+
lineIn: Em.State.create(
347+
{
348+
enter:function()
349+
{
350+
SDL.MediaController.set('activeState', SDL.States.nextState);
351+
if (!FFW.RC.isSetVdInProgress) {
352+
SDL.LineInModel.sendAudioNotification();
353+
}
354+
this._super();
355+
},
356+
exit:function()
357+
{
358+
this._super();
359+
SDL.MediaController.deactivateRadio();
360+
SDL.MediaController.deactivateCD();
361+
SDL.MediaController.deactivateUSB();
362+
SDL.MediaController.deactivateBluetooth();
363+
SDL.MediaController.deactivateIPod();
364+
},
365+
moreinfo:Em.State.create(
366+
{}
367+
)
368+
}
369+
),
370+
371+
ipod: Em.State.create(
372+
{
373+
enter:function()
374+
{
375+
SDL.MediaController.set('activeState', SDL.States.nextState);
376+
if (!FFW.RC.isSetVdInProgress) {
377+
SDL.IPodModel.sendAudioNotification();
378+
}
379+
this._super();
380+
},
381+
exit:function()
382+
{
383+
this._super();
384+
SDL.MediaController.deactivateRadio();
385+
SDL.MediaController.deactivateCD();
386+
SDL.MediaController.deactivateUSB();
387+
SDL.MediaController.deactivateLineIn();
388+
SDL.MediaController.deactivateBluetooth();
389+
},
390+
}
391+
),
392+
}
294393
),
394+
295395
sdlmedia: Em.State.create(
296396
{
297397
enter: function() {
298398
SDL.MediaController.deactivateRadio();
299399
SDL.MediaController.deactivateUSB();
300400
SDL.MediaController.deactivateCD();
401+
SDL.MediaController.lastRadioControlStruct.source='MOBILE_APP';
402+
var data = SDL.MediaController.getAudioControlData();
403+
FFW.RC.onInteriorVehicleDataNotification({moduleType:'AUDIO',audioControlData:{'source':data.source}});
301404
if (SDL.SDLModel.data.mediaPlayerActive) {
302405
SDL.SDLController.onEventChanged('player', false);
303406
}
@@ -325,6 +428,9 @@ var StateManager = Em.StateManager.extend(
325428
enter: function() {
326429
if (SDL.SDLModel.data.mediaPlayerActive) {
327430
SDL.SDLController.onEventChanged('player', false);
431+
SDL.MediaController.deactivateCD();
432+
SDL.MediaController.deactivateUSB();
433+
SDL.MediaController.deactivateRadio();
328434
}
329435
SDL.MediaController.set('activeState',
330436
SDL.States.nextState);

app/controller/InfoController.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ SDL.InfoController = Em.Object.create(
6161
*/
6262
if (SDL.SDLController.model.appType) {
6363
for (var i = 0; i < SDL.SDLController.model.appType.length; i++) {
64-
if (SDL.SDLController.model.appType[i] == 'NAVIGATION') {
64+
if (SDL.SDLController.model.appType[i] == 'NAVIGATION' ||
65+
SDL.SDLController.model.appType[i] == 'PROJECTION') {
6566
SDL.BaseNavigationView.update();
6667
SDL.States.goToStates('navigationApp.baseNavigation');
6768
return;

0 commit comments

Comments
 (0)