fixed new-years bug in move.py, increased cbtime for barometer

master
agp8x 2014-01-17 14:27:07 +01:00
parent 122ddde5e3
commit cf49c05cc2
2 changed files with 7 additions and 2 deletions

2
all.py
View File

@ -56,7 +56,7 @@ import array
cbtimetemp=30000 cbtimetemp=30000
cbtimehumi=30000 cbtimehumi=30000
cbtimeambi=60000 cbtimeambi=60000
cbtimebaro=30000 cbtimebaro=60000
tempmaxdiff=200 # 200== 2.0 C tempmaxdiff=200 # 200== 2.0 C

View File

@ -8,7 +8,12 @@ checkfile='locks/records_moved'
def prevday(then,now): def prevday(then,now):
#ist "then" gestern (oder noch älter)? #ist "then" gestern (oder noch älter)?
return ((then.tm_yday<now.tm_yday) and (then.tm_year==now.tm_year)) or ((then.tm_yday==366) and (now.tm_yday==1)) greaterDay=(then.tm_yday < now.tm_yday) and (then.tm_year == now.tm_year)
if(greaterDay):
newYear=False
else:
newYear=then.tm_year < now.tm_year
return (greaterDay) or (newYear)
def preptime(): def preptime():
now=time.localtime() now=time.localtime()
day=now.tm_mday day=now.tm_mday