Skip to content

Commit

Permalink
sensor: set correct page for superpix detection (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Dec 17, 2023
1 parent cc16f22 commit 0f89267
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@ static int detect_superpix_sensor(sensor_ctx_t *ctx, int fd,
if (i2c_change_addr(fd, i2c_addr) < 0)
return false;

// Set page 0
int page = i2c_read_register(fd, i2c_addr, 0xFD, 1, 1);
if (page > 0)
i2c_write_register(fd, i2c_addr, 0xFD, 1, 0x00, 2);

int prod_msb = i2c_read_register(fd, i2c_addr, 0x02, 1, 1);
if (prod_msb == -1)
return false;
Expand Down

0 comments on commit 0f89267

Please sign in to comment.