Add DEFAULT_FEATURES to 8 targets with no default feature set#11705
Open
sensei-hacker wants to merge 1 commit into
Open
Add DEFAULT_FEATURES to 8 targets with no default feature set#11705sensei-hacker wants to merge 1 commit into
sensei-hacker wants to merge 1 commit into
Conversation
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.
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Test firmware build ready — commit Download firmware for PR #11705 243 targets built. Find your board's
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ANYFC, ANYFCM7, FF_FORTINIF4, FLYCOLORF4, FLYWOOF7DUAL, FOXEERF405, FOXEERF722DUAL, and FOXEERF722V4 had no
DEFAULT_FEATURESmacro at all in theirtarget.h, which falls back to 0 (every optional feature off) perfc/config.c's#ifndefdefault. 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):FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL— no OSD chip present, no flash for blackboxFEATURE_OSD | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX— noFEATURE_CURRENT_METER: this board has no current-sense ADC channel defined at allFEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_TX_PROF_SEL— deliberately omitsFEATURE_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'stargetConfiguration()already conditionally setsFEATURE_OSDat runtime based on detected hardware revision, so setting it unconditionally here would be wrong for rev 1 boardsFEATURE_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 presentThe 6-feature combination used on 6 of the 8 targets is the single most common
DEFAULT_FEATURESpattern across the whole INAV target tree (84 of 233 targets that define it), and matches the AXISFLYINGH743PRO precedent exactly.Testing
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 allbeforehand; none show any finding afterward.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).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.