Alter rewrite ranges so they appear correctly in tracing

This commit is contained in:
Tony Corbett G0WFV 2017-06-07 10:38:53 +01:00
parent 7cd557de8a
commit 2d670d330b
3 changed files with 6 additions and 6 deletions

View file

@ -29,7 +29,7 @@ CRewriteTG::CRewriteTG(const char* name, unsigned int fromSlot, unsigned int fro
m_name(name),
m_fromSlot(fromSlot),
m_fromTGStart(fromTG),
m_fromTGEnd(fromTG + range),
m_fromTGEnd(fromTG + range - 1U),
m_toSlot(toSlot),
m_toTGStart(toTG),
m_trace(trace),
@ -70,7 +70,7 @@ bool CRewriteTG::process(CDMRData& data)
unsigned int dstId = data.getDstId();
unsigned int slotNo = data.getSlotNo();
if (flco != FLCO_GROUP || slotNo != m_fromSlot || dstId < m_fromTGStart || dstId >= m_fromTGEnd)
if (flco != FLCO_GROUP || slotNo != m_fromSlot || dstId < m_fromTGStart || dstId > m_fromTGEnd)
return false;
if (m_fromSlot != m_toSlot)