more refinements as per Jakob Ketterl suggestions
This commit is contained in:
		@@ -158,9 +158,9 @@ class FeatureDetector(object):
 | 
				
			|||||||
        ```
 | 
					        ```
 | 
				
			||||||
         sudo apt install libusb-1.0-0-dev
 | 
					         sudo apt install libusb-1.0-0-dev
 | 
				
			||||||
         cd /tmp
 | 
					         cd /tmp
 | 
				
			||||||
         wget https://github.com/Microtelecom/libperseus-sdr/releases/download/v0.7.5/libperseus_sdr-0.7.5.tar.gz
 | 
					         wget https://github.com/Microtelecom/libperseus-sdr/releases/download/v0.8.2/libperseus_sdr-0.8.2.tar.gz
 | 
				
			||||||
         tar -zxvf libperseus_sdr-0.7.5.tar.gz
 | 
					         tar -zxvf libperseus_sdr-0.8.2.tar.gz
 | 
				
			||||||
         cd libperseus_sdr-0.7.5/
 | 
					         cd libperseus_sdr-0.8.2/
 | 
				
			||||||
         ./configure
 | 
					         ./configure
 | 
				
			||||||
         make
 | 
					         make
 | 
				
			||||||
         sudo make install
 | 
					         sudo make install
 | 
				
			||||||
@@ -168,7 +168,7 @@ class FeatureDetector(object):
 | 
				
			|||||||
         perseustest
 | 
					         perseustest
 | 
				
			||||||
        ```
 | 
					        ```
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        return self.command_is_runnable("perseustest -d -1 -a -t 1")
 | 
					        return self.command_is_runnable("perseustest -h")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def has_digiham(self):
 | 
					    def has_digiham(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,29 +3,37 @@ from owrx.command import Flag, Option
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# perseustest -s 768000 -u 0 -f 14150000 -r-|csdr convert_s8_f|nmux --bufsize 192512 --bufcnt 260 --port 35989 --address 127.0.0.1
 | 
					# In order to interface Perseus hardware, we resolve to use the
 | 
				
			||||||
# perseustest -a -t0    -o -
 | 
					# perseustest utility that comes with libperseus-sdr support package.
 | 
				
			||||||
# perseustest -d 9 -a -t 100000 -o -  -s 768000 -u 0 -f 14150000 -r-
 | 
					# Below the base options used are shown:
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# -p output    I/Q samples as 32 bits floating point
 | 
				
			||||||
 | 
					# -d -1        suppress debug messages
 | 
				
			||||||
 | 
					# -a           don't test attenuators on startup
 | 
				
			||||||
 | 
					# -t 0         runs indefinitely
 | 
				
			||||||
 | 
					# -o -         output samples on stdout
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# As we are already returning I/Q samples as pairs of 32 bits
 | 
				
			||||||
 | 
					# floating points (option -p),no need for further conversions,
 | 
				
			||||||
 | 
					# so the method getFormatConversion(self) is not implemented at all.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PerseussdrSource(DirectSource):
 | 
					class PerseussdrSource(DirectSource):
 | 
				
			||||||
    def getCommandMapper(self):
 | 
					    def getCommandMapper(self):
 | 
				
			||||||
        return super().getCommandMapper().setBase("perseustest -p -d -1 -a -t 100000 -o -  ").setMappings(
 | 
					        return super().getCommandMapper().setBase("perseustest -p -d -1 -a -t 0 -o -  ").setMappings(
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                "samp_rate": Option("-s"),
 | 
					                "samp_rate": Option("-s"),
 | 
				
			||||||
                "tuner_freq": Option("-f"),
 | 
					                "tuner_freq": Option("-f"),
 | 
				
			||||||
                "rf_gain": Option("-u"),
 | 
					                "attenuator": Option("-u"),
 | 
				
			||||||
                "lna_gain": Option("-g"),
 | 
					                "adc_preamp": Option("-m"),
 | 
				
			||||||
                "rf_amp": Option("-x"),
 | 
					                "adc_dither": Option("-x"),
 | 
				
			||||||
 | 
					                "wideband": Option("-w"),
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        ).setStatic("-r-")
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def getEventNames(self):
 | 
					    def getEventNames(self):
 | 
				
			||||||
        return super().getEventNames() + [
 | 
					        return super().getEventNames() + [
 | 
				
			||||||
            "lna_gain",
 | 
					            "attenuator",
 | 
				
			||||||
            "rf_amp",
 | 
					            "adc_preamp",
 | 
				
			||||||
 | 
					            "adc_dither",
 | 
				
			||||||
 | 
					            "wideband",
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
 | 
					 | 
				
			||||||
    def getFormatConversion(self):
 | 
					 | 
				
			||||||
#        return ["csdr convert_s24_f --bigendian"]
 | 
					 | 
				
			||||||
#        return ["csdr convert_s24_f", "csdr gain_ff 20"]
 | 
					 | 
				
			||||||
        return ["csdr gain_ff 20"]
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user