Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue #311 #355

Merged
merged 1 commit into from
May 16, 2020
Merged

Fix for Issue #311 #355

merged 1 commit into from
May 16, 2020

Conversation

jonk6
Copy link
Contributor

@jonk6 jonk6 commented May 11, 2020

Resolves problem of garbled P25 Phase2 TDMA messages.

There appear to be integer rollovers that occur in the Raspberry Pi environment,
but not in the X86 environment because:

    x86:  __SIZEOF_LONG__ = 8
    rpi4: __SIZEOF_LONG__ = 4

Modifications to lib/lfsr/bit_utils.h, lib/lfsr/lfsr.cxx, and lib/lfsr/lfsr.h
to use unsigned long long instead of unsigned long resolves the problem for the
RPi world.

Since

    x86:  __SIZEOF_LONG_LONG__ = 8
    rpi4: __SIZEOF_LONG_LONG__ = 8

it doesn't break anything for X86.

    Resolves problem of garbled P25 Phase2 TDMA messages.
    
    There appear to be integer rollovers that occur in the Raspberry Pi environment,
    but not in the X86 environment because:
    
        x86:  __SIZEOF_LONG__ = 8
        rpi4: __SIZEOF_LONG__ = 4
    
    Modifications to lib/lfsr/bit_utils.h, lib/lfsr/lfsr.cxx, and lib/lfsr/lfsr.h
    to use unsigned long long instead of unsigned long resolves the problem for the
    RPi world.
    
    Because
    
        x86:  __SIZEOF_LONG_LONG__ = 8
        rpi4: __SIZEOF_LONG_LONG__ = 8
    
    it doesn't break anything for X86.
@robotastic robotastic merged commit 7020b20 into TrunkRecorder:master May 16, 2020
@robotastic
Copy link
Collaborator

Great catch! This makes a lot of sense. I am going to roll this in. I don't have good systems to test on, so if anyone has TDMA issues from this merge, let me know.

@Dygear
Copy link
Contributor

Dygear commented May 22, 2020

I'm about to check and advise on this. (Commenting so I know where to remote back to.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants