Beispiel #1
0
 def _decorator(*args, **kwargs):
     if driveboard.connected():
         return func(*args, **kwargs)
     else:
         bottle.abort(400, "No machine.")
Beispiel #2
0
 def _decorator(*args, **kwargs):
         if driveboard.connected():
             return func(*args, **kwargs)
         else:
             bottle.abort(400, "No machine.")
Beispiel #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())
Beispiel #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())