diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2020-07-01 08:34:49 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2020-07-01 08:34:49 +0200 |
commit | 152972c399a4a528f0ff226bf301fea31839020c (patch) | |
tree | e6a2dd6d28d5402cf3f286cd6b35eb8b737050f6 /video-ps3eye | |
parent | 95323bc4c733b9fa2da2399e04411d6cd82086c5 (diff) |
video/ps3eye: sleep less for full 75 Hz
Diffstat (limited to 'video-ps3eye')
-rw-r--r-- | video-ps3eye/module.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp index 1d4e43f1..a7078180 100644 --- a/video-ps3eye/module.cpp +++ b/video-ps3eye/module.cpp @@ -169,7 +169,7 @@ bool ps3eye_camera::start(info& args) ptr.in.gain = (uint8_t)s.gain; ptr.in.exposure = (uint8_t)s.exposure; - sleep_ms = (int)std::ceil(1000./std::max(1, (int)ptr.in.framerate)); + sleep_ms = std::clamp(int(std::floor(1000./ptr.in.framerate*2)), 1, 10); wrapper.start(); |