mirror of
https://github.com/LX3JL/xlxd.git
synced 2026-01-03 07:10:12 +01:00
corrected bug preventing relaying streams on module 'A' of IMRS clients
corrected bug xlxd not advertising module W,X,Y & Z to IMRS clients
This commit is contained in:
parent
0eea5d7bf9
commit
b411eb8b8a
|
|
@ -658,18 +658,29 @@ void CImrsProtocol::EncodePongPacket(CBuffer *Buffer) const
|
||||||
Buffer->Append(radioid, sizeof(radioid));
|
Buffer->Append(radioid, sizeof(radioid));
|
||||||
// list of authorised dg-id
|
// list of authorised dg-id
|
||||||
// enable dg-id 2 & 10 -> 10+NBmodules
|
// enable dg-id 2 & 10 -> 10+NBmodules
|
||||||
uint32 dgids = 0x00000004;
|
uint32 dgids32 = 0x00000004;
|
||||||
uint32 mask = 0x00000400;
|
uint32 mask32 = 0x00000400;
|
||||||
for ( int i = 0; i < NB_OF_MODULES; i++ )
|
// modules 10->31
|
||||||
|
for ( int i = 0; i < MIN(NB_OF_MODULES,22); i++ )
|
||||||
{
|
{
|
||||||
dgids |= mask;
|
dgids32 |= mask32;
|
||||||
mask = mask << 1;
|
mask32 = mask32 << 1;
|
||||||
}
|
}
|
||||||
Buffer->Append(LOBYTE(LOWORD(dgids)));
|
Buffer->Append(LOBYTE(LOWORD(dgids32)));
|
||||||
Buffer->Append(HIBYTE(LOWORD(dgids)));
|
Buffer->Append(HIBYTE(LOWORD(dgids32)));
|
||||||
Buffer->Append(LOBYTE(HIWORD(dgids)));
|
Buffer->Append(LOBYTE(HIWORD(dgids32)));
|
||||||
Buffer->Append(HIBYTE(HIWORD(dgids)));
|
Buffer->Append(HIBYTE(HIWORD(dgids32)));
|
||||||
Buffer->Append((uint8)0x00, 13);
|
// module 32->35
|
||||||
|
uint8 dgids8 = 0x00;
|
||||||
|
uint8 mask8 = 0x01;
|
||||||
|
for ( int i = 23; i < NB_OF_MODULES; i++ )
|
||||||
|
{
|
||||||
|
dgids8 |= mask8;
|
||||||
|
mask8 = mask8 << 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
Buffer->Append(dgids8);
|
||||||
|
Buffer->Append((uint8)0x00, 12);
|
||||||
// and dg-id
|
// and dg-id
|
||||||
Buffer->Append((uint8)2);
|
Buffer->Append((uint8)2);
|
||||||
Buffer->Append((uint8)2);
|
Buffer->Append((uint8)2);
|
||||||
|
|
@ -907,7 +918,7 @@ uint8 CImrsProtocol::ModuleToDgid(char cModule) const
|
||||||
{
|
{
|
||||||
uint8 uiDgid = 0x00;
|
uint8 uiDgid = 0x00;
|
||||||
|
|
||||||
if ( (cModule >+ 'A') && (cModule < ('A'+NB_OF_MODULES)) )
|
if ( (cModule >= 'A') && (cModule < ('A'+NB_OF_MODULES)) )
|
||||||
{
|
{
|
||||||
uiDgid = 10 + (cModule - 'A');
|
uiDgid = 10 + (cModule - 'A');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue