File tree Expand file tree Collapse file tree
net/sourceforge/smallbasic/ioio Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838import android .os .Build ;
3939import android .os .ParcelFileDescriptor ;
4040
41- import net .sourceforge .smallbasic .ioio .IOIOLoader ;
42-
4341import java .io .BufferedOutputStream ;
4442import java .io .FileDescriptor ;
4543import java .io .FileInputStream ;
Original file line number Diff line number Diff line change 1- package net . sourceforge . smallbasic . ioio ;
1+ package ioio . lib . android ;
22
33import android .content .Context ;
44
Original file line number Diff line number Diff line change 1111
1212public class IOLock <I > {
1313 private final Object mutex = new Object ();
14- private static final int TIMEOUT_SECS = 5 ;
14+ private static final int TIMEOUT_SECS = 20 ;
1515 private Consumer <I > consumer ;
1616
1717 public void invoke (Consumer <I > consumer ) {
@@ -90,7 +90,7 @@ private CountDownLatch beginLatch() {
9090 private void endLatch (CountDownLatch latch ) {
9191 try {
9292 if (!latch .await (TIMEOUT_SECS , TimeUnit .SECONDS )) {
93- throw new RuntimeException ("Timeout waiting for latch " );
93+ throw new RuntimeException ("Timeout waiting for device " );
9494 }
9595 } catch (InterruptedException e ) {
9696 throw new RuntimeException (e );
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ jclass findClass(const char *path) {
7676 return g_env->FindClass (path);
7777}
7878
79- jobject createInstance () {
79+ jobject createInstance (jclass clazz ) {
8080 jmethodID constructor = g_env->GetMethodID (clazz, " <init>" , " ()V" );
8181 jobject result;
8282 if (constructor != nullptr ) {
@@ -496,7 +496,7 @@ int sblib_init(const char *sourceFile) {
496496#if defined(DESKTOP_MODULE)
497497 JavaVMInitArgs vm_args;
498498 JavaVMOption options[3 ];
499- options[0 ].optionString = (char *)" -Djava.class.path=./android/target/ ioio-1.0-jar-with-dependencies.jar" ;
499+ options[0 ].optionString = (char *)" -Djava.class.path=./ioio-1.0-jar-with-dependencies.jar" ;
500500 options[1 ].optionString = (char *)" -Dioio.SerialPorts=IOIO0" ;
501501 options[2 ].optionString = (char *)" -Xrs" ;
502502 // options[2].optionString = "-Xdebug";
You can’t perform that action at this time.
0 commit comments