mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-30 18:27:53 +00:00 
			
		
		
		
	Add points argument to control x-axis time scale.
This commit is contained in:
		| @@ -29,11 +29,12 @@ if __name__ == '__main__': | |||||||
|         except: |         except: | ||||||
|             print("Warning: failed to XInitThreads()") |             print("Warning: failed to XInitThreads()") | ||||||
|  |  | ||||||
|     unixOptions = "f:s:" |     unixOptions = "f:s:p:" | ||||||
|     gnuOptions = [ "freq=", "serno=" ] |     gnuOptions = [ "freq=", "serno=", "points=" ] | ||||||
|     parser = argparse.ArgumentParser(description='pulse watcher') |     parser = argparse.ArgumentParser(description='pulse watcher') | ||||||
|     parser.add_argument("--serno", type=str, help="hackrf serial number") |     parser.add_argument("--serno", type=str, help="hackrf serial number") | ||||||
|     parser.add_argument("--freq", type=int, help="center frequency") |     parser.add_argument("--freq", type=int, help="center frequency in Hz") | ||||||
|  |     parser.add_argument("--points", type=int, help="number of x-axis points") | ||||||
|     args = parser.parse_args() |     args = parser.parse_args() | ||||||
|     hackrf_sn = args.serno |     hackrf_sn = args.serno | ||||||
|     center_freq = args.freq |     center_freq = args.freq | ||||||
| @@ -56,8 +57,8 @@ from gnuradio import qtgui | |||||||
|  |  | ||||||
| class pulse_detect(gr.top_block, Qt.QWidget): | class pulse_detect(gr.top_block, Qt.QWidget): | ||||||
|  |  | ||||||
|     # divide sample rate by point to get time scale in millisec |     # divide sample rate by points to get time scale in millisec | ||||||
|     gnuradio_points = 100000 |     gnuradio_points = args.points | ||||||
|  |  | ||||||
|     def __init__(self): |     def __init__(self): | ||||||
|         gr.top_block.__init__(self, "Pulse Detect") |         gr.top_block.__init__(self, "Pulse Detect") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Isaac Konikoff
					Isaac Konikoff