Add status when connected or disconnected via PC to 5000 +/- base!

This commit is contained in:
Tony Corbett G0WFV
2017-06-01 17:34:51 +01:00
parent 61e21d4eb5
commit d9b0410fa0

View File

@@ -425,7 +425,7 @@ int CDMRGateway::run()
m_xlxNetwork2->write(data);
status[slotNo] = DMRGWS_XLXREFLECTOR2;
timer[slotNo]->start();
} else if (flco == FLCO_USER_USER && slotNo == m_xlx1Slot && dstId >= m_xlx1Base && dstId <= (m_xlx1Base + 26U)) {
} else if ((dstId <= (m_xlx1Base + 26U) || dstId == (m_xlx1Base + 1000U)) && flco == FLCO_USER_USER && slotNo == m_xlx1Slot && dstId >= m_xlx1Base) { //
dstId += 4000U;
dstId -= m_xlx1Base;
@@ -433,8 +433,10 @@ int CDMRGateway::run()
if (dstId == 4000U) {
LogMessage("XLX-1, Unlinking");
} else if (dstId == 5000U) {
// Status XLX-1 here
if (m_xlx1Reflector != 4000)
voice1->linkedTo(m_xlx1Reflector);
else
voice1->unlinked();
} else {
if (m_xlx1Reflector != 4000U)
writeXLXLink(srcId, 4000U, m_xlxNetwork1);
@@ -442,10 +444,12 @@ int CDMRGateway::run()
LogMessage("XLX-1, Linking to reflector %u", dstId);
}
if (dstId != 5000U ) {
writeXLXLink(srcId, dstId, m_xlxNetwork1);
m_xlx1Reflector = dstId;
changed = true;
}
}
status[slotNo] = DMRGWS_XLXREFLECTOR1;
timer[slotNo]->start();
@@ -462,7 +466,7 @@ int CDMRGateway::run()
}
}
}
} else if (flco == FLCO_USER_USER && slotNo == m_xlx2Slot && dstId >= m_xlx2Base && dstId <= (m_xlx2Base + 26U)) {
} else if ((dstId <= (m_xlx2Base + 26U) || dstId == (m_xlx2Base + 1000U)) && flco == FLCO_USER_USER && slotNo == m_xlx2Slot && dstId >= m_xlx2Base) { //
dstId += 4000U;
dstId -= m_xlx2Base;
@@ -470,8 +474,10 @@ int CDMRGateway::run()
if (dstId == 4000U) {
LogMessage("XLX-2, Unlinking");
} else if (dstId == 5000U) {
// Status XLX-2 here
voice2->linkedTo(m_xlx1Reflector);
if (m_xlx2Reflector != 4000)
voice2->linkedTo(m_xlx2Reflector);
else
voice2->unlinked();
} else {
if (m_xlx2Reflector != 4000U)
writeXLXLink(srcId, 4000U, m_xlxNetwork2);
@@ -479,10 +485,12 @@ int CDMRGateway::run()
LogMessage("XLX-2, Linking to reflector %u", dstId);
}
if (dstId != 5000U ) {
writeXLXLink(srcId, dstId, m_xlxNetwork2);
m_xlx2Reflector = dstId;
changed = true;
}
}
status[slotNo] = DMRGWS_XLXREFLECTOR2;
timer[slotNo]->start();