Skip to content

Commit 05068c9

Browse files
committed
IO: Fix compilation on arm
Error introduced in previous commit.
1 parent ad19238 commit 05068c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/libraries/io/src/processing/io/SoftwareServo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class SoftwareServo {
3434
public static final int DEFAULT_MAX_PULSE = 2400;
3535

3636
protected int pin = -1; // gpio number (-1 .. not attached)
37-
protected int handle = -1; // native thread id (<0 .. not started)
37+
protected long handle = -1; // native thread id (<0 .. not started)
3838
protected int period = 20000; // 20 ms (50 Hz)
3939
protected int minPulse = 0; // minimum pulse width in microseconds
4040
protected int maxPulse = 0; // maximum pulse width in microseconds
@@ -122,7 +122,7 @@ public void write(float angle) {
122122
}
123123
handle = NativeInterface.servoStartThread(pin, pulse, period);
124124
if (handle < 0) {
125-
throw new RuntimeException(NativeInterface.getError(handle));
125+
throw new RuntimeException(NativeInterface.getError((int)handle));
126126
}
127127
} else {
128128
// thread already running

0 commit comments

Comments
 (0)