Find the channelizer channel that corresponds to the given frequency
| 126 | |
| 127 | // Find the channelizer channel that corresponds to the given frequency |
| 128 | int SDRPostThread::getChannelAt(long long frequency_in) { |
| 129 | int chan = -1; |
| 130 | long long minDelta = sampleRate; |
| 131 | for (int i = 0; i < numChannels+1; i++) { |
| 132 | long long fdelta = abs(frequency_in - chanCenters[i]); |
| 133 | if (fdelta < minDelta) { |
| 134 | minDelta = fdelta; |
| 135 | chan = i; |
| 136 | } |
| 137 | } |
| 138 | return chan; |
| 139 | } |
| 140 | |
| 141 | |
| 142 | void SDRPostThread::setChannelizerType(SDRPostThreadChannelizerType chType) { |
nothing calls this directly
no outgoing calls
no test coverage detected