altosdroid: also display channel numbers
authorMike Beattie <mike@ethernal.org>
Fri, 31 Aug 2012 04:50:53 +0000 (16:50 +1200)
committerMike Beattie <mike@ethernal.org>
Fri, 31 Aug 2012 04:50:53 +0000 (16:50 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java

index de0b02a6f24d26fd9b023e6621506c3008d78f0f..a79071d0f396aea6378df6018054a2b445518811 100644 (file)
@@ -363,7 +363,7 @@ public class AltosDroid extends Activity {
 
        void setFrequency(String freq) {
                try {
-                       setFrequency (Double.parseDouble(freq));
+                       setFrequency (Double.parseDouble(freq.split(" ")[0]));
                } catch (NumberFormatException e) {
                }
        }
@@ -381,16 +381,16 @@ public class AltosDroid extends Activity {
                        // Set the TBT radio frequency
 
                        final String[] frequencies = {
-                               "434.550",
-                               "434.650",
-                               "434.750",
-                               "434.850",
-                               "434.950",
-                               "435.050",
-                               "435.150",
-                               "435.250",
-                               "435.350",
-                               "435.450"
+                               "434.550 (Channel 0)",
+                               "434.650 (Channel 1)",
+                               "434.750 (Channel 2)",
+                               "434.850 (Channel 3)",
+                               "434.950 (Channel 4)",
+                               "435.050 (Channel 5)",
+                               "435.150 (Channel 6)",
+                               "435.250 (Channel 7)",
+                               "435.350 (Channel 8)",
+                               "435.450 (Channel 9)"
                        };
 
                        AlertDialog.Builder builder = new AlertDialog.Builder(this);