Skip to content
Snippets Groups Projects
Commit 1bb046e4 authored by Anian Bühler's avatar Anian Bühler
Browse files

minor changes

parent 48b65520
No related branches found
No related tags found
1 merge request!1Dev sim type float
...@@ -32,11 +32,12 @@ public class SimTypeInt extends SimCode { ...@@ -32,11 +32,12 @@ public class SimTypeInt extends SimCode {
value = (short) ret.getValue(); value = (short) ret.getValue();
} catch (Exception e) { } catch (Exception e) {
//if a none-SimTypeInt Block is attached //if a none-SimTypeInt Block is attached
if(e.toString().contains("SimTypeLong")) { try {
SimTypeLong ret = (SimTypeLong) followBlock.run(_arduino, functionHead); SimTypeLong ret = (SimTypeLong) followBlock.run(_arduino, functionHead);
value = (short) ret.getValue(); value = (short) ret.getValue();
}else { } catch (Exception e1) {
e.printStackTrace(); // TODO Auto-generated catch block
e1.printStackTrace();
} }
} }
} }
... ...
......
...@@ -32,11 +32,12 @@ public class SimTypeLong extends SimCode { ...@@ -32,11 +32,12 @@ public class SimTypeLong extends SimCode {
value = (int) ret.getValue(); value = (int) ret.getValue();
} catch (Exception e) { } catch (Exception e) {
//if a none-SimTypeLong Block is attached //if a none-SimTypeLong Block is attached
if(e.toString().contains("SimTypeInt")) { try {
SimTypeInt ret = (SimTypeInt) followBlock.run(_arduino, functionHead); SimTypeInt ret = (SimTypeInt) followBlock.run(_arduino, functionHead);
value = (short) ret.getValue(); value = (short) ret.getValue();
}else { } catch (Exception e1) {
e.printStackTrace(); // TODO Auto-generated catch block
e1.printStackTrace();
} }
} }
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment