Revision 679
Adjusted webcam loading
Colonet.java | ||
---|---|---|
1045 | 1045 |
*/ |
1046 | 1046 |
class WebcamLoader extends Thread |
1047 | 1047 |
{ |
1048 |
final int WEBCAMLOADER_DELAY = 250;
|
|
1049 |
final String IMAGE_PATH = "http://128.2.99.176/colonet.jpg";
|
|
1048 |
final int WEBCAMLOADER_DELAY = 100;
|
|
1049 |
final String IMAGE_PATH = "http://roboclub9.frc.ri.cmu.edu/colonet.jpg";
|
|
1050 | 1050 |
|
1051 | 1051 |
URL imagePath; |
1052 | 1052 |
|
... | ... | |
1079 | 1079 |
// The MediaTracker waitForID pauses the thread until the image is loaded. |
1080 | 1080 |
// We don't want to display a half-downloaded image. |
1081 | 1081 |
mt.addImage(image, 1); |
1082 |
mt.waitForID(1); |
|
1082 |
while(!mt.checkID(1)) |
|
1083 |
Thread.sleep(20); |
|
1083 | 1084 |
mt.removeImage(image); |
1084 | 1085 |
// Save |
1085 | 1086 |
panelWebcam.setImage(image); |
Also available in: Unified diff