feat: More flexible ADC inputs (#3870)

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
Raphael Coeffic
2023-11-02 11:07:53 +10:00
committed by GitHub
co-authored by 3djc Peter Feerick philmoz
parent f5593c44e8
commit b48e07026d
78 changed files with 1291 additions and 773 deletions
+2 -7
View File
@@ -4,8 +4,7 @@
//
{% set main_inputs = adc_inputs.inputs | selectattr('type', '==', 'STICK') | list %}
{% set pot_inputs = adc_inputs.inputs | selectattr('type', '==', 'POT') | list %}
{% set axis_inputs = adc_inputs.inputs | selectattr('type', '==', 'AXIS') | list %}
{% set flex_inputs = adc_inputs.inputs | selectattr('type', '==', 'FLEX') | list %}
struct legacy_input_t {
const char* legacy;
@@ -17,12 +16,8 @@ static const legacy_input_t _legacy_inputs[] = {
{% set li = legacy_inputs[input.name] %}
{ "{{ li.yaml }}", MIXSRC_FIRST_STICK + {{ loop.index0 }} },
{% endfor %}
{% for input in pot_inputs %}
{% for input in flex_inputs %}
{% set li = legacy_inputs[input.name] %}
{ "{{ li.yaml }}", MIXSRC_FIRST_POT + {{ loop.index0 }} },
{% endfor %}
{% for input in axis_inputs %}
{% set li = legacy_inputs[input.name] %}
{ "{{ li.yaml }}", MIXSRC_FIRST_AXIS + {{ loop.index0 }} },
{% endfor %}
};