Quote:
|
Originally Posted by Mark McLeod
It looks like you found a good solution to your problem.
I agree it looks like the specific problem you're seeing is probably because the PIC sends out commands before the camera has time to complete it's power-up sequence.
We also use a generic startup delay in our main loop of a few milliseconds, so the code doesn't attempt to do any sensor I/O or even pay attention to the regular OI communication packet until everything's had a chance to settle.
|
I had the same problem with WPILib (which is used in EasyC). So WPILib won't send any camera commands until two seconds after power on. This isn't a serious problem since that's the time that the robot is sitting on the field before the match starts. Also, users can initialize everything else before starting the camera and that can often burn up the 2 seconds anyway, then it would start right away.
The library also receives in RAW mode, but always sends commands in ASCII. It didn't seem like a worthwhile optimization, since 99% of what the camera was doing was receiving T-packets, and those were received in binary. That way there was no ambiguity when interrupting the camera and sending commands to it.