调整配置

hdrplus
Matthew 11 months ago
parent b2d74846bf
commit ac7f16e58f

@ -159,7 +159,6 @@ public class ChannelActivity extends AppCompatActivity {
binding.btnUsbCamera.setChecked(jsonObject.optInt("usbCamera", 0) == 1); binding.btnUsbCamera.setChecked(jsonObject.optInt("usbCamera", 0) == 1);
binding.btnAutoExplosure.setChecked(jsonObject.optInt("autoExposure", 1) == 1); binding.btnAutoExplosure.setChecked(jsonObject.optInt("autoExposure", 1) == 1);
binding.btnAutoFocus.setChecked(jsonObject.optInt("autoFocus", 1) == 1); binding.btnAutoFocus.setChecked(jsonObject.optInt("autoFocus", 1) == 1);
binding.btnWait3ALocked.setChecked(jsonObject.optInt("wait3ALocked", 0) != 0);
binding.ldrEnabled.setChecked(jsonObject.optInt("ldrEnabled", 0) == 1); binding.ldrEnabled.setChecked(jsonObject.optInt("ldrEnabled", 0) == 1);
// binding.btnHdrMode.setChecked(jsonObject.optInt("hdrMode", 0) == 1); // binding.btnHdrMode.setChecked(jsonObject.optInt("hdrMode", 0) == 1);
// binding.btnNightMode.setChecked(jsonObject.optInt("nightMode", 0) == 1); // binding.btnNightMode.setChecked(jsonObject.optInt("nightMode", 0) == 1);
@ -209,6 +208,12 @@ public class ChannelActivity extends AppCompatActivity {
binding.cameraId.setText(""); binding.cameraId.setText("");
} }
if (jsonObject.has("wait3ALocked")) {
binding.btnWait3ALocked.setText(Integer.toString(jsonObject.optInt("wait3ALocked")));
} else {
binding.btnWait3ALocked.setText("");
}
if (jsonObject.has("resolutionCX")) { if (jsonObject.has("resolutionCX")) {
binding.resolutionCX.setText(Integer.toString(jsonObject.optInt("resolutionCX"))); binding.resolutionCX.setText(Integer.toString(jsonObject.optInt("resolutionCX")));
} else { } else {
@ -274,7 +279,7 @@ public class ChannelActivity extends AppCompatActivity {
jsonObject.put("usbCamera", binding.btnUsbCamera.isChecked() ? 1 : 0); jsonObject.put("usbCamera", binding.btnUsbCamera.isChecked() ? 1 : 0);
jsonObject.put("autoExposure", binding.btnAutoExplosure.isChecked() ? 1 : 0); jsonObject.put("autoExposure", binding.btnAutoExplosure.isChecked() ? 1 : 0);
jsonObject.put("autoFocus", binding.btnAutoFocus.isChecked() ? 1 : 0); jsonObject.put("autoFocus", binding.btnAutoFocus.isChecked() ? 1 : 0);
jsonObject.put("wait3ALocked", binding.btnWait3ALocked.isChecked() ? 1 : 0); jsonObject.put("wait3ALocked", Integer.parseInt(binding.btnWait3ALocked.getText().toString()));
jsonObject.put("ldrEnabled", binding.ldrEnabled.isChecked() ? 1 : 0); jsonObject.put("ldrEnabled", binding.ldrEnabled.isChecked() ? 1 : 0);
// jsonObject.put("hdrMode", binding.btnHdrMode.isChecked() ? 1 : 0); // jsonObject.put("hdrMode", binding.btnHdrMode.isChecked() ? 1 : 0);
// jsonObject.put("nightMode", binding.btnNightMode.isChecked() ? 1 : 0); // jsonObject.put("nightMode", binding.btnNightMode.isChecked() ? 1 : 0);

@ -142,16 +142,28 @@
app:layout_constraintStart_toEndOf="@+id/btnAutoExplosure" app:layout_constraintStart_toEndOf="@+id/btnAutoExplosure"
app:layout_constraintTop_toBottomOf="@+id/resolutionCX" /> app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />
<Switch <TextView
android:id="@+id/btnWait3ALocked" android:id="@+id/textViewWait3ALocked"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/channel_cfg_wait_3a_locked"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin_small" android:layout_marginTop="@dimen/activity_vertical_margin_small"
android:text="@string/channel_cfg_wait_3a_locked"
app:layout_constraintStart_toEndOf="@+id/btnAutoFocus" app:layout_constraintStart_toEndOf="@+id/btnAutoFocus"
app:layout_constraintTop_toBottomOf="@+id/resolutionCX" /> app:layout_constraintTop_toBottomOf="@+id/resolutionCX" />
<EditText
android:id="@+id/btnWait3ALocked"
android:layout_width="32dp"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="none|numberDecimal"
android:layout_marginStart="@dimen/activity_horizontal_margin"
app:layout_constraintStart_toEndOf="@+id/textViewWait3ALocked"
app:layout_constraintTop_toTopOf="@+id/textViewWait3ALocked"
app:layout_constraintBottom_toBottomOf="@+id/textViewWait3ALocked" />
<Spinner <Spinner
android:id="@+id/sceneModes" android:id="@+id/sceneModes"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -161,7 +173,8 @@
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
app:layout_constraintStart_toEndOf="@+id/btnWait3ALocked" app:layout_constraintStart_toEndOf="@+id/btnWait3ALocked"
app:layout_constraintTop_toBottomOf="@+id/resolutionCX" /> app:layout_constraintTop_toTopOf="@+id/btnAutoExplosure"
app:layout_constraintBottom_toBottomOf="@+id/btnAutoExplosure" />
<TextView <TextView
android:id="@+id/textViewExplosure" android:id="@+id/textViewExplosure"

Loading…
Cancel
Save