Skip to content

feat: add 3.3GHz SX33 VTX frequency group support with IRC TRUMP protocol#1

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779060901-vtx-3g3-sx33-firmware
Open

feat: add 3.3GHz SX33 VTX frequency group support with IRC TRUMP protocol#1
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779060901-vtx-3g3-sx33-firmware

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Adds a new 3.3 GHz frequency group (FREQUENCYGROUP_3G3) for the SX33 video transmitter using IRC TRUMP protocol. This includes:

  • Frequency table: 5 bands (A–E) × 8 channels, covering 3200–3700 MHz, plus power levels 25/2000/5000 mW (vtx_string.c/h)
  • TRAMP driver integration: band/channel→frequency lookup, OSD info, and power metadata for 3.3 GHz in vtx_tramp.c/h
  • MSP commands: MSP2_INAV_VTX_TABLE_CUSTOM (0x2F00) to read the table, MSP2_INAV_SET_VTX_TABLE_CUSTOM (0x2F01) to set band/channel/power and switch to the 3.3 GHz frequency group
  • Logic condition: LOGIC_CONDITION_SET_VTX_CUSTOM_SLOT (57) for in-flight channel switching via programmable logic, encoding slot as (band-1)*8 + channel with power index in operandB

A companion configurator PR adds the UI (Load Grid button, vtx_table_sx33.json, MSP handling).

Review & Testing Checklist for Human

  • Verify frequency table values match actual SX33 hardware specification — all 40 frequencies are hardcoded and cannot be validated without the SX33 datasheet. Incorrect values would tune the VTX to wrong frequencies.
  • MSP OUT handler hardcodes magic numbersfc_msp.c writes 5, 8, 3, 25, 2000, 5000 as literals instead of referencing VTX_STRING_3G3_* defines. If the table dimensions change, these will silently diverge.
  • OSD band/channel index boundsimpl_GetOsdInfo accesses vtx3G3BandNames[vtxState.request.band] without bounds checking. If band > 5, this is an out-of-bounds read. (Same pre-existing risk exists for 1.3/5.8 GHz paths, but worth noting.)
  • SET_VTX_TABLE_CUSTOM unconditionally sets frequencyGroup = FREQUENCYGROUP_3G3 — there is no way to revert to 5.8 GHz via this command path. Confirm this is intentional.
  • Build and flash to SPEEDYBEEF405WING — this code has not been compiled. Verify it builds cleanly for the target and test VTX communication with an SX33 transmitter.

Notes

  • The MSP SET command (0x2F01) is named "SET_VTX_TABLE_CUSTOM" but it actually sets a single band/channel/power slot, not a full table. The naming may be confusing for future maintainers.
  • LOGIC_CONDITION_SET_VTX_CUSTOM_SLOT hardcodes the max power check (operandB <= 3) instead of using VTX_TRAMP_3G3_MAX_POWER_COUNT.
  • No vtx3G3_Freq2Bandchan() reverse-lookup function is provided (unlike 5.8 GHz which has vtx58_Freq2Bandchan). This may be needed later if frequency-based channel identification is required.

Link to Devin session: https://app.devin.ai/sessions/93535a1b2e7847b9b23a2e1396a0bcb2
Requested by: @mailform2022

…ocol

- Add FREQUENCYGROUP_3G3 enum to vtx_common.h
- Add 3.3GHz frequency table (5 bands, 8 channels) to vtx_string.c/h
- Add vtx3G3_Bandchan2Freq() conversion function
- Add 3.3GHz power tables (25/2000/5000 mW) to vtx_tramp.c/h
- Update impl_SetBandAndChannel() for 3.3GHz frequency group
- Update vtxProtoUpdatePowerMetadata() for 3.3GHz
- Add MSP2_INAV_VTX_TABLE_CUSTOM (0x2F00) and MSP2_INAV_SET_VTX_TABLE_CUSTOM (0x2F01)
- Add MSP handler for custom VTX table read/write in fc_msp.c
- Add LOGIC_CONDITION_SET_VTX_CUSTOM_SLOT (57) for in-flight channel switching

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

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