File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
java/libraries/io/src/processing/io Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments