Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/eloquent_esp32cam/motion/detection.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace Eloquent {
/**
*
*/
Exception& run() {
Exception& run(float& ratio ) {
// skip fre first frames
if (_skip > 0 && _skip-- > 0)
return exception.set(String("Still ") + _skip + " frames to skip...");
Expand Down Expand Up @@ -131,7 +131,7 @@ namespace Eloquent {
movingRatio = ((float) movingPoints) / camera.rgb565.length * _stride * _stride;
copy(camera.rgb565);
});

ratio = movingRatio;
ESP_LOGD("MotionDetection", "moving points ratio: %.2f", movingRatio);

// rate limit
Expand All @@ -143,7 +143,10 @@ namespace Eloquent {

return exception.clear();
}

Exception& run() {
float dummy;
return run(dummy);
}
/**
* @brief Convert to JSON
*/
Expand Down