mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
AndroidGCS: Cleanup for some debugging output in telemetry. Make
uppdateRequested() a public method so anything can request a UAVO update.
This commit is contained in:
parent
1d387a2082
commit
3be2485b5e
@ -135,7 +135,6 @@ public class OPTelemetryService extends Service {
|
|||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(OPTelemetryService.this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(OPTelemetryService.this);
|
||||||
if(prefs.getBoolean("autoconnect", false)) {
|
if(prefs.getBoolean("autoconnect", false)) {
|
||||||
Toast.makeText(getApplicationContext(), "Should auto connect", Toast.LENGTH_SHORT).show();
|
|
||||||
Message msg = mServiceHandler.obtainMessage();
|
Message msg = mServiceHandler.obtainMessage();
|
||||||
msg.arg1 = MSG_CONNECT;
|
msg.arg1 = MSG_CONNECT;
|
||||||
msg.arg2 = 0;
|
msg.arg2 = 0;
|
||||||
|
@ -457,8 +457,6 @@ public class Telemetry {
|
|||||||
if ( objInfo.obj.getObjID() != objMngr.getObject("GCSTelemetryStats").getObjID() )
|
if ( objInfo.obj.getObjID() != objMngr.getObject("GCSTelemetryStats").getObjID() )
|
||||||
{
|
{
|
||||||
if (DEBUG) Log.d(TAG,"transactionCompleted(false) due to receiving object not GCSTelemetryStats while not connected.");
|
if (DEBUG) Log.d(TAG,"transactionCompleted(false) due to receiving object not GCSTelemetryStats while not connected.");
|
||||||
System.out.println(gcsStatsObj.toString());
|
|
||||||
System.out.println(objInfo.obj.toString());
|
|
||||||
objInfo.obj.transactionCompleted(false);
|
objInfo.obj.transactionCompleted(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ public abstract class UAVObject {
|
|||||||
updateRequestedListeners.addObserver(o);
|
updateRequestedListeners.addObserver(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void updateRequested() {
|
public void updateRequested() {
|
||||||
synchronized(updateRequestedListeners) {
|
synchronized(updateRequestedListeners) {
|
||||||
updateRequestedListeners.event();
|
updateRequestedListeners.event();
|
||||||
}
|
}
|
||||||
|
@ -182,22 +182,15 @@ public class UAVTalk extends Observable {
|
|||||||
try {
|
try {
|
||||||
// inStream.wait();
|
// inStream.wait();
|
||||||
val = inStream.read();
|
val = inStream.read();
|
||||||
} /*
|
} catch (IOException e) {
|
||||||
* catch (InterruptedException e) { // TODO Auto-generated catch
|
|
||||||
* block System.out.println("Connection was aborted\n");
|
|
||||||
* e.printStackTrace(); break; }
|
|
||||||
*/catch (IOException e) {
|
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
System.out.println("Error reading from stream\n");
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (val == -1) {
|
if (val == -1) {
|
||||||
System.out.println("End of stream, terminating processInputStream thread");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//System.out.println("Received byte " + val + " in state + " + rxState);
|
|
||||||
processInputByte(val);
|
processInputByte(val);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user