Send update to server

This commit is contained in:
Ruben 2018-01-04 21:07:50 +01:00
parent 6fff9aca18
commit 61f76caa37

View file

@ -9,6 +9,7 @@ import time
import os
from si_prefix import si_format
import Adafruit_CharLCD as LCD
import urllib2
# Set FPS (though RPi is probably to slow to meet it ;-)
FPS = 1.0
@ -98,6 +99,8 @@ while True:
log.write("{},{},{}".format(time.time(), len(faces), int(totalUse)))
log.flush()
content = urllib2.urlopen("https://artstats.rubenvandeven.com/artwork1/views.php?time=%d&count=%d&total=%d" % (int(time.time()), len(faces), int(totalUse)) ).read()
os.fsync(log.fileno())
if len(faces) < 1 and end - lastFaceTime > dimTimeDelta: