mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
AndroidGCS: UAVTalk no longer extends Observable since there is only one
listener anyway we use a setListener pattern.
This commit is contained in:
parent
3076a81347
commit
d46a865229
@ -31,12 +31,11 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.Observable;
|
|
||||||
|
|
||||||
import junit.framework.Assert;
|
import junit.framework.Assert;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public class UAVTalk extends Observable {
|
public class UAVTalk {
|
||||||
|
|
||||||
static final String TAG = "UAVTalk";
|
static final String TAG = "UAVTalk";
|
||||||
public static int LOGLEVEL = 0;
|
public static int LOGLEVEL = 0;
|
||||||
@ -673,6 +672,7 @@ public class UAVTalk extends Observable {
|
|||||||
(respObj.getInstID() == obj.getInstID() || respAllInstances)) {
|
(respObj.getInstID() == obj.getInstID() || respAllInstances)) {
|
||||||
if (transactionListener != null)
|
if (transactionListener != null)
|
||||||
transactionListener.TransactionFailed(obj);
|
transactionListener.TransactionFailed(obj);
|
||||||
|
respObj = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,9 +686,7 @@ public class UAVTalk extends Observable {
|
|||||||
&& (respObj.getInstID() == obj.getInstID() || respAllInstances)) {
|
&& (respObj.getInstID() == obj.getInstID() || respAllInstances)) {
|
||||||
if (transactionListener != null)
|
if (transactionListener != null)
|
||||||
transactionListener.TransactionSucceeded(obj);
|
transactionListener.TransactionSucceeded(obj);
|
||||||
/*respObj = null;
|
respObj = null;
|
||||||
setChanged();
|
|
||||||
notifyObservers(obj);*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user