pimoroni / vl53l1x-python

Python library for the VL53L1X Laser Ranger
https://shop.pimoroni.com/products/vl53l1x-breakout
94 stars 53 forks source link

Error Distance: -1185mm #55

Open Sarra776 opened 2 years ago

Sarra776 commented 2 years ago

Does anyone have a solution to this issue? Thanks in advance.

error

MazdakFarzone commented 1 year ago

Think this is an error and can occur if you didn't stop the ranging on a previous ranging attempt. be sure to execute stop_ranging() before exiting your script.

Reneg973 commented 1 year ago

seems the script distance.py doesn't handle all possible exit paths. I'm new with Python, but seems that if the script is cancelled with ^Z, the exit_handler() isn't called. Docu says SIGINT handles ^C