mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Lower all the debugging levels again
This commit is contained in:
parent
02f9452193
commit
574c2000b6
@ -33,7 +33,7 @@ public class OPTelemetryService extends Service {
|
||||
|
||||
// Logging settings
|
||||
private final String TAG = "OPTelemetryService";
|
||||
public static int LOGLEVEL = 2;
|
||||
public static int LOGLEVEL = 0;
|
||||
public static boolean WARN = LOGLEVEL > 1;
|
||||
public static boolean DEBUG = LOGLEVEL > 0;
|
||||
|
||||
|
@ -17,7 +17,7 @@ import android.util.Log;
|
||||
public class Telemetry {
|
||||
|
||||
private final String TAG = "Telemetry";
|
||||
public static int LOGLEVEL = 2;
|
||||
public static int LOGLEVEL = 0;
|
||||
public static boolean WARN = LOGLEVEL > 1;
|
||||
public static boolean DEBUG = LOGLEVEL > 0;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import android.util.Log;
|
||||
public class TelemetryMonitor extends Observable{
|
||||
|
||||
private static final String TAG = "TelemetryMonitor";
|
||||
public static int LOGLEVEL = 2;
|
||||
public static int LOGLEVEL = 0;
|
||||
public static boolean WARN = LOGLEVEL > 1;
|
||||
public static boolean DEBUG = LOGLEVEL > 0;
|
||||
|
||||
@ -204,6 +204,8 @@ public class TelemetryMonitor extends Observable{
|
||||
Telemetry.TelemetryStats telStats = tel.getStats();
|
||||
tel.resetStats();
|
||||
|
||||
if (DEBUG) Log.d(TAG, "processStatsUpdates() - stats reset");
|
||||
|
||||
// Update stats object
|
||||
gcsStatsObj.getField("RxDataRate").setDouble( (float)telStats.rxBytes / ((float)currentPeriod/1000.0) );
|
||||
gcsStatsObj.getField("TxDataRate").setDouble( (float)telStats.txBytes / ((float)currentPeriod/1000.0) );
|
||||
@ -214,6 +216,8 @@ public class TelemetryMonitor extends Observable{
|
||||
field = gcsStatsObj.getField("TxRetries");
|
||||
field.setDouble(field.getDouble() + telStats.txRetries);
|
||||
|
||||
if (DEBUG) Log.d(TAG, "processStatsUpdates() - stats updated");
|
||||
|
||||
// Check for a connection timeout
|
||||
boolean connectionTimeout;
|
||||
if ( telStats.rxObjects > 0 )
|
||||
@ -296,8 +300,10 @@ public class TelemetryMonitor extends Observable{
|
||||
objects_updated = false;
|
||||
setChanged();
|
||||
}
|
||||
|
||||
if (DEBUG) Log.d(TAG, "processStatsUpdates() - before notify");
|
||||
notifyObservers();
|
||||
|
||||
if (DEBUG) Log.d(TAG, "processStatsUpdates() - after notify");
|
||||
}
|
||||
|
||||
private void setPeriod(int ms) {
|
||||
|
@ -12,7 +12,7 @@ import android.util.Log;
|
||||
public class UAVTalk extends Observable {
|
||||
|
||||
static final String TAG = "UAVTalk";
|
||||
public static int LOGLEVEL = 2;
|
||||
public static int LOGLEVEL = 0;
|
||||
public static boolean WARN = LOGLEVEL > 1;
|
||||
public static boolean DEBUG = LOGLEVEL > 0;
|
||||
|
||||
@ -504,8 +504,7 @@ public class UAVTalk extends Observable {
|
||||
case TYPE_OBJ_ACK:
|
||||
// All instances, not allowed for OBJ_ACK messages
|
||||
if (!allInstances) {
|
||||
System.out.println("Received object ack: " + objId + " " +
|
||||
objMngr.getObject(objId).getName());
|
||||
if (DEBUG) Log.d(TAG,"Received object ack: " + objId + " " + objMngr.getObject(objId).getName());
|
||||
// Get object and update its data
|
||||
obj = updateObject(objId, instId, data);
|
||||
// Transmit ACK
|
||||
@ -521,7 +520,7 @@ public class UAVTalk extends Observable {
|
||||
case TYPE_OBJ_REQ:
|
||||
// Get object, if all instances are requested get instance 0 of the
|
||||
// object
|
||||
System.out.println("Received object request: " + objId + " " +
|
||||
if (DEBUG) Log.d(TAG,"Received object request: " + objId + " " +
|
||||
objMngr.getObject(objId).getName());
|
||||
if (allInstances) {
|
||||
obj = objMngr.getObject(objId);
|
||||
@ -538,8 +537,7 @@ public class UAVTalk extends Observable {
|
||||
case TYPE_ACK:
|
||||
// All instances, not allowed for ACK messages
|
||||
if (!allInstances) {
|
||||
System.out.println("Received ack: " + objId + " " +
|
||||
objMngr.getObject(objId).getName());
|
||||
if (DEBUG) Log.d(TAG,"Received ack: " + objId + " " + objMngr.getObject(objId).getName());
|
||||
// Get object
|
||||
obj = objMngr.getObject(objId, instId);
|
||||
// Check if an ack is pending
|
||||
|
Loading…
x
Reference in New Issue
Block a user