auto: Use helper function to set value.
This commit is contained in:
@@ -374,6 +374,14 @@ clamp_control(controlstate *control)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_control(controlstate *control)
|
||||
{
|
||||
clamp_control(control);
|
||||
mp_io_pipeline_set_control_int32(control, control->value_req);
|
||||
control->value = control->value_req;
|
||||
}
|
||||
|
||||
static int focus;
|
||||
static int focus_phase;
|
||||
|
||||
@@ -553,18 +561,9 @@ process_aaa()
|
||||
}
|
||||
}
|
||||
|
||||
clamp_control(&state_proc.gain);
|
||||
clamp_control(&state_proc.dgain);
|
||||
clamp_control(&state_proc.exposure);
|
||||
mp_io_pipeline_set_control_int32(&state_proc.gain.control,
|
||||
state_proc.gain.value_req);
|
||||
mp_io_pipeline_set_control_int32(&state_proc.dgain.control,
|
||||
state_proc.dgain.value_req);
|
||||
mp_io_pipeline_set_control_int32(&state_proc.exposure.control,
|
||||
state_proc.exposure.value_req);
|
||||
state_proc.gain.value = state_proc.gain.value_req;
|
||||
state_proc.dgain.value = state_proc.dgain.value_req;
|
||||
state_proc.exposure.value = state_proc.exposure.value_req;
|
||||
update_control(&state_proc.gain);
|
||||
update_control(&state_proc.dgain);
|
||||
update_control(&state_proc.exposure);
|
||||
}
|
||||
|
||||
if (auto_balance) {
|
||||
|
Reference in New Issue
Block a user