Skip to content

Commit

Permalink
Fix for clock drift between radio and duplex HS
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Aug 20, 2018
1 parent 0f1bc29 commit 06d8efa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions DMRTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,20 @@ void CDMRTX::createData(uint8_t slotIndex)
if (m_fifo[slotIndex].getData() > 0U && m_frameCount >= STARTUP_COUNT) {
for (unsigned int i = 0U; i < DMR_FRAME_LENGTH_BYTES; i++) {
m_poBuffer[i] = m_fifo[slotIndex].get();
m_markBuffer[i] = MARK_NONE;
if (i == 8U)
m_markBuffer[i] = slotIndex == 0U ? MARK_SLOT1 : MARK_SLOT2;
else
m_markBuffer[i] = MARK_NONE;
}
} else {
m_abort[slotIndex] = false;
// Transmit an idle message
for (unsigned int i = 0U; i < DMR_FRAME_LENGTH_BYTES; i++) {
m_poBuffer[i] = m_idle[i];
m_markBuffer[i] = MARK_NONE;
if (i == 8U)
m_markBuffer[i] = slotIndex == 0U ? MARK_SLOT1 : MARK_SLOT2;
else
m_markBuffer[i] = MARK_NONE;
}
}

Expand All @@ -287,7 +293,7 @@ void CDMRTX::createCACH(uint8_t txSlotIndex, uint8_t rxSlotIndex)
::memcpy(m_poBuffer, m_shortLC + m_cachPtr, 3U);
m_markBuffer[0U] = MARK_NONE;
m_markBuffer[1U] = MARK_NONE;
m_markBuffer[2U] = rxSlotIndex == 1U ? MARK_SLOT1 : MARK_SLOT2;
m_markBuffer[2U] = MARK_NONE;

bool at = false;
if (m_frameCount >= STARTUP_COUNT)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ and wait to complete the upgrading process.

You could use example files from MMDVM_HS/configs folder and overwrite the Config.h file, in order to compile a firmware with default settings. There are a specific config file for each ZUMspot or any MMDVM_HS compatible boards. In general, there are two possible compilation ways:

- Board with USB interface
- Boards with USB interface:

Boards with STM32_USB_HOST option enabled in Config.h (ZUMspot Libre Kit, ZUMspot USB, GIBSpot USB, NanoDV USB, etc). Those boards need to have the USB bootloader installed. For example:

make clean
make bl
make dfu

- Board with GPIO interface
- Boards with GPIO interface:

Boards with STM32_USART1_HOST option enabled in Config.h (ZUMspot RPi, MMDVM_HS_Hat, MMDVM_HS_Dual_Hat, Nano hotSPOT, etc). No USB bootloader needed. For example:

Expand Down

0 comments on commit 06d8efa

Please sign in to comment.