|
|
|
@ -69,8 +69,25 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
saveChannelParams(channel);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
binding.btnNightMode.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
if (binding.btnNightMode.isChecked() && binding.btnHdrMode.isChecked()) {
|
|
|
|
|
binding.btnHdrMode.setChecked(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
binding.btnHdrMode.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
if (binding.btnHdrMode.isChecked() && binding.btnNightMode.isChecked()) {
|
|
|
|
|
binding.btnNightMode.setChecked(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private View.OnFocusChangeListener onFocusChangeListener = new View.OnFocusChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
@ -129,7 +146,8 @@ 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.btnHdrMode.setChecked(jsonObject.optInt("hdr", 1) == 1);
|
|
|
|
|
binding.btnHdrMode.setChecked(jsonObject.optInt("hdr", 0) == 1);
|
|
|
|
|
binding.btnNightMode.setChecked(jsonObject.optInt("nightMode", 0) == 1);
|
|
|
|
|
binding.exposuretime.setText(Integer.toString(jsonObject.optInt("exposureTime", 0)));
|
|
|
|
|
binding.sensitivity.setText(Integer.toString(jsonObject.optInt("sensibility", 0)));
|
|
|
|
|
binding.orientations.setSelection(jsonObject.optInt("orientation", 0));
|
|
|
|
@ -191,6 +209,7 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
|
jsonObject.put("autoExposure", binding.btnAutoExplosure.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("autoFocus", binding.btnAutoFocus.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("hdrMode", binding.btnHdrMode.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("nightMode", binding.btnNightMode.isChecked() ? 1 : 0);
|
|
|
|
|
jsonObject.put("exposureTime", Integer.parseInt(binding.exposuretime.getText().toString()));
|
|
|
|
|
jsonObject.put("sensibility", Integer.parseInt(binding.sensitivity.getText().toString()));
|
|
|
|
|
jsonObject.put("orientation", binding.orientations.getSelectedItemPosition());
|
|
|
|
|