-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support custom Tramp power levels and AUX pit mode #11887
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
Open
Raffi1202
wants to merge
8
commits into
iNavFlight:maintenance-10.x
Choose a base branch
from
Raffi1202:fix/tramp-custom-power-pitmode
base: maintenance-10.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ec6ea3b
Support custom Tramp power levels and AUX pit mode
Raffi1202 d79d4d4
vtx: fix the pit mode switch that never appeared, and stop it starvin…
f01c881
Merge current maintenance-10.x and resolve PR #11887 conflicts
Raffi1202 2671dd7
Fix Tramp pit-mode lifecycle and preserve VTX settings
Raffi1202 9ddf907
Provide ELF section boundaries for PG migration host tests
Raffi1202 43e8b72
Wait for Tramp power capabilities before publishing custom levels
Raffi1202 5c51bee
Refresh CMS power capabilities and fairly schedule Tramp updates
Raffi1202 4865f05
Offer the VTX pit mode box after all existing boxes
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
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 |
|---|---|---|
|
|
@@ -18,3 +18,5 @@ | |
| #pragma once | ||
|
|
||
| extern const CMS_Menu cmsx_menuVtxControl; | ||
|
|
||
| void cmsVtxUpdatePowerMetadata(void); | ||
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,41 @@ | ||
| #pragma once | ||
|
|
||
| #include <stddef.h> | ||
| #include <string.h> | ||
| #include "config/parameter_group.h" | ||
| #include "config/parameter_group_ids.h" | ||
| #include "io/vtx.h" | ||
|
|
||
| // Version 2 placed frequencyGroup immediately after maxPowerOverride. | ||
| // Version 3 inserts the optional Tramp table before frequencyGroup. | ||
| typedef struct vtxSettingsConfigV2_s { | ||
| uint8_t band; | ||
| uint8_t channel; | ||
| uint8_t power; | ||
| uint16_t pitModeChan; | ||
| uint8_t lowPowerDisarm; | ||
| uint16_t maxPowerOverride; | ||
| uint8_t frequencyGroup; | ||
| } vtxSettingsConfigV2_t; | ||
|
|
||
| static inline bool pgMigrateVtxSettings(const pgRegistry_t *reg, void *to, | ||
| const void *from, int size, int version) | ||
| { | ||
| if (pgN(reg) != PG_VTX_SETTINGS_CONFIG || pgVersion(reg) != 3 || version != 2 || | ||
| pgSize(reg) != sizeof(vtxSettingsConfig_t) || size != sizeof(vtxSettingsConfigV2_t)) { | ||
| return false; | ||
| } | ||
| // Copy from potentially unaligned EEPROM data through a local old record. | ||
| vtxSettingsConfigV2_t old; | ||
| memcpy(&old, from, sizeof(old)); | ||
| vtxSettingsConfig_t *dest = (vtxSettingsConfig_t *)to; | ||
| dest->band = old.band; | ||
| dest->channel = old.channel; | ||
| dest->power = old.power; | ||
| dest->pitModeChan = old.pitModeChan; | ||
| dest->lowPowerDisarm = old.lowPowerDisarm; | ||
| dest->maxPowerOverride = old.maxPowerOverride; | ||
| dest->frequencyGroup = old.frequencyGroup; | ||
| memset(dest->trampPowerLevels, 0, sizeof(dest->trampPowerLevels)); | ||
| return true; | ||
| } |
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
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.