Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scaling issues #38

Merged
merged 1 commit into from
Oct 3, 2016
Merged

Fix scaling issues #38

merged 1 commit into from
Oct 3, 2016

Conversation

devbobo
Copy link
Contributor

@devbobo devbobo commented Oct 1, 2016

node-lifx has always had issues with scaling. Quite often the scaling with node-lifx doesn't match what the LIFX app is showing.

Math.round should be used instead of Math.floor.

For test purposes, set Brightness to 49% and then read back the corresponding value and it will read 48%.

This PR resolves that discrepancy.

@ristomatti
Copy link
Collaborator

I've noticed this issue also. I hope this PR gets merged!

@codecov-io
Copy link

codecov-io commented Oct 1, 2016

Current coverage is 57.82% (diff: 50.00%)

Merging #38 into master will not change coverage

@@             master        #38   diff @@
==========================================
  Files            42         42          
  Lines          1252       1252          
  Methods         103        103          
  Messages          0          0          
  Branches        195        195          
==========================================
  Hits            724        724          
  Misses          528        528          
  Partials          0          0          

Powered by Codecov. Last update bd30a43...239ba35

@MariusRumpf MariusRumpf merged commit 1a01749 into MariusRumpf:master Oct 3, 2016
@MariusRumpf
Copy link
Owner

Does look good, thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants