kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
				
				
				
			Merge branch 'testing' into experimental
						commit
						a1cd87330f
					
				| 
						 | 
					@ -207,11 +207,12 @@ def detect_sonde(frequency, rs_path="./", dwell_time=10, sdr_fm='rtl_fm', device
 | 
				
			||||||
        _start = time.time()
 | 
					        _start = time.time()
 | 
				
			||||||
        ret_output = subprocess.check_output(rx_test_command, shell=True, stderr=FNULL)
 | 
					        ret_output = subprocess.check_output(rx_test_command, shell=True, stderr=FNULL)
 | 
				
			||||||
        FNULL.close()
 | 
					        FNULL.close()
 | 
				
			||||||
 | 
					        ret_output = ret_output.decode('utf8')
 | 
				
			||||||
    except subprocess.CalledProcessError as e:
 | 
					    except subprocess.CalledProcessError as e:
 | 
				
			||||||
        # dft_detect returns a code of 1 if no sonde is detected.
 | 
					        # dft_detect returns a code of 1 if no sonde is detected.
 | 
				
			||||||
        # logging.debug("Scanner - dfm_detect return code: %s" % e.returncode)
 | 
					        # logging.debug("Scanner - dfm_detect return code: %s" % e.returncode)
 | 
				
			||||||
        if e.returncode >= 2:
 | 
					        if e.returncode >= 2:
 | 
				
			||||||
            ret_output = e.output
 | 
					            ret_output = e.output.decode('utf8')
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            _runtime = time.time() - _start
 | 
					            _runtime = time.time() - _start
 | 
				
			||||||
            logging.debug("Scanner - dft_detect exited in %.1f seconds." % _runtime)
 | 
					            logging.debug("Scanner - dft_detect exited in %.1f seconds." % _runtime)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -341,6 +341,8 @@ def lsusb():
 | 
				
			||||||
        FNULL = open(os.devnull, 'w')
 | 
					        FNULL = open(os.devnull, 'w')
 | 
				
			||||||
        lsusb_raw_output = subprocess.check_output(['lsusb', '-v'], stderr=FNULL)
 | 
					        lsusb_raw_output = subprocess.check_output(['lsusb', '-v'], stderr=FNULL)
 | 
				
			||||||
        FNULL.close()
 | 
					        FNULL.close()
 | 
				
			||||||
 | 
					        # Convert from bytes.
 | 
				
			||||||
 | 
					        lsusb_raw_output = lsusb_raw_output.decode('utf8')
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        logging.error("lsusb parse error - %s" % str(e))
 | 
					        logging.error("lsusb parse error - %s" % str(e))
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue