4
4
# tinySA_python
5
5
# './examples/plotting_scanraw.py'
6
6
# This is a visual comparison of SCAN and SCANRAW to work out some errors in
7
- # the decode process given that the tinySA is still running during the read ,
8
- # we don't expect SCAN and SCANRAW to be exactly the same, but they
7
+ # the decode process. We don't expect SCAN and SCANRAW to be exactly the same ,
8
+ # because the number of points taken are not the same, but they
9
9
# should be relatively similar values when SCANRAW is decoded
10
10
#
11
- # Last update: June 18 , 2025
11
+ # Last update: July 2 , 2025
12
12
##-------------------------------------------------------------------------------\
13
13
14
14
15
-
16
15
# import tinySA library
17
16
# (NOTE: check library path relative to script path)
18
17
from src .tinySA_python import tinySA
19
18
20
-
21
19
# imports FOR THE EXAMPLE
22
20
import numpy as np
23
21
import matplotlib .pyplot as plt
@@ -62,15 +60,13 @@ def convert_data_to_arrays(start, stop, pts, data):
62
60
63
61
return freq_arr , data_arr
64
62
65
-
66
63
# create a new tinySA object
67
64
tsa = tinySA ()
68
65
69
66
# set the return message preferences
70
67
tsa .set_verbose (True ) #detailed messages
71
68
tsa .set_error_byte_return (True ) #get explicit b'ERROR' if error thrown
72
69
73
-
74
70
# attempt to autoconnect
75
71
found_bool , connected_bool = tsa .autoconnect ()
76
72
@@ -93,7 +89,6 @@ def convert_data_to_arrays(start, stop, pts, data):
93
89
# SCAN RAW
94
90
scanraw_data_bytes = tsa .scan_raw (start , stop , pts , outmask )
95
91
96
-
97
92
# for subsequent reads, the tinySA does freeze while preforming SCANRAW
98
93
# if there's an error, the screen will stay frozen (for reading).
99
94
# So start it again so new data can be taken
@@ -143,4 +138,3 @@ def convert_data_to_arrays(start, stop, pts, data):
143
138
plt .show ()
144
139
else :
145
140
print ("SCANRAW did not return the expected amount of data for the read" )
146
-
0 commit comments