From dba8da9898928d9808d57a0b0cdcde9f130ed8fe Mon Sep 17 00:00:00 2001 From: Larry Li Date: Fri, 10 Nov 2023 18:35:17 +0800 Subject: [PATCH] Fix right column & row of the measure window (#588) Co-authored-by: Me No Dev --- sensors/gc0308.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sensors/gc0308.c b/sensors/gc0308.c index 176f012..09d3331 100644 --- a/sensors/gc0308.c +++ b/sensors/gc0308.c @@ -257,8 +257,8 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize) write_reg(sensor->slv_addr, 0xf7, col_s / 4); write_reg(sensor->slv_addr, 0xf8, row_s / 4); - write_reg(sensor->slv_addr, 0xf9, (col_s + h) / 4); - write_reg(sensor->slv_addr, 0xfa, (row_s + w) / 4); + write_reg(sensor->slv_addr, 0xf9, (col_s + w) / 4); + write_reg(sensor->slv_addr, 0xfa, (row_s + h) / 4); write_reg(sensor->slv_addr, 0x05, H8(row_s)); write_reg(sensor->slv_addr, 0x06, L8(row_s));