disabled spectran http sampleFreq autodetection

This commit is contained in:
AlexandreRouma 2023-04-22 00:27:31 +02:00
parent 582aeed640
commit 528763d10e

View File

@ -100,10 +100,11 @@ void SpectranHTTPClient::worker() {
auto sampleFreqEnd = jsonData.find(',', sampleFreqBegin); auto sampleFreqEnd = jsonData.find(',', sampleFreqBegin);
std::string sampleFreqStr = jsonData.substr(sampleFreqBegin + 18, sampleFreqEnd - sampleFreqBegin - 18); std::string sampleFreqStr = jsonData.substr(sampleFreqBegin + 18, sampleFreqEnd - sampleFreqBegin - 18);
sampleFreq = std::stoll(sampleFreqStr); sampleFreq = std::stoll(sampleFreqStr);
//flog::debug("{}", jsonData);
} }
// Calculate and update center freq // Calculate and update center freq
int64_t samplerate = sampleFreqReceived ? sampleFreq : (endFreq - startFreq); int64_t samplerate = /* sampleFreqReceived ? sampleFreq : */(endFreq - startFreq);
int64_t centerFreq = round(((double)endFreq + (double)startFreq) / 2.0); int64_t centerFreq = round(((double)endFreq + (double)startFreq) / 2.0);
if (centerFreq != _centerFreq) { if (centerFreq != _centerFreq) {
flog::debug("New center freq: {}", centerFreq); flog::debug("New center freq: {}", centerFreq);