Skip to content

Commit

Permalink
removed "Modes" word and translated "Raw Mode"
Browse files Browse the repository at this point in the history
  • Loading branch information
xdsopl committed May 18, 2024
1 parent d5b72b7 commit 0eec2c5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/xdsopl/robot36/Decoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class Decoder {
private int currentScanLineSamples;
private float lastFrequencyOffset;

Decoder(PixelBuffer scopeBuffer, PixelBuffer imageBuffer, int sampleRate) {
Decoder(PixelBuffer scopeBuffer, PixelBuffer imageBuffer, String rawName, int sampleRate) {
this.scopeBuffer = scopeBuffer;
this.imageBuffer = imageBuffer;
imageBuffer.line = -1;
Expand Down Expand Up @@ -94,7 +94,7 @@ public class Decoder {
syncPulseToleranceSamples = (int) Math.round(syncPulseToleranceSeconds * sampleRate);
double scanLineToleranceSeconds = 0.001;
scanLineToleranceSamples = (int) Math.round(scanLineToleranceSeconds * sampleRate);
rawMode = new RawDecoder(sampleRate);
rawMode = new RawDecoder(rawName, sampleRate);
Mode robot36 = new Robot_36_Color(sampleRate);
currentMode = robot36;
currentScanLineSamples = robot36.getScanLineSamples();
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/xdsopl/robot36/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void initAudioRecord() {
audioRecord.setRecordPositionUpdateListener(recordListener);
audioRecord.setPositionNotificationPeriod(frameCount);
if (rateChanged) {
decoder = new Decoder(scopeBuffer, imageBuffer, recordRate);
decoder = new Decoder(scopeBuffer, imageBuffer, getString(R.string.raw_mode), recordRate);
decoder.forceMode(forceMode);
}
startListening();
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/xdsopl/robot36/RawDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ public class RawDecoder implements Mode {
private final ExponentialMovingAverage lowPassFilter;
private final int smallPictureMaxSamples;
private final int mediumPictureMaxSamples;
private final String name;

RawDecoder(int sampleRate) {
RawDecoder(String name, int sampleRate) {
this.name = name;
smallPictureMaxSamples = (int) Math.round(0.125 * sampleRate);
mediumPictureMaxSamples = (int) Math.round(0.175 * sampleRate);
lowPassFilter = new ExponentialMovingAverage();
Expand All @@ -23,7 +25,7 @@ private float freqToLevel(float frequency, float offset) {

@Override
public String getName() {
return "Raw Mode";
return name;
}

@Override
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<string name="store_scope">Schirm Speichern</string>
<string name="auto_mode">Automatikmodus</string>
<string name="force_mode">Modus Erzwingen</string>
<string name="raw_mode">Rohmodus</string>
<string name="listening">Aufnahme Läuft</string>
<string name="audio_settings">Audioeinstellungen</string>
<string name="sample_rate">Abtastrate</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<string name="store_scope">Сохранить экран</string>
<string name="auto_mode">Автоматический режим</string>
<string name="force_mode">Принудительный режим</string>
<string name="raw_mode">необработанный режим</string>
<string name="listening">Слушаю</string>
<string name="audio_settings">Настройки аудио</string>
<string name="sample_rate">Частота дискретизации</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<string name="store_scope">保存图像</string>
<string name="auto_mode">自动解码</string>
<string name="force_mode">强制指定解码模式</string>
<string name="raw_mode">原始模式</string>
<string name="listening">监听中</string>
<string name="audio_settings">音频设置</string>
<string name="sample_rate">采样率</string>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<string name="store_scope">Store Scope</string>
<string name="auto_mode">Auto Mode</string>
<string name="force_mode">Force Mode</string>
<string name="robot_modes" translatable="false">Robot Modes</string>
<string name="pd_modes" translatable="false">PD Modes</string>
<string name="martin_modes" translatable="false">Martin Modes</string>
<string name="scottie_modes" translatable="false">Scottie Modes</string>
<string name="wraase_modes" translatable="false">Wraase Modes</string>
<string name="raw_mode" translatable="false">Raw Mode</string>
<string name="robot_modes" translatable="false">Robot</string>
<string name="pd_modes" translatable="false">PD</string>
<string name="martin_modes" translatable="false">Martin</string>
<string name="scottie_modes" translatable="false">Scottie</string>
<string name="wraase_modes" translatable="false">Wraase</string>
<string name="raw_mode">Raw Mode</string>
<string name="robot36_color" translatable="false">Robot 36 Color</string>
<string name="robot72_color" translatable="false">Robot 72 Color</string>
<string name="pd50" translatable="false">PD 50</string>
Expand Down

0 comments on commit 0eec2c5

Please sign in to comment.