Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Jan 22, 2026

PR Type

Enhancement


Description

  • Remove unused invertedCardDetection setting from blackbox configuration

  • Delete related documentation and YAML configuration entries

  • Simplify blackbox config struct by removing obsolete field


Diagram Walkthrough

flowchart LR
  A["blackboxConfig_t struct"] -->|remove field| B["invertedCardDetection removed"]
  C["settings.yaml config"] -->|remove entry| B
  D["Settings.md documentation"] -->|remove section| B
Loading

File Walkthrough

Relevant files
Enhancement
blackbox.c
Remove invertedCardDetection initialization                           

src/main/blackbox/blackbox.c

  • Remove invertedCardDetection field initialization from
    PG_RESET_TEMPLATE macro
  • Simplify blackbox configuration structure
+0/-1     
blackbox.h
Remove invertedCardDetection struct field                               

src/main/blackbox/blackbox.h

  • Remove uint8_t invertedCardDetection field from blackboxConfig_s
    typedef
  • Reduce struct size by eliminating unused configuration field
+0/-1     
Documentation
Settings.md
Remove sdcard_detect_inverted documentation                           

docs/Settings.md

  • Remove entire sdcard_detect_inverted setting documentation section
  • Delete explanation of SD card detection behavior and usage
    instructions
+0/-10   
Configuration changes
settings.yaml
Remove sdcard_detect_inverted YAML entry                                 

src/main/fc/settings.yaml

  • Remove sdcard_detect_inverted setting entry from blackbox
    configuration group
  • Delete field mapping, description, and conditional compilation flag
+0/-6     

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

sensei-hacker added a commit to sensei-hacker/inav_unofficial_targets that referenced this pull request Jan 22, 2026
PROBLEM:
PR iNavFlight#11276 modified blackboxConfig_s struct in blackbox.h without
incrementing version in blackbox.c, and the workflow didn't catch it.

ROOT CAUSE:
Script processed files independently:
- Checked blackbox.c → found PG_REGISTER but struct not in this file
- Checked blackbox.h → found struct change but no PG_REGISTER
- Never connected the two pieces together

SOLUTION:
1. Expand file list to include companions that contain PG_REGISTER
   (if blackbox.h changed, also check blackbox.c for PG_REGISTER)

2. Search ALL changed files for struct definitions
   (when checking PG_REGISTER in blackbox.c, search all changed
   files including blackbox.h for the struct)

3. Detect when struct changed but PG_REGISTER wasn't touched
   (empty old_version and new_version → version not incremented)

This correctly catches the most common bug: developer modifies struct
in header file but forgets to increment version in source file.
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.

2 participants