needs to be static

pull/32112/head
Comma Device 1 year ago
parent f477aee7dd
commit a59fd77703
  1. 7
      system/camerad/sensors/os04c10.cc
  2. 8
      system/camerad/sensors/os04c10_registers.h

@ -23,7 +23,7 @@ OS04C10::OS04C10() {
data_word = false;
frame_width = 2688;
frame_height = 1520 * 2 + 40; // stagger separated by 40 rows
frame_height = 1520 * 2 + 24; // stagger separated by 24 rows
frame_stride = (frame_width * 10 / 8); // no alignment
extra_height = 0;
@ -42,7 +42,7 @@ OS04C10::OS04C10() {
dc_gain_max_weight = 1;
dc_gain_on_grey = 0.9;
dc_gain_off_grey = 1.0;
exposure_time_min = 480;
exposure_time_min = 128;
exposure_time_max = 2400;
analog_gain_min_idx = 0x0;
analog_gain_rec_idx = 0x0; // 1x
@ -62,11 +62,8 @@ std::vector<i2c_random_wr_payload> OS04C10::getExposureRegisters(int exposure_ti
uint32_t long_time = exposure_time;
uint32_t real_gain = os04c10_analog_gains_reg[new_exp_g];
uint32_t short_time = long_time / 240;
return {
{0x3501, long_time>>8}, {0x3502, long_time&0xFF},
{0x3511, short_time>>8}, {0x3512, short_time&0xFF},
{0x3508, real_gain>>8}, {0x3509, real_gain&0xFF},
{0x350c, real_gain>>8}, {0x350d, real_gain&0xFF},
};

@ -291,20 +291,20 @@ const struct i2c_random_wr_payload init_array_os04c10[] = {
{0x4c05, 0x00},
{0x5000, 0xf9},
// {0x0100, 0x01},
{0x320d, 0x00},
{0x3208, 0xa0},
// {0x320d, 0x00},
// {0x3208, 0xa0},
// {0x3822, 0x14},
// initialize exposure
{0x3503, 0x88},
// long
{0x3500, 0x00}, {0x3501, 0x00}, {0x3502, 0x10},
{0x3500, 0x00}, {0x3501, 0x00}, {0x3502, 0x20},
{0x3508, 0x00}, {0x3509, 0x80},
{0x350a, 0x04}, {0x350b, 0x00},
// short
{0x3510, 0x00}, {0x3511, 0x00}, {0x3512, 0x10},
{0x3510, 0x00}, {0x3511, 0x00}, {0x3512, 0x08},
{0x350c, 0x00}, {0x350d, 0x80},
{0x350e, 0x04}, {0x350f, 0x00},

Loading…
Cancel
Save