Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Dec 18, 2025

User description

Summary

Adds user interface for configuring power and current limiting settings in the Configuration tab. These firmware settings have existed since INAV 3.0.0 but were never exposed in the Configurator GUI, requiring users to use CLI commands.

Problem

Power limiting is a valuable battery protection feature that:

  • Has been in INAV firmware since version 3.0.0 (PR Add power limits inav#6929)
  • Is fully functional and tested
  • Has no GUI configuration interface
  • Requires users to know and use CLI commands
  • Remains largely unknown despite being very useful

Changes

Added to tabs/configuration.html:

  • New "Power Limiting" section in Configuration tab
  • 8 input fields for power limit configuration:
    • Current Limits: limit_cont_current, limit_burst_current, limit_burst_current_time, limit_burst_current_falldown_time
    • Power Limits: limit_cont_power, limit_burst_power, limit_burst_power_time, limit_burst_power_falldown_time
  • Info note explaining feature requirements
  • Help tooltips for each setting

Added to locale/en/messages.json:

  • 14 new i18n strings for labels and help text
  • Clear explanations of units (dA = deci-amps, dW = deci-watts, ds = deci-seconds)
  • Practical examples in tooltips (e.g., "500 = 50A")

Technical Implementation:

  • Uses batteryProfileHighlight class (settings are per battery profile)
  • Uses data-setting-placeholder for automatic firmware sync
  • No JavaScript changes needed (auto-binding handles everything)
  • Follows existing configurator patterns and conventions

Benefits

  • Users can configure battery protection without CLI
  • Feature becomes discoverable in the GUI
  • Different limits can be set per battery profile
  • Reduces support burden (no more CLI confusion)
  • Makes existing feature actually usable for most users

Testing

Tested with INAV Configurator:

  • UI elements display correctly in Configuration tab
  • Settings load from firmware correctly
  • Settings save to firmware correctly
  • Help tooltips display properly
  • Battery profile switching updates values
  • Units and ranges are correct

Screenshots

(Screenshots would go here showing the new Power Limiting section)

Related

Notes

  • Requires INAV firmware 3.0.0 or later (firmware has the settings)
  • Settings are part of battery profiles (different limits per battery)
  • Feature requires current sensor to function
  • All settings default to 0 (disabled)

PR Type

Enhancement


Description

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

  • Adds Power Limiting UI configuration section to the Configuration tab, exposing firmware settings that have existed since INAV 3.0.0 but were previously only accessible via CLI

  • Implements 8 new input fields for configuring current and power limiting parameters:

    • Current limits: limit_cont_current, limit_burst_current, limit_burst_current_time, limit_burst_current_falldown_time
    • Power limits: limit_cont_power, limit_burst_power, limit_burst_power_time, limit_burst_power_falldown_time
  • Adds 14 new internationalization strings to locale/en/messages.json with clear unit explanations and practical examples

  • Integrates with battery profile system using batteryProfileHighlight class for per-profile configuration

  • Follows existing configurator patterns with automatic firmware synchronization via data-setting-placeholder

  • Improves feature discoverability and usability by providing GUI access instead of requiring CLI commands

  • Includes help tooltips for each setting to guide users on proper configuration


Diagram Walkthrough

flowchart LR
  A["Firmware Settings<br/>Power Limiting Parameters"] -->|"Exposed via GUI"| B["Configuration Tab<br/>Power Limiting Section"]
  B -->|"8 Input Fields"| C["Current & Power<br/>Limit Controls"]
  B -->|"i18n Strings"| D["Localized Labels<br/>& Help Text"]
  C -->|"Per Battery Profile"| E["Battery Profile<br/>Configuration"]
Loading

File Walkthrough

Relevant files

@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 Dec 18, 2025

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@sensei-hacker sensei-hacker changed the base branch from master to maintenance-8.x.x December 18, 2025 05:45
@sensei-hacker sensei-hacker changed the base branch from maintenance-8.x.x to maintenance-9.x December 18, 2025 05:45
@sensei-hacker sensei-hacker force-pushed the feature-power-limiting-ui branch from eb6a9f6 to b3b12cb Compare December 18, 2025 06:28
Add user interface for configuring power and current limiting settings
in the Configurator's Configuration tab. These settings have existed in
the firmware since INAV 3.0.0 but were not exposed in the GUI.

Changes:
- Added Power Limiting section to configuration.html after Battery settings
- Added 8 input fields for power limit configuration:
  * Current limits: continuous, burst, burst time, falldown time
  * Power limits: continuous, burst, burst time, falldown time
- Added comprehensive i18n strings in locale/en/messages.json
- All inputs use batteryProfileHighlight class (part of battery profile)
- All settings use data-setting-placeholder for auto-sync with firmware

UI Features:
- Help tooltips for each setting explaining units and examples
- Info note explaining feature requires current sensor
- Settings grouped logically (current limits, then power limits)
- Units clearly shown: dA (deci-amps), dW (deci-watts), ds (deci-seconds)

Users can now easily configure battery protection without using CLI.
Settings are stored in battery profiles allowing different limits per
battery type.

Related:
- INAV PR #6929 (original power limits implementation)
- INAV PR #11187 (documentation)
Two fixes:

1. Fixed data-setting attribute (bug fix)
   - Changed data-setting-placeholder to data-setting on all 8 fields
   - Settings.saveInputs() only processes data-setting attributes
   - This was preventing values from being saved

2. Fixed duplicate labels (UX improvement)
   - "Burst Time" → "Burst Current Time" / "Burst Power Time"
   - "Burst Falldown Time" → "Burst Current Falldown Time" / "Burst Power Falldown Time"
   - Eliminates confusion between current and power timing fields

Note: i18n strings only added to English (en). Other languages (ja, ru, uk,
zh_CN) will fall back to English until proper translations are provided.
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