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);
|
||||
if(prefs.getBoolean("autoconnect", false)) {
|
||||
Toast.makeText(getApplicationContext(), "Should auto connect", Toast.LENGTH_SHORT).show();
|
||||
Message msg = mServiceHandler.obtainMessage();
|
||||
msg.arg1 = MSG_CONNECT;
|
||||
msg.arg2 = 0;
|
||||
|
@ -457,8 +457,6 @@ public class Telemetry {
|
||||
if ( objInfo.obj.getObjID() != objMngr.getObject("GCSTelemetryStats").getObjID() )
|
||||
{
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public abstract class UAVObject {
|
||||
updateRequestedListeners.addObserver(o);
|
||||
}
|
||||
}
|
||||
void updateRequested() {
|
||||
public void updateRequested() {
|
||||
synchronized(updateRequestedListeners) {
|
||||
updateRequestedListeners.event();
|
||||
}
|
||||
|
@ -182,22 +182,15 @@ public class UAVTalk extends Observable {
|
||||
try {
|
||||
// inStream.wait();
|
||||
val = inStream.read();
|
||||
} /*
|
||||
* 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
|
||||
System.out.println("Error reading from stream\n");
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
if (val == -1) {
|
||||
System.out.println("End of stream, terminating processInputStream thread");
|
||||
return false;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
if (val == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//System.out.println("Received byte " + val + " in state + " + rxState);
|
||||
processInputByte(val);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user