Skip to content

RX.GET_FREE_OFFSETS API addition#213

Merged
wmiler merged 4 commits into
JS8Call-improved:masterfrom
WebBreacher:master
Mar 10, 2026
Merged

RX.GET_FREE_OFFSETS API addition#213
wmiler merged 4 commits into
JS8Call-improved:masterfrom
WebBreacher:master

Conversation

@WebBreacher

Copy link
Copy Markdown
Contributor

Proposed new API call that allows the JS8Call API to share what offsets are available to use to send traffic.

  • Reads optional SPEEDLOWHIGH params (defaults: current mode, 500 Hz, 2500 Hz)
  • For each active offset in m_bandActivity (within 30 seconds), computes the blocked zone as occ ± (requestedBW/2 + signalBW/2) — accounting for both the occupying signal's actual bandwidth and your intended TX bandwidth
  • Sorts and merges overlapping blocked zones, then returns the gaps as FREE segments
  • Omits gaps narrower than your TX bandwidth (they can't fit anyway)
  • Example response: {"params":{"FREE":[{"HIGH":860,"LOW":500,"WIDTH":360},{"HIGH":2500,"LOW":1120,"WIDTH":1380}],"BANDWIDTH":160,"HIGH":2500,"LOW":500,"SPEED":2,"_ID":...},"type":"RX.FREE_OFFSETS","value":""}

-   Reads optional `SPEED`, `LOW`, `HIGH` params (defaults: current mode, 500 Hz, 2500 Hz)
-   For each active offset in `m_bandActivity` (within 30 seconds), computes the blocked zone as `occ ± (requestedBW/2 + signalBW/2)` — accounting for both the occupying signal's actual bandwidth and your intended TX bandwidth
-   Sorts and merges overlapping blocked zones, then returns the gaps as `FREE` segments
-   Omits gaps narrower than your TX bandwidth (they can't fit anyway)
-   Example response: {"params":{"FREE":[{"HIGH":860,"LOW":500,"WIDTH":360},{"HIGH":2500,"LOW":1120,"WIDTH":1380}],"BANDWIDTH":160,"HIGH":2500,"LOW":500,"SPEED":2,"_ID":...},"type":"RX.FREE_OFFSETS","value":""}
@wmiler wmiler added enhancement New feature or request API documentation Improvements or additions to documentation labels Mar 5, 2026
Comment thread docs/API.md
Comment thread JS8_Mainwindow/networkMessage.cpp
@wmiler

wmiler commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

I'll have to look at the code when I get back to my desktop.

@wmiler wmiler requested a review from Chris-AC9KH March 5, 2026 19:32
@wmiler wmiler added this to the 2.6.0 milestone Mar 5, 2026
@wmiler wmiler added enhancement New feature or request and removed enhancement New feature or request labels Mar 5, 2026
@wmiler wmiler mentioned this pull request Mar 6, 2026

@Chris-AC9KH Chris-AC9KH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the requested note for the API version change, this looks good to me. Nice work on the API guys!

@WebBreacher

Copy link
Copy Markdown
Contributor Author

Was the note for the API something you wanted me to add or you will do that?

@wmiler

wmiler commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator

Was the note for the API something you wanted me to add or you will do that?

You :) But if you don't have time, I can fix it post merge.

@WebBreacher

Copy link
Copy Markdown
Contributor Author

Added. Hoping I did that correctly. Thanks!

@wmiler wmiler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@Chris-AC9KH

Copy link
Copy Markdown
Collaborator

@WebBreacher It looks like this one is ready to merge. But it has to be rebased on master first. To do that, checkout master and run git pull master to update your local master branch. Then checkout your PR branch and run git rebase master. You'll have to resolve the conflicts between your code and what's been changed in master to finish the rebase. After rebasing push to your PR branch, and then this should merge.

Thanks!

@WebBreacher

Copy link
Copy Markdown
Contributor Author

Thanks @Chris-AC9KH. I believe I did it right but please let me know. Happy to redo. This is always the part of the git process that messes me up.

@wmiler

wmiler commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

This can merge when the CI runs pass.

@WebBreacher

Copy link
Copy Markdown
Contributor Author

I knew I'd mess up. Please let me know what I need to do to fix this. Just follow the instructions above?

@wmiler

wmiler commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

On a quick look, it seems you have a missing } somewhere.

@WebBreacher

Copy link
Copy Markdown
Contributor Author

found and fixed it. hopefully.

@wmiler wmiler merged commit 8e032d1 into JS8Call-improved:master Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants