Skip to content

Commit 1e426ed

Browse files
fixed double send OnDriverDistraction
1 parent 7962e1e commit 1e426ed

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/controller/sdl/Abstract/Controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,12 +992,12 @@ SDL.SDLController = Em.Object.extend(
992992
* SDL Driver Distraction ON/OFF switcher
993993
*/
994994
selectDriverDistraction: function() {
995-
if (SDL.SDLModel.data.driverDistractionState) {
995+
if (!SDL.SDLModel.data.driverDistractionState) {
996996
FFW.UI.onDriverDistraction('DD_ON');
997997
} else {
998998
FFW.UI.onDriverDistraction('DD_OFF');
999999
}
1000-
}.observes('SDL.SDLModel.data.driverDistractionState'),
1000+
},
10011001
/**
10021002
* Ondisplay keyboard event handler
10031003
* Sends notification on SDL Core with changed value

app/view/home/controlButtons.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,9 @@ getCurrentDisplayModeClass: function() {
496496

497497
classNames: 'driverDistractionControlCheckBox',
498498

499-
checkedBinding: 'SDL.SDLModel.data.driverDistractionState'
500-
499+
checkedBinding: 'SDL.SDLModel.data.driverDistractionState',
500+
501+
change: SDL.SDLController.selectDriverDistraction,
501502
}
502503
)
503504
}

0 commit comments

Comments
 (0)