Skip to content

v1.5.1: WSPR power normalization and packmsg bounds hardening - #45

Merged
NT7S merged 6 commits into
masterfrom
fix/review-76fd68b
Dec 2, 2026
Merged

NT7S merged 6 commits into
masterfrom
fix/review-76fd68b

Conversation

@NT7S

@NT7S NT7S commented Dec 2, 2026

Copy link
Copy Markdown
Member

Summary

Patch-level cleanup on top of v1.5.0 / merge 76fd68b, with a v1.5.1 version bump.

This PR focuses on interoperability and safety for the full packmsg path, WSPR power normalization, and the FT4/FT8 beacon examples.

What changed

  • WSPR power now follows the WSJT-X wqencode convention:

    if(dbm < 0) dbm = 0;
    if(dbm > 60) dbm = 60;
    power = dbm + nu[dbm % 10];

    with:

    nu = {0, -1, 1, 0, -1, 2, 1, 0, -1, 1}
  • getpfx1() prefix/suffix handling is bounds-checked using explicit lengths instead of writing a NUL past char c[5].

  • Invalid free-text characters now map to code 0, matching Fortran packtext77, in both compact and full paths.

  • Warning cleanup:

    • fixed operator-precedence warning in suffix parsing,
    • made bounded snprintf precision explicit,
    • removed unused trim_len and grid2k,
    • made the RS symbol-size sign compare explicit.
  • FT4/FT8 beacon examples now limit pre-transmission WiFi reconnect time:

    • NTP_SYNC_MAX_MS = 5000
    • RECONNECT_SAFETY_MS = 1000
  • Version bumped to 1.5.1 in library.properties and README changelog.

Verification

Harness on this branch:

sh tests/run_tests.sh
36/36 checks, 0/36 checks detected a bug

Full packmsg mode:

JTENCODE_FULL_PACKMSG=1 sh tests/run_tests.sh

Full path regression includes the new prefix bounds cases:

ABCDE/FGHIJ CN84                 -> itype= 6 (expect  6) OK
ABCDEF/GHIJK CN84                -> itype= 6 (expect  6) OK
NT7S K1ABC CN84                  dat MATCH (itype=1)
ALL OK

WSPR power normalization checks:

55 -> 57
39 -> 40
49 -> 50
-1 -> 0
-28 -> 0
61 -> 60
-100 -> 0
60 -> 60

Free-text invalid-character regression:

A! match=True
A( match=True
A B!C match=True
A?+ match=True

FT4/FT8 example compiles after the reconnect-budget change:

FT4 full:    81056 bytes, 11580 BSS
FT4 compact: 77736 bytes, 11580 BSS

FT8 full:    80904 bytes, 11556 BSS
FT8 compact: 77592 bytes, 11556 BSS

Warning build with -Wall -Wextra no longer reports the original -Wparentheses, -Wformat-truncation, or -Wsign-compare issues. It does still report -Wstringop-truncation warnings for intentional fixed-length strncpy() copies; those were not restructured in this PR.

Notes / scope

  • Full pack77 hash-call <...> support remains documented as out of scope; hash-form messages currently fall back to free text.
  • docs/FT8_FT4_CRC_BUG.md was already present at the v1.5.0 merge base and is not modified in this PR.

Commits

282a099 chore: bump patch version to v1.5.1
f76471c Document WSPR power normalization as WSJT-X nu behavior
6e95d57 Limit pre-TX WiFi reconnect so it cannot overrun the slot
bd06fb9 Normalize WSPR power using WSJT-X nu table instead of round-down
33a5e43 Add regression tests for free-text invalid chars and prefix bounds
146e91d Review fixes: bounds-check pack prefix parsing, match free-text invalid chars, clean warnings
76fd68b Merge pull request #44 from etherkit/feat/ft4

@NT7S
NT7S merged commit 062bdb3 into master Dec 2, 2026
7 checks passed
@NT7S
NT7S deleted the fix/review-76fd68b branch December 2, 2026 21:19
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