Compare commits

...

2 Commits

Author SHA1 Message Date
dchvs e4327010bd Fix dotted image -- with fixed blinking 2021-03-10 18:23:42 -06:00
dchvs abc331988f Fix dotted image -- still have some blinking 2021-03-10 17:59:54 -06:00
2 changed files with 20 additions and 19 deletions

View File

@ -100,11 +100,11 @@ i2c8 = "/i2c@31e0000";
gain_factor = "3";
framerate_factor = "1000000";
exposure_factor = "1000000"; //"1000000";
min_gain_val = "100";
max_gain_val = "762";
exposure_factor = "1000000";
min_gain_val = "102";
max_gain_val = "160";
step_gain_val = "1";
default_gain = "100";
default_gain = "102";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
@ -113,10 +113,10 @@ i2c8 = "/i2c@31e0000";
step_framerate = "1";
default_framerate = "60000000"; // 60.0 fps
min_exp_time = "23000"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1";
default_exp_time = "40000"; // us
min_exp_time = "24000"; // us
max_exp_time = "74000"; // us
step_exp_time = "1";
default_exp_time = "50000"; // us
};
ports {
#address-cells = <0x1>;
@ -188,10 +188,10 @@ i2c8 = "/i2c@31e0000";
gain_factor = "3";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "100";
max_gain_val = "762";
min_gain_val = "102";
max_gain_val = "160" ; //"762";
step_gain_val = "1";
default_gain = "100";
default_gain = "102";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
@ -200,10 +200,10 @@ i2c8 = "/i2c@31e0000";
step_framerate = "1";
default_framerate = "60000000"; // 60.0 fps
min_exp_time = "23000"; // us
max_exp_time = "1000000"; // us
step_exp_time = "1";
default_exp_time = "40000"; // us
min_exp_time = "24000"; // us
max_exp_time = "74000"; // us
step_exp_time = "1";
default_exp_time = "50000"; // us
};
ports {
#address-cells = <0x1>;

View File

@ -439,14 +439,13 @@ static int mt9m021_set_gain(struct tegracam_device *tc_dev, s64 val)
((gain_mul << MT9M021_ANALOG_GAIN_SHIFT) &
MT9M021_ANALOG_GAIN_MASK);
err = mt9m021_write_reg16(s_data, MT9M021_DIGITAL_TEST, reg16);
// msleep(10);
if (err)
goto exit;
/* Update global gain */
err =
mt9m021_write_reg16(s_data, MT9M021_GLOBAL_GAIN, gain);
// msleep(10);
// msleep(10);
if (err)
goto exit;
err =
@ -454,6 +453,8 @@ static int mt9m021_set_gain(struct tegracam_device *tc_dev, s64 val)
if (err)
goto exit;
// usleep_range(1000, 1500);
return 0;
exit:
@ -473,7 +474,7 @@ static int mt9m021_set_frame_length(struct mt9m021 *priv, s64 val)
err = mt9m021_write_reg16(s_data, MT9M021_FRAME_LENGTH_LINES, val);
if (err)
return err;
msleep(30);
msleep(30);
return 0;
}
@ -520,7 +521,7 @@ static int mt9m021_set_coarse_time(struct mt9m021 *priv, s64 val)
err = mt9m021_write_reg16(s_data, MT9M021_COARSE_INT_TIME_CB, val);
if (err)
return err;
// msleep(30);
//msleep(30);
return 0;
}