|
|
|
@ -150,6 +150,7 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
binding.btnUsbCamera.setChecked(jsonObject.optInt("usbCamera", 0) == 1);
|
|
|
|
|
binding.btnAutoExplosure.setChecked(jsonObject.optInt("autoExposure", 1) == 1);
|
|
|
|
|
binding.btnAutoFocus.setChecked(jsonObject.optInt("autoFocus", 1) == 1);
|
|
|
|
|
binding.ldrEnabled.setChecked(jsonObject.optInt("ldrEnabled", 0) == 1);
|
|
|
|
|
// binding.btnHdrMode.setChecked(jsonObject.optInt("hdrMode", 0) == 1);
|
|
|
|
|
// binding.btnNightMode.setChecked(jsonObject.optInt("nightMode", 0) == 1);
|
|
|
|
|
int sceneMode = jsonObject.optInt("sceneMode", 0);
|
|
|
|
@ -162,7 +163,7 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
binding.exposuretime.setText(Integer.toString(jsonObject.optInt("exposureTime", 0)));
|
|
|
|
|
binding.sensitivity.setText(Integer.toString(jsonObject.optInt("sensibility", 0)));
|
|
|
|
|
binding.sensitivity.setText(Integer.toString(jsonObject.optInt("sensitivity", 0)));
|
|
|
|
|
binding.btnZoom.setChecked(jsonObject.optInt("zoom", 0) == 1);
|
|
|
|
|
if (jsonObject.has("compensation")) {
|
|
|
|
|
binding.compensation.setText(Integer.toString(jsonObject.optInt("compensation", 0)));
|
|
|
|
@ -254,6 +255,7 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
jsonObject.put("usbCamera", binding.btnUsbCamera.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("autoExposure", binding.btnAutoExplosure.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("autoFocus", binding.btnAutoFocus.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("ldrEnabled", binding.ldrEnabled.isChecked() ? 1 : 0);
|
|
|
|
|
// jsonObject.put("hdrMode", binding.btnHdrMode.isChecked() ? 1 : 0);
|
|
|
|
|
// jsonObject.put("nightMode", binding.btnNightMode.isChecked() ? 1 : 0);
|
|
|
|
|
int sceneMode = 0;
|
|
|
|
@ -262,7 +264,7 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
sceneMode = Integer.parseInt(sceneModeText);
|
|
|
|
|
jsonObject.put("sceneMode", sceneMode);
|
|
|
|
|
jsonObject.put("exposureTime", Integer.parseInt(binding.exposuretime.getText().toString()));
|
|
|
|
|
jsonObject.put("sensibility", Integer.parseInt(binding.sensitivity.getText().toString()));
|
|
|
|
|
jsonObject.put("sensitivity", Integer.parseInt(binding.sensitivity.getText().toString()));
|
|
|
|
|
jsonObject.put("zoom", binding.btnZoom.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("orientation", binding.orientations.getSelectedItemPosition());
|
|
|
|
|
jsonObject.put("recognization", binding.recognization.getSelectedItemPosition());
|
|
|
|
|