@@ -763,26 +763,26 @@ int GC2145::setFrameRate(int32_t framerate)
763
763
return 0 ;
764
764
}
765
765
766
- int GC2145::setVerticalFlip (bool flip_mode )
766
+ int GC2145::setVerticalFlip (bool flip_enable )
767
767
{
768
768
// The GC2145 doesn't return this value when reading the Analog mode 1 register
769
769
// so we have to save it for setHorizontalMirror()
770
- vertical_flip_state = flip_mode ;
770
+ vertical_flip_state = flip_enable ;
771
771
// Using the Analog mode 1 register (0x17)
772
772
uint8_t old_value = regRead (GC2145_I2C_ADDR, 0x17 );
773
- int retVal = regWrite (GC2145_I2C_ADDR, 0x17 , (old_value & 0b11111100 ) | (flip_mode << 1 ) | horizontal_mirror_state);
773
+ int retVal = regWrite (GC2145_I2C_ADDR, 0x17 , (old_value & 0b11111100 ) | (flip_enable << 1 ) | horizontal_mirror_state);
774
774
// Notice that the error codes from regWrite() are positive ones passed on from Wire, not -1
775
775
return ((0 == retVal) ? 0 : -1 );
776
776
}
777
777
778
- int GC2145::setHorizontalMirror (bool mirror_mode )
778
+ int GC2145::setHorizontalMirror (bool mirror_enable )
779
779
{
780
780
// The GC2145 doesn't return this value when reading the Analog mode 1 register
781
781
// so we have to save it for setVerticalFlip()
782
- horizontal_mirror_state = mirror_mode ;
782
+ horizontal_mirror_state = mirror_enable ;
783
783
// Using the Analog mode 1 register (0x17)
784
784
uint8_t old_value = regRead (GC2145_I2C_ADDR, 0x17 );
785
- int retVal = regWrite (GC2145_I2C_ADDR, 0x17 , (old_value & 0b11111100 ) | mirror_mode | (vertical_flip_state << 1 ));
785
+ int retVal = regWrite (GC2145_I2C_ADDR, 0x17 , (old_value & 0b11111100 ) | mirror_enable | (vertical_flip_state << 1 ));
786
786
// Notice that the error codes from regWrite() are positive ones passed on from Wire, not -1
787
787
return ((0 == retVal) ? 0 : -1 );
788
788
}
0 commit comments