We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb9f3d5 commit 49a6434Copy full SHA for 49a6434
mjpeg2sd.cpp
@@ -144,9 +144,9 @@ static void openAvi() {
144
145
static inline bool doMonitor(bool capturing) {
146
// monitor incoming frames for motion
147
- static uint8_t motionCnt = 0;
+ static uint16_t motionCnt = 0;
148
// ratio for monitoring stop during capture / movement prior to capture
149
- uint8_t checkRate = (capturing) ? FPS * moveStopSecs : FPS / moveStartChecks;
+ uint16_t checkRate = (capturing) ? FPS * moveStopSecs : FPS / moveStartChecks;
150
if (!checkRate) checkRate = 1;
151
if (++motionCnt / checkRate) motionCnt = 0; // time to check for motion
152
return !(bool)motionCnt;
0 commit comments