|
|
@ -164,6 +164,11 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
binding.exposuretime.setText(Integer.toString(jsonObject.optInt("exposureTime", 0)));
|
|
|
|
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("sensibility", 0)));
|
|
|
|
binding.btnZoom.setChecked(jsonObject.optInt("zoom", 0) == 1);
|
|
|
|
binding.btnZoom.setChecked(jsonObject.optInt("zoom", 0) == 1);
|
|
|
|
|
|
|
|
if (jsonObject.has("compensation")) {
|
|
|
|
|
|
|
|
binding.compensation.setText(Integer.toString(jsonObject.optInt("compensation", 0)));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
binding.compensation.setText("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NumberFormat nf = NumberFormat.getNumberInstance();
|
|
|
|
NumberFormat nf = NumberFormat.getNumberInstance();
|
|
|
|
nf.setMaximumFractionDigits(1);
|
|
|
|
nf.setMaximumFractionDigits(1);
|
|
|
@ -272,6 +277,12 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
jsonObject.put("zoomRatio", 0f);
|
|
|
|
jsonObject.put("zoomRatio", 0f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
String text = binding.compensation.getText().toString();
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(text)) {
|
|
|
|
|
|
|
|
jsonObject.remove("compensation");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
jsonObject.put("compensation", Integer.parseInt(text));
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!TextUtils.isEmpty(binding.resolutionCX.getText().toString())) {
|
|
|
|
if (!TextUtils.isEmpty(binding.resolutionCX.getText().toString())) {
|
|
|
|
jsonObject.put("resolutionCX", Integer.parseInt(binding.resolutionCX.getText().toString()));
|
|
|
|
jsonObject.put("resolutionCX", Integer.parseInt(binding.resolutionCX.getText().toString()));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|