Open JCharante opened 6 years ago
Those refer to the ranges on the IR sensors, and are much easier to recognize than the model numbers in my opinion
I agree with using the descriptions--which also happen to be how Sharp characterizes them (short range infrared sensor, medium range infrared sensor, ec). That said, it would be helpful to include in the comments (or javadoc) for each class the model number of the associated sensor.
Short: GP2Y0A41SK0F Medium: GP2Y0A21YK Long: GP2Y0A02YK0F
Instead of calling IRSensing.sensorShort.getDistance()
, instead you should have the ir type enum as a parameter along with the port, and have IRSensing.getDistance()
which uses the transform coefficient and power according to the enum that was given in the constructor.
Untested, don't merge