Fix wrong positions of the status bits.

This commit is contained in:
Jonathan Naylor
2016-09-13 06:24:06 +01:00
parent 34e0d10343
commit 30467a749c
4 changed files with 12 additions and 8 deletions

View File

@@ -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);
}
}