-
-
Notifications
You must be signed in to change notification settings - Fork 118
feat(hl2): drive the HL2 IO Board over I2C2 for band-following amp control #5362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jensenpat
merged 4 commits into
aethersdr:main
from
randal007:feat/hl2-io-board-tx-frequency
Sep 6, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
419752c
feat(hl2): drive the HL2 IO Board over I2C2 for band-following amp co…
randal007 93e7307
fix(hl2): address review — IO board scheduling guards and TX interlock
randal007 b70823d
Fix HL2 IO-board scheduling and session cleanup. Principle XI.
jensenpat 1f400de
Merge remote-tracking branch 'origin/main' into HEAD
jensenpat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
| #include <utility> | ||
|
|
||
| namespace AetherSDR::hl2 { | ||
|
|
||
| enum class IoBoardAction { Send, Coalesce, DropDisconnected }; | ||
|
|
||
| // The radio already moves its TX NCO and filter on a band change, including | ||
| // during MOX/TUNE. Deferring only the amplifier until unkey strands it on the | ||
| // old band. This schedule follows the radio; it does not sequence RF/relays. | ||
| [[nodiscard]] constexpr IoBoardAction ioBoardAction(bool connected, | ||
| bool throttleActive, | ||
| bool bandChanged) noexcept | ||
| { | ||
| if (!connected) { | ||
| return IoBoardAction::DropDisconnected; | ||
| } | ||
| if (throttleActive && !bandChanged) { | ||
| return IoBoardAction::Coalesce; | ||
| } | ||
| return IoBoardAction::Send; | ||
| } | ||
|
|
||
| // Pending work belongs to the current scheduling window. An immediate band | ||
| // change supersedes a same-band value waiting in the previous window. | ||
| class IoBoardSchedule { | ||
| public: | ||
| [[nodiscard]] IoBoardAction request(bool connected, bool throttleActive, | ||
| bool bandChanged, std::uint64_t hz) noexcept | ||
| { | ||
| const IoBoardAction action = ioBoardAction(connected, throttleActive, bandChanged); | ||
| m_pendingHz = action == IoBoardAction::Coalesce ? hz : 0; | ||
| return action; | ||
| } | ||
|
|
||
| [[nodiscard]] std::uint64_t takePending() noexcept | ||
| { | ||
| return std::exchange(m_pendingHz, 0); | ||
| } | ||
|
|
||
| void reset() noexcept { m_pendingHz = 0; } | ||
|
|
||
| private: | ||
| std::uint64_t m_pendingHz = 0; | ||
| }; | ||
|
|
||
| } // namespace AetherSDR::hl2 |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.