|
|
@ -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);
|
|
|
|