Skip to content

Add support for FNC1 in first position mode - #7

Open
sasosecnjak wants to merge 1 commit into
fwcd:mainfrom
sasosecnjak:feature/adding_fnc1_in_first_position_mode
Open

Add support for FNC1 in first position mode#7
sasosecnjak wants to merge 1 commit into
fwcd:mainfrom
sasosecnjak:feature/adding_fnc1_in_first_position_mode

Conversation

@sasosecnjak

Copy link
Copy Markdown

This PR adds support for the "FNC1 in first position" mode (0x5) to QRSegment, in accordance with the QR Code specification. This mode is commonly used for GS1-compliant barcodes.

Changes Included:

  • Added a new case: Mode.fnc1FirstPosition
  • Extended modeBits to return 0x5 for FNC1
  • Updated numCharCountBits(version:) to return [0, 0, 0] for this mode
  • Added a static factory method: makeFNC1FirstPosition()

The implementation follows the existing code style and design patterns in the library, aiming for consistency and backward compatibility.

Let me know if there are any suggestions or adjustments you'd like — happy to revise if needed!``

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.

1 participant