Skip to content

Commit

Permalink
Better threshold values.
Browse files Browse the repository at this point in the history
  • Loading branch information
helioloureiro committed Sep 1, 2016
1 parent f5da374 commit 76e627f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weather-twitter.py
Expand Up @@ -45,7 +45,7 @@
DISCARDFRAMES = 10
LOCKDIR = "/tmp"
LOCKPREFIX = ".weather"
FAILCOUNTER = 8 # amount ot attempts to get a picture
FAILCOUNTER = 10 # amount ot attempts to get a picture
WARMUP = 10 # try to start webcam
THRESHOLD=15 # quality threshold
DEBUG = True
Expand Down Expand Up @@ -266,7 +266,7 @@ def GetPhoto(f = None, quality = None):
debug(cameractl)
os.system(cameractl)
FAILCOUNTER -= 1
if FAILCOUNTER < 1:
if FAILCOUNTER <= 4:
if (resp <= THRESHOLD):
debug("Not best quality, but acceptable")
return 0
Expand Down

0 comments on commit 76e627f

Please sign in to comment.