mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-05 14:37:02 +00:00
Fix DMR timing bug with OscOffset.
This commit is contained in:
parent
f656baf64e
commit
8d3ede9160
5 changed files with 20 additions and 18 deletions
|
|
@ -210,11 +210,11 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
|
|||
uint8_t dmrDelay = data[7U];
|
||||
|
||||
int8_t oscOffset = int8_t(data[8U]) - 128;
|
||||
if (oscOffset < 0) {
|
||||
m_sampleCount = 1000000U / uint32_t(-oscOffset);
|
||||
m_sampleInsert = true;
|
||||
} else if (oscOffset > 0) {
|
||||
if (oscOffset > 0) {
|
||||
m_sampleCount = 1000000U / uint32_t(oscOffset);
|
||||
m_sampleInsert = true;
|
||||
} else if (oscOffset < 0) {
|
||||
m_sampleCount = 1000000U / uint32_t(-oscOffset);
|
||||
m_sampleInsert = false;
|
||||
} else {
|
||||
m_sampleCount = 0U;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue