1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

SDRdaemon: GUI fix. Limit r/w balance correction

This commit is contained in:
f4exb
2016-03-19 08:54:31 +01:00
parent 7077f6a780
commit b14ae1e7c1
3 changed files with 17 additions and 8 deletions
@@ -269,6 +269,15 @@ uint8_t *SDRdaemonBuffer::readData(int32_t length)
}
m_balCorrection += dBytes / (int32_t) (m_nbReads * m_iqSampleSize); // correction is in number of samples
int32_t limit = (int32_t) m_rawSize / (int32_t) (5 * m_rawBufferLengthSeconds * m_iqSampleSize);
if (m_balCorrection < -limit) {
m_balCorrection = -limit;
} else if (m_balCorrection > limit) {
m_balCorrection = limit;
}
m_nbReads = 0;
}
else