Skip to content

Conversation

@dergagi
Copy link

@dergagi dergagi commented Jul 27, 2025

Important considerations when opening a pull request:

  1. Make sure you do not make the changes you want to open a pull request for on the master branch of your fork, or open the pull request from the master branch of your fork. Some of our integrations will fail if you do this, resulting in your pull request not being accepted. If this is your first pull request, it is probably a good idea to first read up on how opening pull requests work (https://opensource.com/article/19/7/create-pull-request-github is a good introduction);

  2. Pull requests will only be accepted if they are opened against the master branch of our repository. Pull requests opened against other branches without prior consent from the maintainers will be closed;

  3. Please follow the coding style guidelines: https://github.com/betaflight/betaflight/blob/master/docs/development/CodingStyle.md

  4. Keep your pull requests as small and concise as possible. One pull request should only ever add / update one feature. If the change that you are proposing has a wider scope, consider splitting it over multiple pull requests. In particular, pull requests that combine changes to features and one or more new targets are not acceptable.

  5. Ideally, a pull request should contain only one commit, with a descriptive message. If your changes use more than one commit, rebase / squash them into one commit before submitting a pull request. If you need to amend your pull request, make sure that the additional commit has a descriptive message, or - even better - use git commit --amend to amend your original commit.

  6. All pull requests are reviewed. Be ready to receive constructive criticism, and to learn and improve your coding style. Also, be ready to clarify anything that isn't already sufficiently explained in the code and text of the pull request, and to defend your ideas.

  7. We use continuous integration (CI) with Travis to build all targets and run the test suite for every pull request. Pull requests that fail any of the builds or fail tests will most likely not be reviewed before they are fixed to build successfully and pass the tests. In order to get a quick idea if there are things that need fixing before opening a pull request or pushing an update into an existing pull request, run make pre-push to run a representative subset of the CI build. Note: This is not an exhaustive test (which will take hours to run on any desktop type system), so even if this passes the CI build might still fail.

  8. If your pull request is a fix for one or more issues that are open in GitHub, add a comment to your pull request, and add the issue numbers of the issues that are fixed in the form Fixes #<issue number>. This will cause the issues to be closed when the pull request is merged;

  9. Remove this Text :).

Summary by CodeRabbit

  • New Features
    • Added new FPV freestyle rate presets for firmware versions 4.3, 4.4, and 4.5, including optional configurations for Actual rates and Cinematic/HD smooth flight modes.
  • Chores
    • Introduced a new file containing a cryptographic hash value for internal reference.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2025

Walkthrough

Three new preset configuration files for FPV freestyle drone rates have been added, each targeting Betaflight firmware versions 4.3, 4.4, and 4.5. Each preset provides base Betaflight rate settings, with optional configurations for Actual rates and a cinematic/HD mode. Additionally, a new file containing a cryptographic hash has been introduced.

Changes

File(s) Change Summary
index_hash.txt Added a new file containing a 64-character hexadecimal cryptographic hash.
presets/4.3/rates/GagiFPVFreeStyle.txt
presets/4.4/rates/GagiFPVFreeStyle.txt
presets/4.5/rates/GagiFPVFreeStyle.txt
Added new preset configuration files for FPV freestyle drone rates, each with base and optional rate profiles, metadata, and warnings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PresetSystem

    User->>PresetSystem: Selects GagiFPVFreeStyle preset (for 4.3/4.4/4.5)
    PresetSystem->>PresetSystem: Apply base Betaflight rates
    alt Optional: Actual Rates selected
        PresetSystem->>PresetSystem: Apply Actual rates configuration
    end
    alt Optional: Cinematic/HD selected
        PresetSystem->>PresetSystem: Apply Cinematic/HD configuration
    end
    PresetSystem->>User: Confirm applied rates
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny with code in its paws,
Hops through presets without a pause.
Freestyle rates for every flight,
Cinematic or quick as light!
With hashes secure and options anew,
This update’s for pilots—both old and new.
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
presets/4.4/rates/GagiFPVFreeStyle.txt (1)

1-52: Same observations as the 4.3 copy – file is byte-for-byte identical, so the consolidation & include-path comments apply here as well.

presets/4.5/rates/GagiFPVFreeStyle.txt (1)

1-52: Same observations as the 4.3 copy – file is byte-for-byte identical, so the consolidation & include-path comments apply here as well.

🧹 Nitpick comments (1)
presets/4.3/rates/GagiFPVFreeStyle.txt (1)

1-16: Avoid triple-duplication of an identical preset across 4.3/4.4/4.5 directories

Because the header already declares support for all three firmware versions, a single copy (e.g. in presets/4.3/rates/) is sufficient.
Keeping three verbatim files increases future maintenance cost and the risk of the versions drifting.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6183f46 and d612bc7.

📒 Files selected for processing (4)
  • index_hash.txt (1 hunks)
  • presets/4.3/rates/GagiFPVFreeStyle.txt (1 hunks)
  • presets/4.4/rates/GagiFPVFreeStyle.txt (1 hunks)
  • presets/4.5/rates/GagiFPVFreeStyle.txt (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: Jaz7Mutant
PR: betaflight/firmware-presets#512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:118-119
Timestamp: 2025-06-20T20:39:08.723Z
Learning: In Betaflight firmware presets, rates defaults from presets/4.3/rates/defaults.txt are used across multiple firmware versions including 4.5, as the file explicitly declares support for firmware versions 4.3, 4.4, and 4.5. There is no separate defaults.txt file in presets/4.5/rates/ directory.
Learnt from: bensonk
PR: betaflight/firmware-presets#509
File: presets/4.5/osd/bensonk.txt:138-152
Timestamp: 2025-05-25T22:26:17.328Z
Learning: BrainFPV commands in Betaflight preset files are safely ignored on non-BrainFPV flight controllers, making it safe to include them in presets even when they might be applied to different hardware.
Learnt from: Jaz7Mutant
PR: betaflight/firmware-presets#512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:1-8
Timestamp: 2025-06-20T18:08:54.334Z
Learning: In Betaflight firmware preset files, embedded double quotes in metadata fields like TITLE and KEYWORDS (e.g., `5"`, `3" to 5"`, `8"/9"`) are standard and do not need escaping. The preset parser handles this syntax correctly as evidenced by widespread usage throughout the codebase.
presets/4.3/rates/GagiFPVFreeStyle.txt (3)

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:118-119
Timestamp: 2025-06-20T20:39:08.723Z
Learning: In Betaflight firmware presets, rates defaults from presets/4.3/rates/defaults.txt are used across multiple firmware versions including 4.5, as the file explicitly declares support for firmware versions 4.3, 4.4, and 4.5. There is no separate defaults.txt file in presets/4.5/rates/ directory.

Learnt from: bensonk
PR: #509
File: presets/4.5/osd/bensonk.txt:138-152
Timestamp: 2025-05-25T22:26:17.328Z
Learning: BrainFPV commands in Betaflight preset files are safely ignored on non-BrainFPV flight controllers, making it safe to include them in presets even when they might be applied to different hardware.

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:1-8
Timestamp: 2025-06-20T18:08:54.334Z
Learning: In Betaflight firmware preset files, embedded double quotes in metadata fields like TITLE and KEYWORDS (e.g., 5", 3" to 5", 8"/9") are standard and do not need escaping. The preset parser handles this syntax correctly as evidenced by widespread usage throughout the codebase.

presets/4.4/rates/GagiFPVFreeStyle.txt (3)

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:118-119
Timestamp: 2025-06-20T20:39:08.723Z
Learning: In Betaflight firmware presets, rates defaults from presets/4.3/rates/defaults.txt are used across multiple firmware versions including 4.5, as the file explicitly declares support for firmware versions 4.3, 4.4, and 4.5. There is no separate defaults.txt file in presets/4.5/rates/ directory.

Learnt from: bensonk
PR: #509
File: presets/4.5/osd/bensonk.txt:138-152
Timestamp: 2025-05-25T22:26:17.328Z
Learning: BrainFPV commands in Betaflight preset files are safely ignored on non-BrainFPV flight controllers, making it safe to include them in presets even when they might be applied to different hardware.

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:1-8
Timestamp: 2025-06-20T18:08:54.334Z
Learning: In Betaflight firmware preset files, embedded double quotes in metadata fields like TITLE and KEYWORDS (e.g., 5", 3" to 5", 8"/9") are standard and do not need escaping. The preset parser handles this syntax correctly as evidenced by widespread usage throughout the codebase.

presets/4.5/rates/GagiFPVFreeStyle.txt (3)

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:118-119
Timestamp: 2025-06-20T20:39:08.723Z
Learning: In Betaflight firmware presets, rates defaults from presets/4.3/rates/defaults.txt are used across multiple firmware versions including 4.5, as the file explicitly declares support for firmware versions 4.3, 4.4, and 4.5. There is no separate defaults.txt file in presets/4.5/rates/ directory.

Learnt from: bensonk
PR: #509
File: presets/4.5/osd/bensonk.txt:138-152
Timestamp: 2025-05-25T22:26:17.328Z
Learning: BrainFPV commands in Betaflight preset files are safely ignored on non-BrainFPV flight controllers, making it safe to include them in presets even when they might be applied to different hardware.

Learnt from: Jaz7Mutant
PR: #512
File: presets/4.5/tune/basher_jazzmutant_tune.txt:1-8
Timestamp: 2025-06-20T18:08:54.334Z
Learning: In Betaflight firmware preset files, embedded double quotes in metadata fields like TITLE and KEYWORDS (e.g., 5", 3" to 5", 8"/9") are standard and do not need escaping. The preset parser handles this syntax correctly as evidenced by widespread usage throughout the codebase.

🔇 Additional comments (2)
index_hash.txt (1)

1-1: Validate index_hash.txt is regenerated by the CI tooling, not hand-edited

If this hash is meant to reflect the state of the preset index, commit it only through the prescribed make index (or equivalent) automation. A stale or manually-altered value silently breaks integrity checks.

presets/4.3/rates/GagiFPVFreeStyle.txt (1)

18-18: Hard-coded include path may break if directory layout changes

#$ INCLUDE: presets/4.3/rates/defaults.txt relies on an absolute path from repo root.
Confirm this is the accepted convention; otherwise prefer a relative include (../defaults.txt) to keep the file relocatable.

@limonspb
Copy link
Member

please read this doc:
https://github.com/betaflight/firmware-presets?tab=readme-ov-file#firmware-presets
it will prevent any mistakes. Just a few i noticed from the first glance:

  1. index files should not be added to PR
  2. identation
  3. no need to add same file in all versions folders

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.

2 participants