mirror of
https://github.com/PotentiaRobotics/robot-gui.git
synced 2025-04-09 14:20:16 -04:00
if(pi_notfound){don't lag;}
This commit is contained in:
parent
91b6386172
commit
8168ec997b
4
app.py
4
app.py
|
@ -27,6 +27,7 @@ def sendData():
|
|||
s=socket.socket()
|
||||
host="raspberrypi" #This is your Server IP!
|
||||
port=2345
|
||||
s.settimeout(5)
|
||||
s.connect((host,port))
|
||||
s.send(str(rot).encode())
|
||||
rece=s.recv(1024)
|
||||
|
@ -36,6 +37,9 @@ def sendData():
|
|||
return render_template("index.html", conf=rece)
|
||||
except ValueError:
|
||||
return render_template("index.html", conf='Invalid Input "'+rot+'"')
|
||||
except:
|
||||
return render_template("index.html", conf='Timeout: Unable to reach Pi')
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user