BUG: RobotC + EOPD in Long Range mode is broken
I'm nothing if not persistent, so here's another bug report.
The HT EOPD sensor has two modes, Short Distance and Long Distance. These modes are activated by configuring the port and a sensorLightInactive and sensorLightActive respectively.
The results I get with the sensor in short distance mode are totally consistent with what I see in NXT-G (see post here: viewtopic.php?p=6378#p6378
However, when the port is configured as sensorLightActive, the readings are completely off. I did some testing with 3 programs, NXT-G, NXC and finally RobotC. The sensor was placed in the same position each time and the object that was measured against was moved along a delineated underground.
Above are the results of the distance vs raw value tests. These are the programs I used:
The NXC program:
The RobotC program:
As you can see the programs are pretty much the same. However, the results are not as can be seen from the graph below:
Could one of the developers please respond to this? It is rendering the EOPD sensor unusable in Long Range mode.
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page