Revision 567
added a 'make run' command to run the applet on optimusprime
Colonet.java | ||
---|---|---|
139 | 139 |
} |
140 | 140 |
|
141 | 141 |
public void destroy () { |
142 |
csi.disconnect(); |
|
142 | 143 |
} |
143 | 144 |
|
144 | 145 |
private synchronized void createAndShowGUI () { |
... | ... | |
1042 | 1043 |
*/ |
1043 | 1044 |
class WebcamLoader extends Thread |
1044 | 1045 |
{ |
1045 |
final int WEBCAMLOADER_DELAY = 400;
|
|
1046 |
final int WEBCAMLOADER_DELAY = 250;
|
|
1046 | 1047 |
final String IMAGE_PATH = "http://128.2.99.176/colonet.jpg"; |
1047 | 1048 |
|
1048 | 1049 |
URL imagePath; |
... | ... | |
1068 | 1069 |
image.flush(); |
1069 | 1070 |
System.gc(); |
1070 | 1071 |
try { |
1071 |
imagePath = new URL(IMAGE_PATH + "?rand=" + rand.nextInt(50000));
|
|
1072 |
imagePath = new URL(IMAGE_PATH + "?rand=" + rand.nextInt(100000));
|
|
1072 | 1073 |
} catch (MalformedURLException e) { |
1073 | 1074 |
System.out.println("Malformed URL: could not form URL from: [" + IMAGE_PATH + "]\n"); |
1074 | 1075 |
} |
... | ... | |
1224 | 1225 |
} |
1225 | 1226 |
|
1226 | 1227 |
public void sendToServer () { |
1227 |
System.out.println("Attempting to send angle = " + getAngle() + ", speed = " + getSpeed() + ""); |
|
1228 |
//System.out.println("Attempting to send angle = " + getAngle() + ", speed = " + getSpeed() + "");
|
|
1228 | 1229 |
String dest = ColonetServerInterface.GLOBAL_DEST; |
1229 | 1230 |
if (cmbRobotNum != null && cmbRobotNum.getSelectedIndex() > 0) { |
1230 | 1231 |
dest = (String)cmbRobotNum.getSelectedItem(); |
Also available in: Unified diff