mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-19 15:54:00 +08:00
camerad: write static AE settings only once (#28134)
* this is free * illusion of choice
This commit is contained in:
@@ -1179,19 +1179,14 @@ void CameraState::set_camera_exposure(float grey_frac) {
|
||||
uint32_t vs_time = std::min(std::max((uint32_t)exposure_time / 40, VS_TIME_MIN_OX03C10), VS_TIME_MAX_OX03C10);
|
||||
|
||||
uint32_t real_gain = ox03c10_analog_gains_reg[new_exp_g];
|
||||
uint32_t min_gain = ox03c10_analog_gains_reg[0];
|
||||
uint32_t spd_gain = 0xF00;
|
||||
|
||||
struct i2c_random_wr_payload exp_reg_array[] = {
|
||||
{0x3501, hcg_time>>8}, {0x3502, hcg_time&0xFF},
|
||||
{0x3581, lcg_time>>8}, {0x3582, lcg_time&0xFF},
|
||||
{0x3541, spd_time>>8}, {0x3542, spd_time&0xFF},
|
||||
{0x35c1, vs_time>>8}, {0x35c2, vs_time&0xFF},
|
||||
{0x35c2, vs_time&0xFF},
|
||||
|
||||
{0x3508, real_gain>>8}, {0x3509, real_gain&0xFF},
|
||||
{0x3588, min_gain>>8}, {0x3589, min_gain&0xFF},
|
||||
{0x3548, spd_gain>>8}, {0x3549, spd_gain&0xFF},
|
||||
{0x35c8, min_gain>>8}, {0x35c9, min_gain&0xFF},
|
||||
};
|
||||
sensors_i2c(exp_reg_array, sizeof(exp_reg_array)/sizeof(struct i2c_random_wr_payload), CAM_SENSOR_PACKET_OPCODE_SENSOR_CONFIG, false);
|
||||
}
|
||||
|
||||
@@ -752,6 +752,12 @@ struct i2c_random_wr_payload init_array_ox03c10[] = {
|
||||
{0x5486, 0x08}, {0x5487, 0xDE},
|
||||
{0x5686, 0x08}, {0x5687, 0xDE},
|
||||
{0x5886, 0x08}, {0x5887, 0xDE},
|
||||
|
||||
// fixed gains
|
||||
{0x3588, 0x01}, {0x3589, 0x00},
|
||||
{0x35c8, 0x01}, {0x35c9, 0x00},
|
||||
{0x3548, 0x0F}, {0x3549, 0x00},
|
||||
{0x35c1, 0x00},
|
||||
};
|
||||
|
||||
struct i2c_random_wr_payload init_array_ar0231[] = {
|
||||
|
||||
Reference in New Issue
Block a user