sensors/gc2145: Fix hmirror and vflip.

This commit is contained in:
Kwabena W. Agyeman 2024-02-26 11:45:42 -08:00
parent fcf0d8f15a
commit 83e12de2b0

View File

@ -893,6 +893,9 @@ static int set_framesize(sensor_t *sensor, framesize_t framesize) {
static int set_hmirror(sensor_t *sensor, int enable) {
int ret = 0;
uint8_t reg;
#if (OMV_GC2145_ROTATE == 1)
enable = !enable;
#endif
// P0 regs
ret |= omv_i2c_writeb(&sensor->i2c_bus, sensor->slv_addr, 0xFE, 0x00);
@ -904,6 +907,9 @@ static int set_hmirror(sensor_t *sensor, int enable) {
static int set_vflip(sensor_t *sensor, int enable) {
int ret = 0;
uint8_t reg;
#if (OMV_GC2145_ROTATE == 1)
enable = !enable;
#endif
// P0 regs
ret |= omv_i2c_writeb(&sensor->i2c_bus, sensor->slv_addr, 0xFE, 0x00);