Skip to content

chore(fw): move more settings to JSON hw_defs files - #7866

Merged
pfeerick merged 10 commits into
mainfrom
philmoz/json-settings
Oct 6, 2026
Merged

pfeerick merged 10 commits into
mainfrom
philmoz/json-settings

Conversation

@philmoz

@philmoz philmoz commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Changes:

  • Move ROTARY_ENCODER_GRANULARITY to JSON. Optional, defaults to 2 if not overridden.
  • Use JSON for rotary encoder settings for all radios.
  • Move touch panel settings.
  • Move USB settings.
  • Move trainer settings.
  • Remove SPORT_MAX_BAUDRATE from hal.h files (without adding other defines)
  • Move SURFACE_RADIO

@philmoz philmoz added this to the 3.0 milestone Oct 5, 2026
@philmoz philmoz added compilation Related to compiling the firmware and firmware options firmware (fw) General radio firmware issue, not colorlcd or B&W specific labels Oct 5, 2026
philmoz and others added 10 commits October 6, 2026 03:28
Use JSON for rotary encoder settings for all radios.
Move touch panel settings.
Move USB settings.
Move trainer settings.
Add 'hardware' section to hal_settings.h.
Remove SPORT_MAX_BAUDRATE from hal.h files.
Remove the duplicate "trainer" section copied from TX16S, which
overrode the T18 pins (PC6/PC7 in/out, PB4 detect) with PC8/PC9/PA8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore EXTI15_10_IRQ_Priority to 5 as previously defined in
st16/hal.h.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JSON files and models.py use a boolean, not a string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore the #if !defined(USE_EXTIx_IRQ) guard the hal.h blocks had,
so two sections using the same EXTI group no longer redefine the
priority macro; the first definition wins as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The other hardware fields (CPU, CPU_TYPE, HAS_*, SURFACE) are unused by
the firmware, and generic names like CPU or SURFACE could clash with
identifiers elsewhere. CPU_TYPE is already defined by CMake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- V12: set has_audio_mute, as v12/hal.h defines AUDIO_MUTE_GPIO
- NB4P: set surface, as the firmware defines SURFACE_RADIO for it
- V16: add touch_int_exti_line/port/syscfgline, which horus/hal.h
  previously defined for every touch board

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Emit SURFACE_RADIO in hal_settings.h when the JSON hardware section
sets surface, and drop the hand-written defines for MT12 and NB4P.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
T15-H7 landed on main after this branch was started. Give it the same
treatment as T15 Pro, which it is based on: USB, trainer (plus its
detect pin) and touch settings move from hal.h to the JSON, and the
unused HAS_SPORT_UPDATE_CONNECTOR goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick
pfeerick force-pushed the philmoz/json-settings branch from ef048cd to 99164f3 Compare October 6, 2026 03:43
@pfeerick
pfeerick merged commit 10440e0 into main Oct 6, 2026
46 checks passed
@pfeerick
pfeerick deleted the philmoz/json-settings branch October 6, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compilation Related to compiling the firmware and firmware options firmware (fw) General radio firmware issue, not colorlcd or B&W specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants