From 9ded1bb9fbbb13f5605d7e1d62a6f38eae97d2ca Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sun, 5 Aug 2012 04:00:12 -0500 Subject: [PATCH] AndroidGCS: Suppress some debugging information from telemetry --- androidgcs/src/org/openpilot/uavtalk/Telemetry.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/androidgcs/src/org/openpilot/uavtalk/Telemetry.java b/androidgcs/src/org/openpilot/uavtalk/Telemetry.java index 2ee5ab9a4..ae1eb10b7 100644 --- a/androidgcs/src/org/openpilot/uavtalk/Telemetry.java +++ b/androidgcs/src/org/openpilot/uavtalk/Telemetry.java @@ -16,9 +16,9 @@ public class Telemetry { private final String TAG = "Telemetry"; public static int LOGLEVEL = 0; - public static boolean WARN = LOGLEVEL > 1; + public static boolean WARN = LOGLEVEL > 2; + public static boolean ERROR = LOGLEVEL > 1; public static boolean DEBUG = LOGLEVEL > 0; - public class TelemetryStats { public int txBytes; public int rxBytes; @@ -305,7 +305,7 @@ public class Telemetry { processObjectQueue(); } else { - Log.e(TAG,"Error: received a transaction completed when did not expect it."); + if (ERROR) Log.e(TAG,"Error: received a transaction completed when did not expect it."); } } @@ -369,7 +369,7 @@ public class Telemetry { } } else { - Log.e(TAG,"Error: inside of processObjectTransaction with no transPending"); + if (ERROR) Log.e(TAG,"Error: inside of processObjectTransaction with no transPending"); } } @@ -429,7 +429,7 @@ public class Telemetry { // Don nothing if a transaction is already in progress (should not happen) if (transPending) { - Log.e(TAG,"Dequeue while a transaction pending"); + if (ERROR) Log.e(TAG,"Dequeue while a transaction pending"); return; }