]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - zigbee-iot-agent/zigbee-iot-agent.git/commitdiff
fixed light device saturation bounds issue
authorTony Cave <t-cave@ti.com>
Tue, 21 Apr 2015 11:45:02 +0000 (11:45 +0000)
committerTony Cave <t-cave@ti.com>
Tue, 21 Apr 2015 11:45:02 +0000 (11:45 +0000)
devices/light-device.js

index ce3056e33bd582161250abe004c0337207c7eb75..b51759129a7a52d60eee8edf0265f84ba10dca36 100755 (executable)
@@ -223,11 +223,11 @@ function LightDevice(_nwkmgr, ieee, ep, type) {
          {
                //make into whole numbers
                data.hue = Math.round( data.hue );
-               data.sat = Math.round( data.sat );
+               data.saturation = Math.round( data.saturation );
                
                //zigbee does not allow sat of 0xff
-               if(data.sat > 0xfe) {
-                 data.sat = 0xfe;
+               if(data.saturation > 0xfe) {
+                 data.saturation = 0xfe;
                }
       hagateway.setColorWithTime(data.hue, data.saturation, ld.data.transitionTime, ld.info.ieee, ld.info.ep, 
       function(status, seq){