Skip to content

Conversation

@skorya
Copy link

@skorya skorya commented Jan 26, 2026

PR Type

Bug fix


Description

This description is generated by an AI tool. It may have inaccuracies

  • Updated SmartAudio power level names to match actual transmitter values

  • Corrected frequency range limits from 5000-5999 MHz to 1000-8000 MHz

  • Fixed 5.8GHz band A frequency table with corrected channel frequencies


Diagram Walkthrough

flowchart LR
  A["SmartAudio Config"] --> B["Power Levels"]
  A --> C["Frequency Ranges"]
  A --> D["Band A Frequencies"]
  B --> B1["Updated names: 25-3000mW"]
  C --> C1["Expanded: 1000-8000MHz"]
  D --> D1["Corrected: 6110-6250MHz"]
Loading

File Walkthrough

Relevant files
Bug fix
vtx_smartaudio.c
Updated SmartAudio power level names                                         

src/main/io/vtx_smartaudio.c

  • Removed placeholder "----" power level entry
  • Updated power names from "25", "200", "500", "800" to "25", "200",
    "500", "1000", "3000"
  • Adjusted spacing in power name strings for consistency
+1/-1     
vtx_smartaudio.h
Corrected frequency range limits                                                 

src/main/io/vtx_smartaudio.h

  • Changed minimum frequency from 5000 MHz to 1000 MHz
  • Changed maximum frequency from 5999 MHz to 8000 MHz
  • Expanded supported frequency range to cover broader spectrum
+2/-2     
vtx_string.c
Fixed 5.8GHz band A frequencies                                                   

src/main/io/vtx_string.c

  • Updated 5.8GHz band A frequency table with new channel frequencies
  • Changed from 5865-5725 MHz range to 6110-6250 MHz range
  • Corrected all eight channel frequencies for band A
+1/-1     

@github-actions
Copy link

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.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 26, 2026

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

Comment on lines 64 to 66
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"----", "25 ", "200 ", "500 ", "800 ", " "
"25", "200 ", "500 ", "1000 ", "3000 ", " "
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: To prevent a potential buffer overflow, shorten the power level strings in saPowerNames to a maximum of 4 characters. The sa21PowerNames buffer can only hold strings up to 4 characters plus a null terminator. [possible issue, importance: 10]

Suggested change
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"----", "25 ", "200 ", "500 ", "800 ", " "
"25", "200 ", "500 ", "1000 ", "3000 ", " "
};
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"25 ", "200 ", "500 ", "1000", "3000", " "
};

#define VTX_SMARTAUDIO_CHANNEL_COUNT (VTX_SMARTAUDIO_MAX_CHANNEL - VTX_SMARTAUDIO_MIN_CHANNEL + 1)

#define VTX_SMARTAUDIO_MAX_POWER_COUNT 5
#define VTX_SMARTAUDIO_DEFAULT_POWER_COUNT 4
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Update VTX_SMARTAUDIO_DEFAULT_POWER_COUNT from 4 to 5 to match the number of power levels in the saPowerNames array. [possible issue, importance: 7]

Suggested change
#define VTX_SMARTAUDIO_DEFAULT_POWER_COUNT 4
#define VTX_SMARTAUDIO_DEFAULT_POWER_COUNT 5

Comment on lines 64 to 66
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"----", "25 ", "200 ", "500 ", "800 ", " "
"25", "200 ", "500 ", "1000 ", "3000 ", " "
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Don’t remove the placeholder/sentinel entry if other code expects power level indices to start after it; keep a consistent “unknown/invalid” entry at index 0 (or update all index users accordingly). [Learned best practice, importance: 6]

Suggested change
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"----", "25 ", "200 ", "500 ", "800 ", " "
"25", "200 ", "500 ", "1000 ", "3000 ", " "
};
const char * saPowerNames[VTX_SMARTAUDIO_MAX_POWER_COUNT + 1] = {
"----", "25 ", "200 ", "500 ", "1000", "3000"
};

Comment on lines +40 to +41
#define VTX_SMARTAUDIO_MIN_FREQUENCY_MHZ 1000 //min freq in MHz
#define VTX_SMARTAUDIO_MAX_FREQUENCY_MHZ 8000 //max freq in MHz
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Tighten the allowed frequency range to match actual supported tables/hardware and avoid accepting invalid configuration values (or add explicit validation elsewhere before applying the frequency). [Learned best practice, importance: 5]

Suggested change
#define VTX_SMARTAUDIO_MIN_FREQUENCY_MHZ 1000 //min freq in MHz
#define VTX_SMARTAUDIO_MAX_FREQUENCY_MHZ 8000 //max freq in MHz
#define VTX_SMARTAUDIO_MIN_FREQUENCY_MHZ 1000 // min freq in MHz
#define VTX_SMARTAUDIO_MAX_FREQUENCY_MHZ 6250 // max freq in MHz (highest supported channel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant