auto: display values in known units
This commit is contained in:
@@ -489,6 +489,31 @@ update_exp(controlstate *control, int direction)
|
||||
control->value_req = control->value + (step * direction);
|
||||
}
|
||||
|
||||
static void
|
||||
summarize()
|
||||
{
|
||||
double time, gain;
|
||||
|
||||
/* FIXME: may be approximate -- width/height should include blank areas */
|
||||
double PCK = state_proc.mode->width * state_proc.mode->height * 30;
|
||||
double per_line = state_proc.mode->width / PCK;
|
||||
time = state_proc.exposure.value * per_line;
|
||||
|
||||
//Then the exposure time = (exposure line) * (time per line ).
|
||||
|
||||
/* Frame time in seconds */
|
||||
//time = state_proc.exposure.value * state_proc.mode->height;
|
||||
|
||||
/* */
|
||||
gain = state_proc.gain.value / 32.; /* FIXME: .min */
|
||||
if (0) /* dgain */
|
||||
gain *= state_proc.dgain.value / 256.;
|
||||
|
||||
printf("1/%.0f sec, ISO %.0f, t=%f, g=%f %d %d\n",
|
||||
(float) (1.0/time), (float) (gain*100),
|
||||
(float) time, (float) gain, state_proc.gain.value, state_proc.dgain.value);
|
||||
}
|
||||
|
||||
static void
|
||||
process_aaa()
|
||||
{
|
||||
@@ -562,6 +587,7 @@ process_aaa()
|
||||
update_control(&state_proc.gain);
|
||||
update_control(&state_proc.dgain);
|
||||
update_control(&state_proc.exposure);
|
||||
summarize();
|
||||
}
|
||||
|
||||
if (auto_balance) {
|
||||
|
Reference in New Issue
Block a user