From: Brian Jones Date: Fri, 17 Oct 2014 01:05:28 +0000 (-0700) Subject: Fix for TC-1468. Also enabling buttons to be pressed as a temporary workaround X-Git-Tag: submit/tizen_ivi/20141017.174217^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F28910%2F1;p=profile%2Fivi%2FModello_Hvac.git Fix for TC-1468. Also enabling buttons to be pressed as a temporary workaround Change-Id: Idbf747a90ec481db9ee48904fe7c8ddd1572a89c --- diff --git a/js/hvacControler.js b/js/hvacControler.js index f518953..4f73598 100644 --- a/js/hvacControler.js +++ b/js/hvacControler.js @@ -453,6 +453,11 @@ hvacControler.prototype.initButtons = function() { "use strict"; // Hazard $("#hazard_btn").bind('click', function() { + //This is temporary until AMB supports setting values from JS + bootstrap.carIndicator.status.hazard = !bootstrap.carIndicator.status.hazard; + hvacControler.prototype.onHazardChanged(bootstrap.carIndicator.status.hazard); + //TODO remove once functionality exists for each button + bootstrap.carIndicator.setStatus("hazard", !bootstrap.carIndicator.status.hazard); bootstrap.carIndicator.setStatus("DirectionIndicationINST", !bootstrap.carIndicator.status.hazard ? 3 : 0); bootstrap.carIndicator.setStatus("DirectionIndicationMS", !bootstrap.carIndicator.status.hazard ? 3 : 0); @@ -526,6 +531,9 @@ hvacControler.prototype.initButtons = function() { }); // AirRecirculation $("#fan_control_circ").bind('click', function() { + bootstrap.carIndicator.status.airRecirculation = !bootstrap.carIndicator.status.airRecirculation; + hvacControler.prototype.onAirRecirculationChanged(bootstrap.carIndicator.status.airRecirculation); + bootstrap.carIndicator.setStatus("airRecirculation", !bootstrap.carIndicator.status.airRecirculation); bootstrap.carIndicator.setStatus("RecircReq", !bootstrap.carIndicator.status.airRecirculation ? 1 : 0); }); @@ -612,24 +620,28 @@ hvacControler.prototype.initButtons = function() { // AirflowDirection - FloorDuct - 1 (FOOT) $("#fan_dir_down_btn").bind('click', function() { var currentStatus = bootstrap.carIndicator.status.airflowDirection; - if ((currentStatus >= 0) && (currentStatus <= 7) && (bootstrap.carIndicator.status.fanSpeed !== 0)) { + //TODO removed temp until set is enabled + if ((currentStatus >= 0) && (currentStatus <= 7)){ // && (bootstrap.carIndicator.status.fanSpeed !== 0)) { var newStatus = changeAirflowDirectionStatus("#fan_dir_down_btn", currentStatus, 1); + hvacControler.prototype.onAirflowDirectionChanged(1); setAirFlowDirectionStatus(newStatus); } }); // AirflowDirection - Defroster - 4 (SCREEN) $("#fan_dir_up_btn").bind('click', function() { var currentStatus = bootstrap.carIndicator.status.airflowDirection; - if ((currentStatus >= 0) && (currentStatus <= 7) && (bootstrap.carIndicator.status.fanSpeed !== 0)) { + if ((currentStatus >= 0) && (currentStatus <= 7)){ // && (bootstrap.carIndicator.status.fanSpeed !== 0)) { var newStatus = changeAirflowDirectionStatus("#fan_dir_up_btn", currentStatus, 4); + hvacControler.prototype.onAirflowDirectionChanged(4); setAirFlowDirectionStatus(newStatus); } }); // AirflowDirection - Front - 2 (FACE) $("#fan_dir_right_btn").bind('click', function() { var currentStatus = bootstrap.carIndicator.status.airflowDirection; - if ((currentStatus >= 0) && (currentStatus <= 7) && (bootstrap.carIndicator.status.fanSpeed !== 0)) { + if ((currentStatus >= 0) && (currentStatus <= 7)){ // && (bootstrap.carIndicator.status.fanSpeed !== 0)) { var newStatus = changeAirflowDirectionStatus("#fan_dir_right_btn", currentStatus, 2); + hvacControler.prototype.onAirflowDirectionChanged(2); setAirFlowDirectionStatus(newStatus); } }); @@ -659,10 +671,16 @@ hvacControler.prototype.initButtons = function() { }); // Defrost - Rear $("#defrost_rear_btn").bind('click', function() { + bootstrap.carIndicator.status.rearDefrost = !bootstrap.carIndicator.status.rearDefrost; + hvacControler.prototype.onRearDefrostChanged(bootstrap.carIndicator.status.rearDefrost); + bootstrap.carIndicator.setStatus("rearDefrost", !bootstrap.carIndicator.status.rearDefrost); }); // Defrost - Front $("#defrost_front_btn").bind('click', function() { + bootstrap.carIndicator.status.frontDefrost = !bootstrap.carIndicator.status.frontDefrost; + hvacControler.prototype.onFrontDefrostChanged(bootstrap.carIndicator.status.frontDefrost); + bootstrap.carIndicator.setStatus("frontDefrost", !bootstrap.carIndicator.status.frontDefrost); }); }; diff --git a/js/jquery.nouislider.js b/js/jquery.nouislider.js index 6673ccc..4c59b4a 100644 --- a/js/jquery.nouislider.js +++ b/js/jquery.nouislider.js @@ -199,9 +199,9 @@ } var bind = '.noUiSlider', - onEvent = (EVENT === 1 ? 'mousedown' : EVENT === 2 ? 'MSPointerDown' : EVENT === 3 ? 'mousedown' : 'touchstart') + bind + 'X', - moveEvent = (EVENT === 1 ? 'mousemove' : EVENT === 2 ? 'MSPointerMove' : EVENT === 3 ? 'mousemove' : 'touchmove') + bind, - offEvent = (EVENT === 1 ? 'mouseup' : EVENT === 2 ? 'MSPointerUp' : EVENT === 3 ? 'mouseup' :'touchend') + bind + onEvent = (EVENT === 1 ? 'mousedown' : EVENT === 2 ? 'MSPointerDown' : 'touchstart') + bind + 'X', + moveEvent = (EVENT === 1 ? 'mousemove' : EVENT === 2 ? 'MSPointerMove' : 'touchmove') + bind, + offEvent = (EVENT === 1 ? 'mouseup' : EVENT === 2 ? 'MSPointerUp' : 'touchend') + bind handles[i].find('div').on(onEvent, function (e) { diff --git a/packaging/Modello-Hvac.spec b/packaging/Modello-Hvac.spec index 9bd883b..42a59f2 100644 --- a/packaging/Modello-Hvac.spec +++ b/packaging/Modello-Hvac.spec @@ -1,6 +1,6 @@ Name: Modello-Hvac Summary: Pure html5 UI -Version: 0.0.2 +Version: 0.0.3 Release: 0 Group: Automotive/Modello License: Apache-2.0 diff --git a/packaging/modello-hvac.changes b/packaging/modello-hvac.changes index 647ae1a..27f6446 100644 --- a/packaging/modello-hvac.changes +++ b/packaging/modello-hvac.changes @@ -1,3 +1,6 @@ +* Thu Oct 16 2014 Brian Jones submit/tizen_ivi/20141008.200057-1-g86327ab +- Fix for TC-1468. Also enabling buttons to be pressed as a temporary workaround + * Tue Oct 07 2014 Brian Jones submit/tizen_ivi/20141007.174646-1-g057edf8 - clean spec file - Fix for TC-1560 UI always zoomed out