Skip to content
Snippets Groups Projects
Commit 97511ad3 authored by René Schöne's avatar René Schöne
Browse files

close connections on rewind, send first non-error-operation

parent b281f948
No related branches found
No related tags found
1 merge request!1Multiple scenes, multiple robots and more
Pipeline #9796 passed
...@@ -90,6 +90,9 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa ...@@ -90,6 +90,9 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa
protected abstract void createSpecificMainHandlerConnections(); protected abstract void createSpecificMainHandlerConnections();
private void rewind(String statusMessage) throws Exception { private void rewind(String statusMessage) throws Exception {
if (model != null) {
model.ragconnectCloseConnections();
}
model = createWorldModel(); model = createWorldModel();
Scene scene = readSceneAndRobots(); Scene scene = readSceneAndRobots();
......
...@@ -136,7 +136,15 @@ aspect Computation { ...@@ -136,7 +136,15 @@ aspect Computation {
//--- getNextOperation --- //--- getNextOperation ---
syn Operation WorldModelB.getNextOperation() { syn Operation WorldModelB.getNextOperation() {
return diffToOperations().getNumChild() > 0 ? diffToOperations().getChild(0) : new ErrorOperation("No operation computed!"); if (diffToOperations().getNumChild() == 0) {
return new ErrorOperation("No operation computed!");
}
for (Operation op : diffToOperations()) {
if (!op.isErrorOperation()) {
return op;
}
}
return new ErrorOperation("No executable operation found!");
} }
//--- canReach --- //--- canReach ---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment