Repository navigation
fix(lora): update LoRa preset settings to reflect accurate BW, SF, and CR values; remove frequency from display - #191
Merged
ITblacksheep merged 1 commit intoOct 11, 2026
Conversation
…d CR values; remove frequency from display
ITblacksheep
approved these changes
Oct 11, 2026
ITblacksheep
pushed a commit
that referenced
this pull request
Oct 11, 2026
…d CR values; remove frequency from display (#191)
diffwireauto
deleted the
bug-189_incorrect_lora_settings_used_in_calculations
branch
October 12, 2026 06:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fixes #189
The Relay Airtime Share caption assumed SF 8 and displayed a frequency that has no effect on the calculation.
public/home.js.Changes
cmd/server/relay_airtime_share.go:defaultLoRaPreset()uses SF 7 and has no default frequency. Comments updated.cmd/server/config.go: doc comment forAnalyticsConfig.LoRaPresetupdated.config.example.json:loraPresetnow has"sf": 7and nofreq. The_comment_is updated.public/analytics.js: removed the frequency from the caption inrenderRelayAirtimeDumbbell. The function is also exposed onwindowfor testing, like the other_analytics*exports.Compatibility
freqconfig field is still accepted, andpreset.freq_hzis still returned by the API. Nothing is removed. Dropping it from the API would be a breaking change, so it can be deprecated in a later release.config.example.jsonhave"sf": 8set explicitly. Their display and shares will not change until they editanalytics.loraPreset.sf. This is worth a release-notes line.Effect on results
SF changes symbol time (SF 7 is about half of SF 8). The preamble is 32 symbols for both, so it is unchanged. Shares are normalized, so percentages shift slightly. For example, the ADVERT/ACK test case moves from 83.48% / 16.52% to 83.88% / 16.12%.
Tests
relay_airtime_share_test.go: the hand-computed ToA shares and the derivation comment are redone for SF 7. The preset response check no longer requires a non-zero frequency.tests/unit/test-frontend-helpers.js: new regression test that the caption showsBW 62.5 kHz,SF 7andCR 4/5and never containsMHz.Results:
cd cmd/server && go test ./...: passcd internal/lora && go test ./...: passnode tests/unit/test-frontend-helpers.js: 728 passed, 0 failedNot yet done: browser validation of the Analytics page (AGENTS.md rule 2).
Performance
No hot-path changes. This is a default value change plus the removal of one string from a caption.
Follow-ups (not in this PR)
radiodata instead of a global config default.freq/freq_hzin the API.