| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,7 @@ public class SoftwareServo { | |||
| 34 | 34 | public static final int DEFAULT_MAX_PULSE = 2400; | |
| 35 | 35 | ||
| 36 | 36 | 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) | ||
| 38 | 38 | protected int period = 20000; // 20 ms (50 Hz) | |
| 39 | 39 | protected int minPulse = 0; // minimum pulse width in microseconds | |
| 40 | 40 | protected int maxPulse = 0; // maximum pulse width in microseconds | |
@@ -122,7 +122,7 @@ public void write(float angle) { | |||
| 122 | 122 | } | |
| 123 | 123 | handle = NativeInterface.servoStartThread(pin, pulse, period); | |
| 124 | 124 | if (handle < 0) { | |
| 125 | - throw new RuntimeException(NativeInterface.getError(handle)); | ||
| 125 | + throw new RuntimeException(NativeInterface.getError((int)handle)); | ||
| 126 | 126 | } | |
| 127 | 127 | } else { | |
| 128 | 128 | // thread already running | |
| Back | FazBrowse Home | New Git URL |
0 commit comments