camera_qcom2: target 40ms acquisition time, use register wizard (#24093)

* register values from wizard

* target 25fps to leave some room for timing jitter

* update max lines in ui
pull/24137/head
Willem Melching 3 years ago committed by GitHub
parent f0ac80806e
commit 67d6847039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/camerad/cameras/camera_qcom2.cc
  2. 20
      selfdrive/camerad/cameras/sensor2_i2c.h
  3. 2
      selfdrive/ui/ui.cc

@ -64,7 +64,7 @@ const int ANALOG_GAIN_REC_IDX = 0x6; // 0.8x
const int ANALOG_GAIN_MAX_IDX = 0xD; // 4.0x
const int EXPOSURE_TIME_MIN = 2; // with HDR, fastest ss
const int EXPOSURE_TIME_MAX = 1904; // with HDR, slowest ss
const int EXPOSURE_TIME_MAX = 1618; // with HDR, slowest ss, 40ms
// ************** low level camera helpers ****************
int do_cam_control(int fd, int op_code, void *handle, int size) {

@ -65,8 +65,8 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
{0x3032, 0x0000}, // SCALING_MODE
{0x30A2, 0x0001}, // X_ODD_INC_
{0x30A6, 0x0001}, // Y_ODD_INC_
{0x3402, 0x0F10}, // X_OUTPUT_CONTROL
{0x3404, 0x0970}, // Y_OUTPUT_CONTROL
{0x3402, 0x0788}, // X_OUTPUT_CONTROL
{0x3404, 0x04B8}, // Y_OUTPUT_CONTROL
{0x3064, 0x1802}, // SMIA_TEST
{0x30BA, 0x11F2}, // DIGITAL_CTRL
@ -77,7 +77,7 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
// Readout timing
{0x300C, 0x07B9}, // LINE_LENGTH_PCK
{0x300A, 0x07E7}, // FRAME_LENGTH_LINES
{0x300A, 0x0652}, // FRAME_LENGTH_LINES
{0x3042, 0x0000}, // EXTRA_DELAY
// Readout Settings
@ -107,9 +107,17 @@ struct i2c_random_wr_payload init_array_ar0231[] = {
// HDR Settings
{0x3082, 0x0004}, // OPERATION_MODE_CTRL
{0x3238, 0x0004}, // EXPOSURE_RATIO
{0x3014, 0x098E}, // FINE_INTEGRATION_TIME_
{0x321E, 0x098E}, // FINE_INTEGRATION_TIME2
{0x3238, 0x0444}, // EXPOSURE_RATIO
{0x1008, 0x0361}, // FINE_INTEGRATION_TIME_MIN
{0x100C, 0x0589}, // FINE_INTEGRATION_TIME2_MIN
{0x100E, 0x07B1}, // FINE_INTEGRATION_TIME3_MIN
{0x1010, 0x0139}, // FINE_INTEGRATION_TIME4_MIN
{0x3014, 0x08CB}, // FINE_INTEGRATION_TIME_
{0x321E, 0x08CB}, // FINE_INTEGRATION_TIME2
{0x321E, 0x08CB}, // FINE_INTEGRATION_TIME3
{0x321E, 0x0894}, // FINE_INTEGRATION_TIME4
{0x31D0, 0x0000}, // COMPANDING, no good in 10 bit?
{0x33DA, 0x0000}, // COMPANDING
{0x318E, 0x0200}, // PRE_HDR_GAIN_EN

@ -179,7 +179,7 @@ static void update_state(UIState *s) {
} else if (Hardware::TICI() && sm.updated("wideRoadCameraState")) {
auto camera_state = sm["wideRoadCameraState"].getWideRoadCameraState();
float max_lines = 1904;
float max_lines = 1618;
float max_gain = 10.0;
float max_ev = max_lines * max_gain / 6;

Loading…
Cancel
Save