Example #1
0
    def get_gain(self):
        result = librtlsdr.rtlsdr_get_tuner_gain(self.dev_p)        
        if result < 0:
            self.close()
            raise IOError('Error code %d when getting gain'\
                          % (result))

        return result
Example #2
0
    def get_gain(self):
        ''' Get gain of tuner (in dB). '''

        result = librtlsdr.rtlsdr_get_tuner_gain(self.dev_p)
        if result == 0:
            self.close()
            raise IOError('Error when getting gain')

        return result/10
Example #3
0
    def get_gain(self):
        ''' Get gain of tuner (in dB). '''

        result = librtlsdr.rtlsdr_get_tuner_gain(self.dev_p)
        if result == 0:
            self.close()
            raise IOError('Error when getting gain')

        return result/10
Example #4
0
    def get_gain(self):
        """ Get gain of tuner (in dB). """

        result = librtlsdr.rtlsdr_get_tuner_gain(self.dev_p)
        if result == 0:
            self.close()
            raise IOError("Error when getting gain")

        return result / 10