Skip to content

Commit

Permalink
day switch fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
JBraumueller authored and JBraumueller committed Jul 9, 2013
1 parent 8f187d9 commit df5c86d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/er_pressure_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
sys.path.append('../lib')
from er_MKS_PDR900 import Pressure_Dev

import time,sys
import time

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


if __name__ == "__main__": #if executed as main (and not imported)

time.sleep(1)
interv = 20 #logging interval in seconds

print "Running..."

Expand All @@ -22,9 +23,9 @@
path = "../logs/pressurelog" + str(time.strftime("%d%m%y")) + ".txt"
log_file = open(path,'w') #create log file

while int(time.strftime("%H%M%S",time.localtime(time.time()+65))) < 235959:
while int(time.strftime("%H%M",time.localtime(time.time()+interv+5))) != 0:
log_file.write(str(time.strftime("%H:%M:%S")) + ": LL: " + str(pLL.getPressure()) + " MC: " + str(pMC.getPressure()) + "\n")
time.sleep(10)
time.sleep(interv)

log_file.close()
time.sleep(70)

0 comments on commit df5c86d

Please sign in to comment.