Skip to content

Commit

Permalink
Check the connection correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Mar 29, 2022
1 parent 3d095e9 commit 4f118fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ private static void processReturnedObjects(Object ret, ArrayList<CSG> csgBits) {
if(MobileBase.class.isInstance(ret)) {

MobileBase ret2 = (MobileBase)ret;
ret2.connect();
MobileBaseCadManager m=MobileBaseCadManager.get(ret2);
m.setConfigurationViewerMode(false);
ret2.connect();
ArrayList<CSG> generateBody = m.generateBody();
processReturnedObjects(generateBody,csgBits);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public ArrayList<CSG> generateBody() {
return generateBody(getMobileBase());
}
public ArrayList<CSG> generateBody(MobileBase base) {
if(base.isAvailable())
if(!base.isAvailable())
throw new RuntimeException("Device "+base.getScriptingName()+" is not connected, can not generate cad");

getProcesIndictor().set(0);
Expand Down

0 comments on commit 4f118fe

Please sign in to comment.