| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
WalkthroughA new battery configuration page is introduced via a Lua script, defining UI layout, labels, and fields for voltage and capacity settings. The main pages list is updated to include the "Battery" page for API versions 1.41 and above, referencing the newly added script. No other logic is altered. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MainPages (pages.lua)
participant BatteryPage (battery.lua)
User->>MainPages: Open configuration menu
MainPages->>MainPages: Check apiVersion
alt apiVersion >= 1.41
MainPages->>BatteryPage: Load battery configuration page
BatteryPage->>User: Display battery settings UI
end
User->>BatteryPage: View or edit voltage/capacity fields
BatteryPage->>MainPages: Send read/write MSP commands as needed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review details Configuration used: CodeRabbit UI Reviewing files that changed from the base of the PR and between a76cd41 and 1acac3c. 📒 Files selected for processing (1)
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 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (.coderabbit.yaml)
Documentation and Community
|
Sorry, something went wrong.
Rebased with the latest commit and added spaces as requested, min API is now 1.41 |
Sorry, something went wrong.
Changed API to 1.41
|
Sorry I misunderstood the requested additional space, I thought it was meant for the strings, not for formatting. Fixed in 1acac3c |
Sorry, something went wrong.
There was a problem hiding this comment.
Lols yeah space was for indentation in line 17
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me 🙂
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds a page to the script where the following battery settings can be changed:
I wanted to add a button for applying LiPo and Li-Ion presets, but had too many problems with it, so I excluded it from the commit.
This PR would supersede #515, which uses a different approach and did not work for me.
I set it to minimum API v1.41, as this seems to be the level that BF4.0.0 was using, when the uint16 precision for battery voltage was introduced
Also is it possible to add a step value for the capacity input? So that it is changed in increments of 25 mAh instead of 1? I could not find anything about that in the code.
Closes #505
Summary by CodeRabbit