|
@@ -7,7 +7,6 @@ import okhttp3.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
-import java.awt.*;
|
|
|
import java.util.concurrent.BlockingQueue;
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
import java.util.concurrent.Semaphore;
|
|
@@ -23,8 +22,8 @@ public class URBot {
|
|
|
private Semaphore cmdDoneSem = new Semaphore(0);
|
|
|
private RobotProgramLabel currentAck;
|
|
|
|
|
|
- public URBot(String ip) {
|
|
|
- sc = new ScReadThread(ip, this);
|
|
|
+ public URBot(String ip, int port) {
|
|
|
+ sc = new ScReadThread(ip, port, this);
|
|
|
}
|
|
|
|
|
|
public synchronized void ackNumber(RobotProgramLabel rpl) {
|
|
@@ -82,7 +81,6 @@ public class URBot {
|
|
|
rc.id=id;
|
|
|
// rc.cmd = String.format("def urweb():\n%s\n$ %s \"URWEB_END\"\nend\n", res, id);
|
|
|
rc.cmd = res;
|
|
|
-
|
|
|
this.cmdq.put(rc);
|
|
|
} catch (InterruptedException e) {
|
|
|
Thread.currentThread().interrupt();
|