Fix bug with color error when flipping vertically

This commit is contained in:
sakabin
2018-12-29 10:43:30 +08:00
parent f8f26ab044
commit 0b6c9ab2c0

View File

@@ -414,8 +414,10 @@ static int set_hmirror_sensor(sensor_t *sensor, int enable)
static int set_vflip_sensor(sensor_t *sensor, int enable) static int set_vflip_sensor(sensor_t *sensor, int enable)
{ {
int ret = 0;
sensor->status.vflip = enable; sensor->status.vflip = enable;
return write_reg_bits(sensor, BANK_SENSOR, REG04, REG04_VFLIP_IMG, enable?1:0); ret = write_reg_bits(sensor, BANK_SENSOR, REG04, REG04_VREF_EN, enable?1:0);
return ret & write_reg_bits(sensor, BANK_SENSOR, REG04, REG04_VFLIP_IMG, enable?1:0);
} }
static int set_raw_gma_dsp(sensor_t *sensor, int enable) static int set_raw_gma_dsp(sensor_t *sensor, int enable)