8000 fixed fps value restrictions · arduino-libraries/Arduino_OV767X@977bb70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 977bb70

Browse files
committed
fixed fps value restrictions
1 parent 42ff850 commit 977bb70

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/OV767X.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,8 @@ int OV767X::begin(int resolution, int format, int fps)
110110
return 0;
111111
}
112112

113-
switch (fps) {
114-
case 1:
115-
case 2:
116-
case 3:
117-
case 4:
118-
case 5:
119-
case 10:
120-
case 15:
121-
case 30:
122-
break;
123-
124-
default:
125-
return 0;
126-
}
113+
if (fps < 1 || fps > 30)
114+
return 0;
127115

128116
_ov7670 = ov7670_alloc();
129117
if (!_ov7670) {
@@ -227,7 +215,7 @@ int OV767X::bytesPerPixel() const
227215
//
228216
// 20-19-18-17-16-15-14-13-12-11-10-09-08-07-06-05-04-03-02-01-00 (bit)
229217
// ~ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
230-
// ~ |xx|xx|xx|xx|xx|04|06|05|03|02|00|xx|12|xx|xx|xx|xx|01|10|11|xx| (pin)
218+
// ~ |xx|xx|xx|xx|xx|04|06|05|03|02|01|xx|12|xx|xx|xx|xx|00|10|11|xx| (pin)
231219
// ~ +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
232220
//
233221
// The most efficient way to read 8-bits of data with the arrangement above

0 commit comments

Comments
 (0)
0