ImageQueue.patch

Ši. Fojtů, 01/19/2012 08:18 PM

Download (638 Bytes)

View differences:

ImageQueue.java (working copy)
22 22
	 * @return raw image data, see rst.vision.Image
23 23
	 * @throws InterruptedException
24 24
	 */
25
	public byte[] take(int ms) throws InterruptedException {
26
		Image result = getQueue().poll(ms, TimeUnit.MILLISECONDS);
27
		if (result == null) {
28
			return null;
29
		}
30
		// else just return the raw data
31
		return result.getData().toByteArray();
25
	public Image take(int ms) throws InterruptedException {
26
		return getQueue().poll(ms, TimeUnit.MILLISECONDS);
32 27
	}
33 28

  
34 29
}