Fix for TC-1468. Also enabling buttons to be pressed as a temporary workaround 10/28910/1 submit/tizen_ivi/20141017.174217
authorBrian Jones <brian.j.jones@intel.com>
Fri, 17 Oct 2014 01:05:28 +0000 (18:05 -0700)
committerBrian Jones <brian.j.jones@intel.com>
Fri, 17 Oct 2014 01:06:07 +0000 (18:06 -0700)
Change-Id: Idbf747a90ec481db9ee48904fe7c8ddd1572a89c

js/hvacControler.js
js/jquery.nouislider.js
packaging/Modello-Hvac.spec
packaging/modello-hvac.changes

index f518953..4f73598 100644 (file)
@@ -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);
        });
 };
index 6673ccc..4c59b4a 100644 (file)
                                                }
 
                                                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) {
 
index 9bd883b..42a59f2 100644 (file)
@@ -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
index 647ae1a..27f6446 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Oct 16 2014 Brian Jones <brian.j.jones@intel.com> 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 <brian.j.jones@intel.com> submit/tizen_ivi/20141007.174646-1-g057edf8
 - clean spec file
 - Fix for TC-1560 UI always zoomed out