Exemplo n.º 1
0
 def _decorator(*args, **kwargs):
     if driveboard.connected():
         return func(*args, **kwargs)
     else:
         bottle.abort(400, "No machine.")
Exemplo n.º 2
0
 def _decorator(*args, **kwargs):
         if driveboard.connected():
             return func(*args, **kwargs)
         else:
             bottle.abort(400, "No machine.")
Exemplo n.º 3
0
def status():
    global time_status_last
    if not driveboard.connected() and (time.time() - time_status_last) > 6.0:
        driveboard.connect_withfind(verbose=False)
    time_status_last = time.time()
    return json.dumps(driveboard.status())
Exemplo n.º 4
0
def status():
    global time_status_last
    if not driveboard.connected() and (time.time()-time_status_last) > 6.0:
        driveboard.connect_withfind(verbose=False)
    time_status_last = time.time()
    return json.dumps(driveboard.status())