mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-21 21:45:39 +08:00
Add status when connected or disconnected via PC to 5000 +/- base!
This commit is contained in:
@@ -425,7 +425,7 @@ int CDMRGateway::run()
|
|||||||
m_xlxNetwork2->write(data);
|
m_xlxNetwork2->write(data);
|
||||||
status[slotNo] = DMRGWS_XLXREFLECTOR2;
|
status[slotNo] = DMRGWS_XLXREFLECTOR2;
|
||||||
timer[slotNo]->start();
|
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 += 4000U;
|
||||||
dstId -= m_xlx1Base;
|
dstId -= m_xlx1Base;
|
||||||
|
|
||||||
@@ -433,8 +433,10 @@ int CDMRGateway::run()
|
|||||||
if (dstId == 4000U) {
|
if (dstId == 4000U) {
|
||||||
LogMessage("XLX-1, Unlinking");
|
LogMessage("XLX-1, Unlinking");
|
||||||
} else if (dstId == 5000U) {
|
} else if (dstId == 5000U) {
|
||||||
// Status XLX-1 here
|
if (m_xlx1Reflector != 4000)
|
||||||
voice1->linkedTo(m_xlx1Reflector);
|
voice1->linkedTo(m_xlx1Reflector);
|
||||||
|
else
|
||||||
|
voice1->unlinked();
|
||||||
} else {
|
} else {
|
||||||
if (m_xlx1Reflector != 4000U)
|
if (m_xlx1Reflector != 4000U)
|
||||||
writeXLXLink(srcId, 4000U, m_xlxNetwork1);
|
writeXLXLink(srcId, 4000U, m_xlxNetwork1);
|
||||||
@@ -442,10 +444,12 @@ int CDMRGateway::run()
|
|||||||
LogMessage("XLX-1, Linking to reflector %u", dstId);
|
LogMessage("XLX-1, Linking to reflector %u", dstId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dstId != 5000U ) {
|
||||||
writeXLXLink(srcId, dstId, m_xlxNetwork1);
|
writeXLXLink(srcId, dstId, m_xlxNetwork1);
|
||||||
m_xlx1Reflector = dstId;
|
m_xlx1Reflector = dstId;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
status[slotNo] = DMRGWS_XLXREFLECTOR1;
|
status[slotNo] = DMRGWS_XLXREFLECTOR1;
|
||||||
timer[slotNo]->start();
|
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 += 4000U;
|
||||||
dstId -= m_xlx2Base;
|
dstId -= m_xlx2Base;
|
||||||
|
|
||||||
@@ -470,8 +474,10 @@ int CDMRGateway::run()
|
|||||||
if (dstId == 4000U) {
|
if (dstId == 4000U) {
|
||||||
LogMessage("XLX-2, Unlinking");
|
LogMessage("XLX-2, Unlinking");
|
||||||
} else if (dstId == 5000U) {
|
} else if (dstId == 5000U) {
|
||||||
// Status XLX-2 here
|
if (m_xlx2Reflector != 4000)
|
||||||
voice2->linkedTo(m_xlx1Reflector);
|
voice2->linkedTo(m_xlx2Reflector);
|
||||||
|
else
|
||||||
|
voice2->unlinked();
|
||||||
} else {
|
} else {
|
||||||
if (m_xlx2Reflector != 4000U)
|
if (m_xlx2Reflector != 4000U)
|
||||||
writeXLXLink(srcId, 4000U, m_xlxNetwork2);
|
writeXLXLink(srcId, 4000U, m_xlxNetwork2);
|
||||||
@@ -479,10 +485,12 @@ int CDMRGateway::run()
|
|||||||
LogMessage("XLX-2, Linking to reflector %u", dstId);
|
LogMessage("XLX-2, Linking to reflector %u", dstId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dstId != 5000U ) {
|
||||||
writeXLXLink(srcId, dstId, m_xlxNetwork2);
|
writeXLXLink(srcId, dstId, m_xlxNetwork2);
|
||||||
m_xlx2Reflector = dstId;
|
m_xlx2Reflector = dstId;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
status[slotNo] = DMRGWS_XLXREFLECTOR2;
|
status[slotNo] = DMRGWS_XLXREFLECTOR2;
|
||||||
timer[slotNo]->start();
|
timer[slotNo]->start();
|
||||||
|
|||||||
Reference in New Issue
Block a user