* chores(flysky): separate AFHDS2A and AFHDS3 into 2 different module type This should allow to remove some of the hacks added earlier. * chore: Add some EL18 CI bits * fix(afhds): cmake defs * fix(ci): add el18 to commit-tests.sh * chore(cpn): separate AFHDS2A and AFHDS3 * chore(cpn): remove binary import of afhds and legacy fxFreq field for afhds3 * fix(cpn): limit available internal afhds protocols to those supported by hardware * chore(cpn): update Flysky int module test * fix(cpn): compile error * fix(cpn): afhds2a max channels * fix: TR_MODULE_PROTOCOLS * enh(cpn): more support for afhds2a and 3 * fix(cpn): rebase compile error * fix(cpn): bit indexes * fix(cpn): emi toString * fix(cpn): limit available internal afhds protocols to those supported by hardware * enh(cpn): add support for Flysky EL18 * fix(cpn): available protocols * fix(cpn): rebase moduledata * chore(cpn): add module fields to model print * Separate AFHDS2A and AFHDS3 UI settings. * Fix AFHDS3 conversion from old subtype value. Fix 'Channel Range' layout on portrait LCD. * Fix name. --------- Co-authored-by: Peter Feerick <peter.feerick@gmail.com> Co-authored-by: elecpower <neilh713@tpg.com.au> Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
Hardware Definitions
The Python scripts in this directory are responsible for 2 different tasks:
- generating a JSON definition file for each target,
- and generating different include files used to describe the hardware to the software.
While the exact format is still moving, the goal of this file is to replace the various hardware definitions used in EdgeTx at various places and offer a simpler way to define new targets.
At the end of the process, the JSON definition will be the master copy used by:
- radio firmware,
- radio simlator,
- and Companion.
JSON Definition
Currently, the JSON definition file is still generated during the build process using
the target's hal.h and various Python scripts:
-
generate_hw_def.py: command line to generate JSON file as well as process the JSON file into include files. -
hal_json.py: reads the#define ...definitions coming fromhal.hinto a dictionary (AVPs). -
hal_adc.py: parse ADC definitions and related analog inputs. -
legacy_names.py: hard-coded definitions providing additional information not present inhal.hrelated to analog inputs (by target; mostly names and labels). -
pot_config.py: provides default configuration of pots and sliders for each target. -
hal_keys.py: parse keys & trims. -
hal_switches.py: parse switches. -
switch_config.py: default switch configuration (all targets) as well as display positions (onlystdlcdtargets).
Once the format is stable enough and does not require editing each target separately
to add or rename each attribute, the JSON definition for each target will be generated
and added to version control. Then the Python scripts will obsoleted and removed. The
target's hal.h should be cleaned-up as well with the definitions present in JSON removed.