Skip to content

Commit fe36196

Browse files
BradG13531patrickelectric
authored andcommitted
Small changes to print statements
1 parent a8471a9 commit fe36196

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

examples/omniscan450Example.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def signal_handler(sig, frame):
5555
# Logging to default directory
5656
default_dir.mkdir(parents=True, exist_ok=True)
5757
myOmniscan450 = Omniscan450(logging=True, log_directory=default_dir)
58-
print(f"Logging to new file in: {default_dir}")
5958
new_log = True
6059
elif isinstance(args.log, str):
6160
log_path = Path(args.log).expanduser()
@@ -78,7 +77,6 @@ def signal_handler(sig, frame):
7877
elif log_path.is_dir() or log_path.suffix == "":
7978
# Path is directory, logging to that directory
8079
myOmniscan450 = Omniscan450(logging=True, log_directory=log_path)
81-
print(f"Logging to new file: {myOmniscan450.current_log}")
8280
new_log = True
8381

8482
else:
@@ -119,15 +117,12 @@ def signal_handler(sig, frame):
119117
if data == None:
120118
break # EOF or bad packet
121119

120+
print(f"ID: {data.message_id}\tName: {data.name}")
122121
if data.message_id == definitions.OMNISCAN450_OS_MONO_PROFILE:
123-
# print(data)
122+
# # print(data)
124123

125124
# Printing the same results as if directly connected to the Omniscan
126125
scaled_result = Omniscan450.scale_power(data)
127-
# for i in range(len(scaled_result)):
128-
# print(f"{i+1}: Raw: {data.pwr_results[i]}\tScaled: {scaled_result[i]}dB")
129-
# print(f"Min power: {data.min_pwr_db} dB")
130-
# print(f"Max power: {data.max_pwr_db} dB")
131126
print(f"Average power: {sum(scaled_result) / len(scaled_result)}")
132127

133128
# Connected to physical omniscan

examples/surveyor240Example.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def signal_handler(sig, frame):
5757
# Logging to default directory
5858
default_dir.mkdir(parents=True, exist_ok=True)
5959
mySurveyor240 = Surveyor240(logging=True, log_directory=default_dir)
60-
print(f"Logging to new file in: {default_dir}")
6160
new_log = True
6261
elif isinstance(args.log, str):
6362
log_path = Path(args.log).expanduser()
@@ -80,7 +79,6 @@ def signal_handler(sig, frame):
8079
elif log_path.is_dir() or log_path.suffix == "":
8180
# Path is directory, logging to that directory
8281
mySurveyor240 = Surveyor240(logging=True, log_directory=log_path)
83-
print(f"Logging to new file: {Surveyor240.current_log}")
8482
new_log = True
8583

8684
else:

generate/templates/omniscan450.py.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ class Omniscan450(PingDevice):
261261
self.current_log = log_path
262262
self.bytes_written = 0
263263

264+
print(f"Logging to {self.current_log}")
265+
264266
self.write_data(self.build_metadata_packet())
265267

266268
# Write data to .svlog file

0 commit comments

Comments
 (0)