Skip to content

Add ValueError to start_range_continuous() #28

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

Merged
merged 2 commits into from
Apr 27, 2022
Merged

Add ValueError to start_range_continuous() #28

merged 2 commits into from
Apr 27, 2022

Conversation

tekktrik
Copy link
Member

@tekktrik tekktrik commented Mar 1, 2022

Refactors start_range_continuous() and also adds throwing ValueError if out of range. Not sure why the period couldn't be set specifically between 2.25 and 2.54 seconds, but that was also removed and can now be done (in the 10 ms intervals)

Also updates the documentation to add more information on the delay behavior.

Refactors `start_range_continuous()` and also adds throwing ValueError if out of range.
@tekktrik tekktrik requested a review from a team March 1, 2022 01:54
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me. I don't have the specific hardware for testing.

@tekktrik did you run this with the sensor?

@tekktrik
Copy link
Member Author

tekktrik commented Mar 20, 2022

I don't think I did but I can.

Looking at this again I suspect the faulty range was a typo. I'll comment here once it's tested, at some point today if I can find the sensor if I can't find it now.

@tekktrik
Copy link
Member Author

Just kidding, can't find it, whoops

@tekktrik
Copy link
Member Author

Revisiting, I haven't forgotten about this. Though I do seem to have forgotten where I put my sensor haha. Pretty sure the original was a typo but worst case I'll order another sensor.

@JonasSchatz
Copy link
Contributor

Can confirm, it was a typo 🥲
Code originated from the C++ version of this library: https://github.com/adafruit/Adafruit_VL6180X/blob/master/Adafruit_VL6180X.cpp

@tekktrik
Copy link
Member Author

@FoamyGuy is this good to merge? Didn't know if your approval was contingent on test.

@FoamyGuy
Copy link
Contributor

@tekktrik it would be best to test if we can. I've got one of these sensors now. I'll test it this week

@FoamyGuy
Copy link
Contributor

I tested successfully with a PyPortal Titano connected with a stemma cable to the VL6180.

@FoamyGuy FoamyGuy merged commit 7a9789d into adafruit:main Apr 27, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 28, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_VL6180X to 1.4.4 from 1.4.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_VL6180X#28 from tekktrik/dev/fix-setting-delay
  > change discord badge
  > Patch: Replaced discord badge image
  > Updated gitignore
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.

3 participants