Skip to content

Commit

Permalink
Final push for first release
Browse files Browse the repository at this point in the history
  • Loading branch information
amymcgovern committed Nov 27, 2017
1 parent 2f6a1b6 commit f587aaf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Mambo.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def fly_direct(self, roll, pitch, yaw, vertical_movement, duration):
my_yaw = self._ensure_fly_command_in_range(yaw)
my_vertical = self._ensure_fly_command_in_range(vertical_movement)

print("roll is %d pitch is %d yaw is %d vertical is %d" % (my_roll, my_pitch, my_yaw, my_vertical))
#print("roll is %d pitch is %d yaw is %d vertical is %d" % (my_roll, my_pitch, my_yaw, my_vertical))
command_tuple = self.command_parser.get_command_tuple("minidrone", "Piloting", "PCMD")

self.drone_connection.send_pcmd_command(command_tuple, my_roll, my_pitch, my_yaw, my_vertical, duration)
Expand Down
7 changes: 3 additions & 4 deletions commandsandsensors/DroneCommandParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ def get_command_tuple_with_enum(self, project, myclass, cmd, enum_name):
:param cmd: command to execute (from XML file)
:return:
"""
print("get command tuple with enum")
# only search if it isn't already in the cache
if (myclass, cmd, enum_name) in self.command_tuple_cache:
print("using the cache")
print(self.command_tuple_cache[(myclass, cmd, enum_name)])
#print("using the cache")
#print(self.command_tuple_cache[(myclass, cmd, enum_name)])
return self.command_tuple_cache[(myclass, cmd, enum_name)]

# pick the right command file to draw from
Expand Down Expand Up @@ -105,6 +104,6 @@ def get_command_tuple_with_enum(self, project, myclass, cmd, enum_name):
# cache the result
self.command_tuple_cache[(myclass, cmd, enum_name)] = ((project_id, class_id, cmd_id), enum_id)

print ((project_id, class_id, cmd_id), enum_id)
#print ((project_id, class_id, cmd_id), enum_id)
return ((project_id, class_id, cmd_id), enum_id)

2 changes: 1 addition & 1 deletion commandsandsensors/DroneSensorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def extract_sensor_values(self, data):
return (name, sensor_data, self.sensor_tuple_cache, header_tuple)
else:
color_print("Error parsing sensor information!", "ERROR")
print(header_tuple)
#print(header_tuple)
return (None, None, None, None)


Expand Down
2 changes: 1 addition & 1 deletion examples/demoMamboDirectFlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
mambo.fly_direct(roll=0, pitch=0, yaw=0, vertical_movement=50, duration=1)

print("Flying direct: going around in a circle (yes you can mix roll, pitch, yaw in one command!)")
mambo.fly_direct(roll=25, pitch=0, yaw=50, vertical_movement=0, duration=5)
mambo.fly_direct(roll=25, pitch=0, yaw=50, vertical_movement=0, duration=3)

print("landing")
mambo.safe_land(5)
Expand Down
8 changes: 2 additions & 6 deletions networking/wifiConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,7 @@ def _listen_socket(self):

self.handle_data(data)

print("difference in time is")
print(lasttime)
print(time.time())
color_print("Listening thread broke out of the listener - figure out why!", "ERROR")
print("disconnecting")
color_print("disconnecting", "INFO")
self.disconnect()

def handle_data(self, data):
Expand Down Expand Up @@ -217,7 +213,7 @@ def handle_frame(self, packet_type, buffer_id, packet_seq_id, recv_data):
self._send_pong(recv_data)

if (self.data_types_by_number[packet_type] == 'ACK'):
print("setting command received to true")
#print("setting command received to true")
ack_seq = int(struct.unpack("<B", recv_data)[0])
self._set_command_received('SEND_WITH_ACK', True, ack_seq)
self.ack_packet(buffer_id, ack_seq)
Expand Down

0 comments on commit f587aaf

Please sign in to comment.