diff --git a/app/src/main/java/xdsopl/robot36/Decoder.java b/app/src/main/java/xdsopl/robot36/Decoder.java index 1bc115a..c16f1d3 100644 --- a/app/src/main/java/xdsopl/robot36/Decoder.java +++ b/app/src/main/java/xdsopl/robot36/Decoder.java @@ -162,24 +162,24 @@ public class Decoder { void toggle_scaling() { image.intScale ^= true; } void adjust_blur(int blur) { rsDecoder.invoke_adjust_blur(blur); } void toggle_debug() { rsDecoder.invoke_toggle_debug(); } - void toggle_auto() { rsDecoder.invoke_toggle_auto(); } void enable_analyzer(boolean enable) { rsDecoder.invoke_enable_analyzer((enableAnalyzer = enable) ? 1 : 0); } - void raw_mode() { rsDecoder.invoke_raw_mode(); } - void robot36_mode() { rsDecoder.invoke_robot36_mode(); } - void robot72_mode() { rsDecoder.invoke_robot72_mode(); } - void martin1_mode() { rsDecoder.invoke_martin1_mode(); } - void martin2_mode() { rsDecoder.invoke_martin2_mode(); } - void scottie1_mode() { rsDecoder.invoke_scottie1_mode(); } - void scottie2_mode() { rsDecoder.invoke_scottie2_mode(); } - void scottieDX_mode() { rsDecoder.invoke_scottieDX_mode(); } - void wraaseSC2_180_mode() { rsDecoder.invoke_wraaseSC2_180_mode(); } - void pd50_mode() { rsDecoder.invoke_pd50_mode(); } - void pd90_mode() { rsDecoder.invoke_pd90_mode(); } - void pd120_mode() { rsDecoder.invoke_pd120_mode(); } - void pd160_mode() { rsDecoder.invoke_pd160_mode(); } - void pd180_mode() { rsDecoder.invoke_pd180_mode(); } - void pd240_mode() { rsDecoder.invoke_pd240_mode(); } - void pd290_mode() { rsDecoder.invoke_pd290_mode(); } + void auto_mode() { rsDecoder.invoke_auto_mode(1); } + void raw_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_raw_mode(); } + void robot36_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_robot36_mode(); } + void robot72_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_robot72_mode(); } + void martin1_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_martin1_mode(); } + void martin2_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_martin2_mode(); } + void scottie1_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_scottie1_mode(); } + void scottie2_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_scottie2_mode(); } + void scottieDX_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_scottieDX_mode(); } + void wraaseSC2_180_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_wraaseSC2_180_mode(); } + void pd50_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd50_mode(); } + void pd90_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd90_mode(); } + void pd120_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd120_mode(); } + void pd160_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd160_mode(); } + void pd180_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd180_mode(); } + void pd240_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd240_mode(); } + void pd290_mode() { rsDecoder.invoke_auto_mode(0); rsDecoder.invoke_pd290_mode(); } int freeRunReserve(int height) { return (height * 3) / 2; } void setUpdateRate(int rate) { updateRate = Math.max(0, Math.min(4, rate)); } diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index b9299df..928ff65 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -254,8 +254,8 @@ public class MainActivity extends Activity { case R.id.action_toggle_debug: decoder.toggle_debug(); return true; - case R.id.action_toggle_auto: - decoder.toggle_auto(); + case R.id.action_auto_mode: + decoder.auto_mode(); return true; case R.id.action_toggle_analyzer: decoder.enable_analyzer(enableAnalyzer ^= true); diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index ceaf493..a418e20 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -37,11 +37,6 @@ - - - - - @@ -50,32 +45,39 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 38ab105..89387d5 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -5,7 +5,6 @@ Bild speichern Bild löschen Dekodierer umschalten - Automatik umschalten Bildanalyse umschalten Analysator umschalten Bildwiederholrate @@ -14,6 +13,8 @@ schnell schneller am schnellsten + Automatik Modus + Modus auswählen Roh Modus Robot36 Modus Robot72 Modus @@ -30,7 +31,7 @@ Scottie2 Modus ScottieDX Modus WraaseSC2 180 Modus - Bildschärfe Anpassen + Bildschärfe anpassen am schärfsten schärfer scharf diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6d513f5..ef43100 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,7 +5,6 @@ Save Image Clear Image Toggle Decoder - Toggle Auto Mode Toggle Debug Mode Toggle Analyzer Update Rate @@ -14,6 +13,8 @@ fast faster fastest + Auto Mode + Select Mode Raw Mode Robot36 Mode Robot72 Mode diff --git a/app/src/main/rs/modes.rsh b/app/src/main/rs/modes.rsh index 29c24b7..8589e52 100644 --- a/app/src/main/rs/modes.rsh +++ b/app/src/main/rs/modes.rsh @@ -22,7 +22,7 @@ limitations under the License. #include "exports.rsh" static int freerun_reserve(int height) { return (height * 3) / 2; } -void toggle_auto() { automatic_mode_detection ^= 1; } +void auto_mode(int mode) { automatic_mode_detection = mode; } void toggle_debug() { debug_mode ^= 1; } void raw_mode()