Skip to content

Commit

Permalink
Update TX delay according to G4KLX MMDVM firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Jul 3, 2018
1 parent 773c69a commit dc9b8c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion POCSAGDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#if !defined(POCSAGDEFINES_H)
#define POCSAGDEFINES_H

const uint16_t POCSAG_PREAMBLE_LENGTH_BYTES = 576U / 8U;
const uint16_t POCSAG_PREAMBLE_LENGTH_BYTES = 18U * sizeof(uint32_t);
const uint16_t POCSAG_FRAME_LENGTH_BYTES = 17U * sizeof(uint32_t);
const uint8_t POCSAG_SYNC = 0xAAU;

Expand Down
6 changes: 3 additions & 3 deletions POCSAGTX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ void CPOCSAGTX::writeByte(uint8_t c)

void CPOCSAGTX::setTXDelay(uint8_t delay)
{
m_txDelay = POCSAG_PREAMBLE_LENGTH_BYTES + uint16_t(delay);
m_txDelay = POCSAG_PREAMBLE_LENGTH_BYTES + (delay * 3U) / 2U;

if (m_txDelay > 1200U)
m_txDelay = 1200U;
if (m_txDelay > 150U)
m_txDelay = 150U;
}

uint8_t CPOCSAGTX::getSpace() const
Expand Down

0 comments on commit dc9b8c2

Please sign in to comment.