Skip to content

Conversation

@geoffsim
Copy link
Contributor

@geoffsim geoffsim commented Oct 9, 2024

To compliment the iNav VTX updates, this change will allow the correct number of power levels to be selected in the configurator.

@geoffsim
Copy link
Contributor Author

geoffsim commented Oct 9, 2024

This may have a conflict with #2202. Min power needs to be 0 to allow 0mW. Current VTX support already checks for 0 and will reject it if not supported.

@mmosca mmosca merged commit db9d513 into iNavFlight:master Nov 17, 2024
@MrD-RC MrD-RC added this to the 8.0 milestone Nov 19, 2024
sensei-hacker added a commit to sensei-hacker/inav-configurator that referenced this pull request Dec 19, 2025
Resolves merge conflict in PR iNavFlight#2202 by adding support for dynamic
power_min from firmware while maintaining backward compatibility.

Changes:
- Added FC.VTX_CONFIG.power_min field (default 1)
- Updated MSPHelper.js to read power_min from firmware (INAV 9.1+)
- Added defensive buffer checking for backward compatibility with 9.0
- Falls back to device-type logic if firmware doesn't send power_min
  (MSP VTX: min=0, others: min=1)
- Resolved merge conflict in js/vtx.js by removing both POWER_MIN
  constant and getMinPower()/getMaxPower() functions
- Updated tabs/configuration.js to use FC.VTX_CONFIG.power_min instead
  of VTX.POWER_MIN

This implementation:
- Works with current firmware 9.0 (graceful fallback)
- Ready for future firmware 9.1 with power_min support
- Eliminates hardcoded device-type logic in configurator
- Maintains single source of truth in firmware

Related: iNavFlight#2202
Related: iNavFlight#2206
Related: iNavFlight/inav#10395

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

3 participants