Skip to content

Add DEFAULT_FEATURES to 8 targets with no default feature set#11705

Open
sensei-hacker wants to merge 1 commit into
iNavFlight:release/9.1from
sensei-hacker:fix/default-features-missing-8-targets
Open

Add DEFAULT_FEATURES to 8 targets with no default feature set#11705
sensei-hacker wants to merge 1 commit into
iNavFlight:release/9.1from
sensei-hacker:fix/default-features-missing-8-targets

Conversation

@sensei-hacker

Copy link
Copy Markdown
Member

Summary

ANYFC, ANYFCM7, FF_FORTINIF4, FLYCOLORF4, FLYWOOF7DUAL, FOXEERF405, FOXEERF722DUAL, and FOXEERF722V4 had no DEFAULT_FEATURES macro at all in their target.h, which falls back to 0 (every optional feature off) per fc/config.c's #ifndef default. This reads exactly like a hardware/wiring bug report (VBAT, current meter, OSD, telemetry all silently disabled out of the box) rather than a missing config default — same bug class already fixed on AXISFLYINGH743PRO (merged).

Changes

Added one #define DEFAULT_FEATURES (...) line to each of the 8 targets, with the feature set chosen per-target based on the hardware each board actually has (not copy-pasted):

  • ANYFC: FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL — no OSD chip present, no flash for blackbox
  • ANYFCM7: FEATURE_OSD | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX — no FEATURE_CURRENT_METER: this board has no current-sense ADC channel defined at all
  • FF_FORTINIF4: FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL — deliberately omits FEATURE_OSD/FEATURE_BLACKBOX: this board has two hardware revisions sharing one SPI3 CS pin between the MAX7456 (OSD, rev 2 only) and M25P16 flash (rev 1 only) chips; config.c's targetConfiguration() already conditionally sets FEATURE_OSD at runtime based on detected hardware revision, so setting it unconditionally here would be wrong for rev 1 boards
  • FLYCOLORF4, FLYWOOF7DUAL, FOXEERF405, FOXEERF722DUAL, FOXEERF722V4: FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX — all have OSD chip, current/voltage ADC channels, and flash chip present

The 6-feature combination used on 6 of the 8 targets is the single most common DEFAULT_FEATURES pattern across the whole INAV target tree (84 of 233 targets that define it), and matches the AXISFLYINGH743PRO precedent exactly.

Testing

  • Ran claude/agents/target-developer/scripts/check_default_features.py (a checker built for the AXISFLYINGH743PRO fix) before and after: all 8 targets showed [CERTAIN] no DEFAULT_FEATURES macro at all beforehand; none show any finding afterward.
  • Built all 8 targets from a clean rebuild after touching each target.h — 8/8 compiled and linked successfully with no compiler warnings or errors. No target exceeded its flash/RAM budget (tightest: FOXEERF722V4 at 95% FLASH1).
  • Hardware-in-the-loop testing not performed — no physical units of these boards available. Every feature bit added was verified against that target's actual hardware defines (USE_MAX7456, VBAT_ADC_CHANNEL, CURRENT_METER_ADC_CHANNEL, flash chip presence), not assumed from sibling boards.

Code Review

Reviewed with the inav-code-review agent — no critical or important issues found. The two non-obvious judgment calls (FF_FORTINIF4's hardware-revision-gated OSD/flash, ANYFCM7's missing current-sense channel) were independently re-verified against the actual source by the reviewer.

ANYFC, ANYFCM7, FF_FORTINIF4, FLYCOLORF4, FLYWOOF7DUAL, FOXEERF405,
FOXEERF722DUAL, and FOXEERF722V4 had no DEFAULT_FEATURES macro at all,
which falls back to 0 (every optional feature off) per fc/config.c's
#ifndef default. This reads like a hardware/wiring bug (VBAT, current
meter, OSD, telemetry silently disabled) rather than a missing config
default -- same bug class already fixed on AXISFLYINGH743PRO.

Feature sets were chosen per-target based on actual hardware present
(OSD chip, ADC channels, flash chip), matching the codebase-wide modal
DEFAULT_FEATURES convention. FF_FORTINIF4 and ANYFCM7 deliberately omit
features their hardware doesn't unconditionally support: FF_FORTINIF4
shares one SPI3 CS pin between its OSD chip and flash chip across two
mutually-exclusive hardware revisions, and ANYFCM7 has no current-sense
ADC channel wired at all.
@sensei-hacker sensei-hacker added this to the 9.1 milestone Jul 10, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions

Copy link
Copy Markdown

Test firmware build ready — commit 823ba47

Download firmware for PR #11705

243 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant