Skip to content

Commit 78d8110

Browse files
committed
Adjustments to surveyor240.py and surveyor240Example.py
1 parent 79672d7 commit 78d8110

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

examples/surveyor240Example.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,6 @@ def signal_handler(sig, frame):
131131
roll = math.atan2(vector[1], vector[2])
132132
print(f"Pitch: {pitch}\tRoll: {roll}")
133133

134-
# if data.message_id == definitions.SURVEYOR240_YZ_POINT_DATA:
135-
# # Display YZ point data in a table
136-
# yz_data = Surveyor240.create_yz_point_data(data)
137-
# print(f"Length of yz_data: {len(yz_data)}\tNum_points: {data.num_points}")
138-
# print("Index\tY\tZ")
139-
# for i in range(0, len(yz_data), 2):
140-
# print(f"{i//2}\t{yz_data[i]:.2f}\t{yz_data[i+1]:.2f}")
141-
# print(f"Temperature: {(data.water_degC * 9/5) + 32} F")
142-
# print(f"Temperature: {data.water_degC} C")
143-
# print(f"Pressure: {data.water_bar} Bar")
144-
145134
# if data.message_id == definitions.SURVEYOR240_ATOF_POINT_DATA:
146135
# # Just an example packet, could check for other packet types and
147136
# # show results from those too
@@ -201,7 +190,6 @@ def signal_handler(sig, frame):
201190
# Set multiple packets to listen for
202191
data = mySurveyor240.wait_message([definitions.SURVEYOR240_ATOF_POINT_DATA,
203192
definitions.SURVEYOR240_ATTITUDE_REPORT,
204-
definitions.SURVEYOR240_YZ_POINT_DATA,
205193
definitions.SURVEYOR240_WATER_STATS])
206194

207195
if data:

generate/templates/surveyor240.py.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,6 @@ class Surveyor240(PingDevice):
388388

389389
return tuple(atof_list)
390390

391-
# Creates yz_point_data and fills it with the correct data from the message
392-
@staticmethod
393-
def create_yz_point_data(msg):
394-
raw_array = msg.yz_point_data
395-
396-
yz_list = struct.unpack('<' + 'f' * int(msg.num_points) * 2, raw_array)
397-
return yz_list
398-
399391
# Calculate the milliseconds per ping from a ping rate
400392
@staticmethod
401393
def calc_msec_per_ping(ping_rate):

0 commit comments

Comments
 (0)