Skip to content

Commit

Permalink
ensure floating point math when calculating fps
Browse files Browse the repository at this point in the history
  • Loading branch information
seanodonnell authored and tshirtman committed Oct 31, 2018
1 parent 15d3a9c commit ad7ec53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kivy/core/camera/camera_opencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def init_camera(self):
self.fps = self._device.get(PROPERTY_FPS)

if self.fps == 0 or self.fps == 1:
self.fps = 1 / 30
self.fps = 1.0 / 30
elif self.fps > 1:
self.fps = 1 / self.fps
self.fps = 1.0 / self.fps

if not self.stopped:
self.start()
Expand Down

0 comments on commit ad7ec53

Please sign in to comment.