Exemplo n.º 1
0
def main():
   global numOfAcq
   global linenr
   global tsc
   
   tup = []
   tup = Sensor.mock(tsc, linenr)

   if tsc >= 2: tsc -= 1

   Parser.parse(tsc)

   cmd = "cd DATABASE; ./bmi.sh"
   p = subprocess.call(cmd, shell=True)
   
   numOfAcq += 1
   linenr = tup[0]
   tsc = tup[1]
   
   print("DATA HAS BEEN ACQUIRED " + str(numOfAcq) + " TIMES\n")
   if not (linenr == -1): threading.Timer(0, main).start() # threads in seconds
   else: return