Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • U Unicorn Streamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Abrunhosa Rodrigues, Lourenço
  • Unicorn Streamer
  • Merge requests
  • !5

Fix 24-bit two's complement sign extension for EEG samples

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Tietze, Ulf requested to merge utietze/unicorn-streamer:fix/eeg-twos-complement-sign-extension into main Sep 07, 2026
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

OR-ing 0xFF000000 into the raw value relies on fixed-width 32-bit wraparound to produce a negative number, but Python ints are arbitrary-precision, so the OR left negative EEG readings incorrectly represented as large positive integers. Subtracting 0x01000000 performs the sign extension correctly regardless of int width.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/eeg-twos-complement-sign-extension