From 2c3c6b1293d0ea103115b03d0a6ed443f1a3aae2 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 22 Nov 2024 10:41:43 +0100 Subject: [PATCH] added experimental PD290 support full 616 lines are supported but width is 640 pixels instead of 800 to avoid breaking other modes. that means the aspect ratio is wrong for PD290 at the moment. --- app/src/main/java/xdsopl/robot36/Decoder.java | 1 + app/src/main/java/xdsopl/robot36/MainActivity.java | 6 +++++- app/src/main/res/menu/menu_main.xml | 3 +++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/xdsopl/robot36/Decoder.java b/app/src/main/java/xdsopl/robot36/Decoder.java index 6a20f95..aa591d3 100644 --- a/app/src/main/java/xdsopl/robot36/Decoder.java +++ b/app/src/main/java/xdsopl/robot36/Decoder.java @@ -115,6 +115,7 @@ public class Decoder { syncPulse20msModes.add(new PaulDon("160", 98, 512, 400, 0.195584, sampleRate)); syncPulse20msModes.add(new PaulDon("180", 96, 640, 496, 0.18304, sampleRate)); syncPulse20msModes.add(new PaulDon("240", 97, 640, 496, 0.24448, sampleRate)); + syncPulse20msModes.add(new PaulDon("290", 94, 640, 616, 0.2288, sampleRate)); } private double scanLineMean(int[] lines) { diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index b4063ac..c702934 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -457,7 +457,7 @@ public class MainActivity extends AppCompatActivity { scopeBuffer = new PixelBuffer(640, 2 * 1280); freqPlotBuffer = new PixelBuffer(256, 2 * 256); peakMeterBuffer = new PixelBuffer(1, 16); - imageBuffer = new PixelBuffer(640, 496); + imageBuffer = new PixelBuffer(640, 616); createScope(config); createFreqPlot(config); createPeakMeter(); @@ -545,6 +545,10 @@ public class MainActivity extends AppCompatActivity { setMode(R.string.pd240); return true; } + if (id == R.id.action_force_pd290) { + setMode(R.string.pd290); + return true; + } if (id == R.id.action_force_martin1) { setMode(R.string.martin1); return true; diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index c8dd181..3daeed3 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -62,6 +62,9 @@ + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 17e3cfa..827fc9d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -14,6 +14,7 @@ PD 160 PD 180 PD 240 + PD 290 Martin 1 Martin 2 Scottie 1