minor code cleanup;

pull/16/head
Bryan Biedenkapp 3 years ago
parent 5446d2b692
commit 4cff565650

@ -921,30 +921,23 @@ void TSBK::encode(uint8_t* data, bool rawTSBK, bool noTrellis)
tmS |= i;
}
// fix Year from from 1900 to from 2000
// fix year from from 1900 to, from 2000
tmY = tmY - 100U;
tsbkValue = 0xE0U + // VL, VT and VD flags set
((lto >> 8) & 0x0F); // LTO MSB (Upper 4-bits)
tsbkValue = (tsbkValue << 8) +
(lto & 0xFFU); // LTO LSB
tsbkValue = (tsbkValue << 8) + (lto & 0xFFU); // LTO LSB
// Date
tsbkValue = (tsbkValue << 4) +
(tmM & 0x0FU); // Month
tsbkValue = (tsbkValue << 5) +
(tmMDAY & 0x1FU); // Day of Month
tsbkValue = (tsbkValue << 13) +
(tmY & 0x1FFFU); // Year
tsbkValue = (tsbkValue << 4) + (tmM & 0x0FU); // Month
tsbkValue = (tsbkValue << 5) + (tmMDAY & 0x1FU); // Day of Month
tsbkValue = (tsbkValue << 13) + (tmY & 0x1FFFU); // Year
tsbkValue = (tsbkValue << 2); // Reserved
// Time
tsbkValue = (tsbkValue << 5) +
(tmH & 0x1FU); // Hour
tsbkValue = (tsbkValue << 6) +
(tmMin & 0x3FU); // Minute
tsbkValue = (tsbkValue << 6) +
(tmS & 0x3FU); // Seconds
tsbkValue = (tsbkValue << 5) + (tmH & 0x1FU); // Hour
tsbkValue = (tsbkValue << 6) + (tmMin & 0x3FU); // Minute
tsbkValue = (tsbkValue << 6) + (tmS & 0x3FU); // Seconds
tsbkValue = (tsbkValue << 7); // Reserved
#if DEBUG_P25_TSBK

Loading…
Cancel
Save

Powered by TurnKey Linux.