From: Shane H. <sr...@ny...> - 2005-10-20 18:52:55
|
Hi Nils - > I guess its related to the way you poll your data from the sensor, try > > > pc.runThreaded (-1, -1); > > in the initialization section end delete the si.readData() stuff. As > far as I see from my working code its not necessary this way. You don't need the readData stuff? Really? If you don't put that in then I assume the sensor just reads at some default frequency? I have not yet been able to try runThreaded(-1, -1) as you suggest, but what I have found is that there appears to be some race conditions. If I sleep for 500 milliseconds after si.readData() then the readings are sanet. I would have expected readData() to block until it put something sensible in the range data, but perhaps that's not done for a reason. I'll try your suggestion tonight to see if I can get rid of my hack. Thanks for your response, Shane |