Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5af0bd7

Browse files
authored
Merge pull request#827 from sebromero/sebromero/ov-flip-mirror
Implement vflip and mirror for OV cameras
2 parentsf2af60a +43c0573 commit5af0bd7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎libraries/OV7670/ov7670.cpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,16 @@ int OV7670::setFrameRate(int32_t framerate)
699699

700700
intOV7670::setVerticalFlip(bool flip_enable)
701701
{
702-
return -1;
702+
uint8_t currentRegisterValue =regRead(getID(), MVFP);
703+
uint8_t newRegisterValue = flip_enable ? currentRegisterValue | MVFP_VFLIP : currentRegisterValue & ~MVFP_VFLIP;
704+
returnregWrite(getID(), MVFP, newRegisterValue);
703705
}
704706

705707
intOV7670::setHorizontalMirror(bool mirror_enable)
706708
{
707-
return -1;
709+
uint8_t currentRegisterValue =regRead(getID(), MVFP);
710+
uint8_t newRegisterValue = mirror_enable ? currentRegisterValue | MVFP_MIRROR : currentRegisterValue & ~MVFP_MIRROR;
711+
returnregWrite(getID(), MVFP, newRegisterValue);
708712
}
709713

710714
intOV7670::setResolution(int32_t resolution)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp