Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed print statements #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Single_Tello_Test/tello.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ def send_command(self, command):
self.log.append(Stats(command, len(self.log)))

self.socket.sendto(command.encode('utf-8'), self.tello_adderss)
print 'sending command: %s to %s' % (command, self.tello_ip)
print ('sending command: %s to %s' % (command, self.tello_ip))

start = time.time()
while not self.log[-1].got_response():
now = time.time()
diff = now - start
if diff > self.MAX_TIME_OUT:
print 'Max timeout exceeded... command %s' % command
print ('Max timeout exceeded... command %s' % command)
# TODO: is timeout considered failure or next command still get executed
# now, next one got executed
return
print 'Done!!! sent command: %s to %s' % (command, self.tello_ip)
print ('Done!!! sent command: %s to %s' % (command, self.tello_ip))

def _receive_thread(self):
"""Listen to responses from the Tello.
Expand All @@ -61,7 +61,7 @@ def _receive_thread(self):

self.log[-1].add_response(self.response)
except socket.error, exc:
print "Caught exception socket.error : %s" % exc
print ("Caught exception socket.error : %s" % exc)

def on_close(self):
pass
Expand Down