Skip to content
Snippets Groups Projects
Unverified Commit c41a99e9 authored by letsgoINGStudent's avatar letsgoINGStudent Committed by GitHub
Browse files

Merge pull request #1 from letsgoINGStudent/dev_int16_Test

changed int to short (int16) in SimTypeInt
parents 945da5dd d40406b3
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,11 @@ import tec.letsgoing.ardublock.simulator.simcode.SimCode;
*
*/
public class SimTypeInt extends SimCode {
private int value = 0;
private short value = 0;
private SimCode followBlock;
public SimTypeInt(int _value) {
value = _value;
value = (short) _value;
}
public SimTypeInt(SimCode block) {
......@@ -28,7 +28,7 @@ public class SimTypeInt extends SimCode {
public SimTypeInt run(Arduino _arduino, SimCode functionHead) {
if (followBlock instanceof SimCode) {
SimTypeInt ret = (SimTypeInt) followBlock.run(_arduino, functionHead);
value = ret.getValue();
value = (short) ret.getValue();
}
return new SimTypeInt(value);
......@@ -40,7 +40,7 @@ public class SimTypeInt extends SimCode {
}
public int getValue() {
return value;
return (int) value;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment