Skip to content

Commit 10066bb

Browse files
author
Felix Exner
authored
Merge pull request #2 from UniversalRobots/fix_installation_timeout
Moving script request from InstallationContribution to NodeContribution
2 parents 888b2b1 + 0eff7f8 commit 10066bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/fzi/externalcontrol/impl/ExternalControlInstallationNodeContribution.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ public boolean isDefined() {
6565

6666
@Override
6767
public void generateScript(ScriptWriter writer) {
68-
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
69-
urScriptProgram = sender.sendCommand("request_program\n");
68+
7069
}
7170

7271
// IP helper functions
@@ -169,6 +168,10 @@ public void onOk(String value) {
169168
}
170169

171170
public String getUrScriptProgram() {
171+
if (urScriptProgram == "") {
172+
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
173+
urScriptProgram = sender.sendCommand("request_program\n");
174+
}
172175
return urScriptProgram;
173176
}
174177
}

0 commit comments

Comments
 (0)