Skip to content

Commit

Permalink
fix: legacy import
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc committed Aug 9, 2023
1 parent 1d2974b commit 6252c6c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions radio/util/hw_defs/yaml_inputs.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 %}
};

0 comments on commit 6252c6c

Please sign in to comment.