Hi,
I noticed that RobotC has the ability to set both the minimum and maximum bounds on a distance sensor, but that RobotMesh only has the ability to set the maximum. Would it be possible to add support for minimum as well?
Thanks!
Nathan
Hi,
I noticed that RobotC has the ability to set both the minimum and maximum bounds on a distance sensor, but that RobotMesh only has the ability to set the maximum. Would it be possible to add support for minimum as well?
Thanks!
Nathan
Hi Nathan.
I wasn’t aware we had a class method for setting the max range on an ultrasonic sensor. Which programming language and platform are you looking at?
Looks like it may only be in the beta SDK
Language: Python
Class: sonar
Function: set_maximum
Neat. The peril of supporting so many languages is that you might lose track of what does what, apparently.
If such a method existed, as a user of that method, what would you expect a distance()
call to return if it was below minimum?
0? -1? None
? NaN
? Something else?
In RobotC it appears to be returning Max Int. NaN would probably be a better way of saying that, if that’s doable in blockly. Negative numbers are also better than a max int imho.