diff options
author | Florian Jung <flo@windfisch.org> | 2015-02-18 16:01:00 +0100 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-02-18 16:01:00 +0100 |
commit | 18bd9b2d51f8d8f3e2333f61448b00553aeda6d0 (patch) | |
tree | fbe3decf84ea4bb3a5c87ba72e9dcc182fbc73e8 /server.py | |
parent | b1fc406aa93d6d52a681a46eff00fc592c74dbb0 (diff) |
server/client fixes, manual horizon correction, delay sensor data
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -27,7 +27,8 @@ class ServerThread(threading.Thread): # Wait for a connection print >>sys.stderr, 'waiting for a connection' connection, client_address = sock.accept() - try: + #try: + if True: print >>sys.stderr, 'connection from', client_address while True: @@ -36,7 +37,7 @@ class ServerThread(threading.Thread): if data=="get\n": lock.acquire() framestr = global_frame.tostring() - lenframestr=len(global_framestr) + lenframestr=len(framestr) connection.sendall(struct.pack(">i",lenframestr)+framestr+struct.pack("@dddd", global_phi, global_theta, global_psi, global_batt)); lock.release() elif data[0:3] == "fly" and data[-1]=="\n": @@ -51,9 +52,9 @@ class ServerThread(threading.Thread): else: print >>sys.stderr, 'no more data from', client_address break - except: - print "Dingens!!11!1!!!" - finally: + #except: + # print "Dingens!!11!1!!!" + #finally: # Clean up the connection connection.close() |