Fix wrong positions of the status bits.
This commit is contained in:
parent
34e0d10343
commit
30467a749c
|
@ -308,7 +308,7 @@ void CModem::clock(unsigned int ms)
|
|||
readStatus();
|
||||
m_statusTimer.start();
|
||||
|
||||
|
||||
#ifdef notdef
|
||||
const unsigned char* dat = P25_DATA[m_nn];
|
||||
if (m_nn == 0U) {
|
||||
unsigned char data = 101U;
|
||||
|
@ -329,6 +329,7 @@ void CModem::clock(unsigned int ms)
|
|||
}
|
||||
|
||||
m_nn++;
|
||||
#endif
|
||||
}
|
||||
|
||||
m_inactivityTimer.clock(ms);
|
||||
|
|
|
@ -281,10 +281,9 @@ void CP25Control::addBusyBits(unsigned char* data, unsigned int length, bool b1,
|
|||
{
|
||||
assert(data != NULL);
|
||||
|
||||
for (unsigned int i = 0U; i < length; i++) {
|
||||
if (i > 0U && (i % 70U) == 0U)
|
||||
WRITE_BIT(data, i, b1);
|
||||
if (i > 0U && (i % 71U) == 0U)
|
||||
WRITE_BIT(data, i, b2);
|
||||
for (unsigned int ss0Pos = P25_SS0_START; ss0Pos < length; ss0Pos += P25_SS_INCREMENT) {
|
||||
unsigned int ss1Pos = ss0Pos + 1U;
|
||||
WRITE_BIT(data, ss0Pos, b1);
|
||||
WRITE_BIT(data, ss1Pos, b2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ const unsigned int P25_NID_LENGTH_BYTES = 8U;
|
|||
const unsigned char P25_SYNC_BYTES[] = {0x55U, 0x75U, 0xF5U, 0xFFU, 0x77U, 0xFFU};
|
||||
const unsigned char P25_SYNC_BYTES_LENGTH = 6U;
|
||||
|
||||
const unsigned int P25_SS0_START = 70U;
|
||||
const unsigned int P25_SS1_START = 71U;
|
||||
const unsigned int P25_SS_INCREMENT = 72U;
|
||||
|
||||
const unsigned char P25_DUID_HEADER = 0x00U;
|
||||
const unsigned char P25_DUID_TERM = 0x03U;
|
||||
const unsigned char P25_DUID_LDU1 = 0x05U;
|
||||
|
|
|
@ -45,7 +45,7 @@ void CP25NID::process(unsigned char* data)
|
|||
|
||||
unsigned int n = 0U;
|
||||
for (unsigned int offset = 48U; offset < 114U; offset++) {
|
||||
if (offset != 70U && offset != 71U) {
|
||||
if (offset != P25_SS0_START && offset != P25_SS1_START) {
|
||||
bool b = READ_BIT(data, offset);
|
||||
WRITE_BIT(nid, n, b);
|
||||
n++;
|
||||
|
@ -61,7 +61,7 @@ void CP25NID::process(unsigned char* data)
|
|||
|
||||
n = 0U;
|
||||
for (unsigned int offset = 48U; offset < 114U; offset++) {
|
||||
if (offset != 70U && offset != 71U) {
|
||||
if (offset != P25_SS0_START && offset != P25_SS1_START) {
|
||||
bool b = READ_BIT(nid, n);
|
||||
WRITE_BIT(data, offset, b);
|
||||
n++;
|
||||
|
|
Loading…
Reference in a new issue