File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
ioio/src/main/java/net/sourceforge/smallbasic/ioio Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 77
88public class CapSenseImpl extends IOTask implements CapSense {
99 private static final String TAG = "CapSense" ;
10+ private static final IOLock <CapSense > lock = new IOLock <>();
1011 private CapSense capSense ;
1112
1213 public CapSenseImpl () {
@@ -23,21 +24,22 @@ public void close() {
2324
2425 @ Override
2526 public void loop () throws ConnectionLostException , InterruptedException {
27+ lock .process (capSense );
2628 }
2729
2830 @ Override
2931 public float read () throws InterruptedException , ConnectionLostException {
30- return 0 ;
32+ return lock . invoke ( CapSense :: read ) ;
3133 }
3234
3335 @ Override
3436 public float readSync () throws InterruptedException , ConnectionLostException {
35- return 0 ;
37+ return lock . invoke ( CapSense :: readSync ) ;
3638 }
3739
3840 @ Override
3941 public void setFilterCoef (float t ) throws ConnectionLostException {
40-
42+ throw new UnsupportedOperationException ();
4143 }
4244
4345 @ Override
You can’t perform that action at this time.
0 commit comments