Skip to content

Conversation

Forceu
Copy link
Contributor

@Forceu Forceu commented Oct 19, 2025

This PR requires a reboot when changing battery parameters.

Since the GUI doesn’t trigger a reboot, I initially assumed the changes would apply without one. However, I had to unplug my drone for the new settings to take effect.

Summary by CodeRabbit

  • Bug Fixes
    • Updated battery management system reboot configuration to improve system stability and handling of power-related scenarios.
Copy link

coderabbitai bot commented Oct 19, 2025

Walkthrough

The reboot field in the battery.lua module's exported configuration table is changed from false to true. This is a single-file configuration change with no other logic modifications.

Changes

Cohort / File(s) Summary
Battery configuration update
src/SCRIPTS/BF/PAGES/battery.lua
Changed reboot flag from false to true in the returned module configuration table

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • haslinghuis
  • klutvott123

Poem

🐰 A flag flips bright, from false to true,
The battery page knows what to do,
Reboot when ready, steady and sure,
Configuration complete, the fix is pure!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Require reboot when changing battery parameters" directly corresponds to the main change in the changeset, which modified the reboot flag from false to true in the battery.lua module. The title is concise (6 words, 47 characters), clear, and free of noise or vague terminology. It accurately summarizes the primary change in a way that would be immediately understood by someone reviewing the repository history.
Description Check ✅ Passed The pull request description adequately explains the change and provides context for why it was necessary. The author clarifies that the reboot flag modification is required because battery parameter changes do not take effect without a physical reboot, despite the GUI not explicitly triggering one. While the description is relatively brief, it conveys the essential information about the change's purpose and the practical experience that motivated it, meeting the baseline requirements for a pull request description in this repository.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44936c8 and ff383cc.

📒 Files selected for processing (1)
  • src/SCRIPTS/BF/PAGES/battery.lua (1 hunks)
🔇 Additional comments (1)
src/SCRIPTS/BF/PAGES/battery.lua (1)

26-26: Battery reboot requirement is appropriate and consistent with codebase patterns.

The verification shows that reboot = true is selectively applied to configurations with actual firmware requirements: battery.lua (now updated), pwm.lua, and failsafe.lua. Other modules retain reboot = false by design, and some (pid_advanced.lua, filters2.lua) use conditional logic based on specific parameter changes. The change aligns correctly with the established pattern—no updates needed elsewhere.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@haslinghuis haslinghuis added this to the 1.8 milestone Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants