mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Jitter slots insert should be always multiple of 6 to avoid break DMR sequence
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
unsigned int CDMRSlot::m_colorCode = 0U;
|
unsigned int CDMRSlot::m_colorCode = 0U;
|
||||||
|
|
||||||
@@ -1835,7 +1836,9 @@ void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData
|
|||||||
m_rssiMapper = rssiMapper;
|
m_rssiMapper = rssiMapper;
|
||||||
|
|
||||||
m_jitterTime = jitter;
|
m_jitterTime = jitter;
|
||||||
m_jitterSlots = jitter / DMR_SLOT_TIME;
|
|
||||||
|
float jitter_tmp = float(jitter) / 360.0F;
|
||||||
|
m_jitterSlots = (unsigned int) (std::ceil(jitter_tmp) * 6.0F);
|
||||||
|
|
||||||
m_idle = new unsigned char[DMR_FRAME_LENGTH_BYTES + 2U];
|
m_idle = new unsigned char[DMR_FRAME_LENGTH_BYTES + 2U];
|
||||||
::memcpy(m_idle, DMR_IDLE_DATA, DMR_FRAME_LENGTH_BYTES + 2U);
|
::memcpy(m_idle, DMR_IDLE_DATA, DMR_FRAME_LENGTH_BYTES + 2U);
|
||||||
|
|||||||
Reference in New Issue
Block a user