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

Duration Cannot Be >65,535 #32

Open
alancheung opened this issue Dec 17, 2020 · 0 comments
Open

Duration Cannot Be >65,535 #32

alancheung opened this issue Dec 17, 2020 · 0 comments

Comments

@alancheung
Copy link

alancheung commented Dec 17, 2020

First, love this library, it's amazing!

The documentation for LifxLan states that the duration is an unsigned 32-bit integer with a maximum value of 4,294,967,295 for regular turnOn commands.

It looks in lifx-lan-composer.js has several methods to calculate the maximum value for duration.

102:
  typeof(duration) !== 'number' || duration % 1 !== 0 || duration < 0 || duration > 65535
117:
  typeof(v) === 'number' && v % 1 === 0 && v >= 0 && v <= 0xffffffff
501:
  typeof(v) === 'number' && v % 1 === 0 && v >= 0 && v <= 0xffffffff
715:
  typeof(duration) !== 'number' || duration % 1 !== 0 || duration < 0 || duration > 65535
508
  typeof(duration) !== 'number' || duration % 1 !== 0 || duration < 0 || duration > Math.pow(2, 64)

The maximum values set in this library do not match LIFX support maximum values.

PR incoming as soon as I figure out how to pull :)

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

No branches or pull requests

1 participant