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

Device.appendOrUpdate RSSI filter typo #10

Open
k-mack opened this issue Dec 1, 2016 · 0 comments
Open

Device.appendOrUpdate RSSI filter typo #10

k-mack opened this issue Dec 1, 2016 · 0 comments

Comments

@k-mack
Copy link

k-mack commented Dec 1, 2016

When a new device is added via Device.appendOrUpdate, the RSSI check compares the newDevice against itself in the first logical expression (line 34). I believe it should compare the new device against the existing one (like it does in the second logical expression).

It looks like the new device is to be added if its RSSI is less than or greater than the existing device's (by some threshold). If so, wouldn't switching the two devices in the second logical expression make for a better filter? For example,

if (newDevice.RSSI < (existingDevice.RSSI - 5)) or (newDevice.RSSI > (existingDevice.RSSI+2)):
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