Sep-04-2020, 10:26 PM
Please put your code inside python tags.
Not sure what is happening without any output shown, but I find it odd that you're immediately converting the read data to radians, then you convert back to degrees to print. Any reason why the double conversion?
Also, you are printing the value in degrees, but you are comparing the value in radians. If you have a 10 degree pitch, it will print bigger than 5, but it is much less than 5 radians so won't trigger.
Not sure what is happening without any output shown, but I find it odd that you're immediately converting the read data to radians, then you convert back to degrees to print. Any reason why the double conversion?
Also, you are printing the value in degrees, but you are comparing the value in radians. If you have a 10 degree pitch, it will print bigger than 5, but it is much less than 5 radians so won't trigger.