Пример #1
0
// GetCenterFrequency gets the actual frequency the device is tuned to in HZ
func (dev *Radio) GetCenterFrequency() (uint32, error) {
	retval := C.rtlsdr_get_center_freq(dev.devptr)

	if retval == 0 {
		return 0, fmt.Errorf("rtlsdr_get_center_freq encountered an error")
	}
	return uint32(retval), nil
}
Пример #2
0
// Get actual frequency the device is tuned to.
//
// Frequency values are in Hz.
//
// uint32_t rtlsdr_get_center_freq(rtlsdr_dev_t *dev);
// rtlsdr_get_center_freq returns frequency in Hz or 0 on error
func (c *Context) GetCenterFreq() (freq int) {
	return int(C.rtlsdr_get_center_freq((*C.rtlsdr_dev_t)(c.dev)))
}