Sync edgetx to Gitea
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// WARNING: DO NOT EDIT THIS FILE
|
||||
// This file has been generated from the target's JSON hardware description
|
||||
//
|
||||
|
||||
{% set regular_switches = switches | selectattr('is_cfs','==',False) | list %}
|
||||
{% set display_switches = regular_switches | selectattr('display','!=',None) | list %}
|
||||
|
||||
const hw_switch_def _switch_defs[] = {
|
||||
{% for switch in switches %}
|
||||
{% if switch.is_cfs %}
|
||||
{ "{{ switch.name }}", SWITCH_HW_{{ switch.type }}, SWITCH_{{ switch.default }}, true, {{ switch.cfs_idx }} },
|
||||
{% else %}
|
||||
{ "{{ switch.name }}", SWITCH_HW_{{ switch.type }}, SWITCH_{{ switch.default }} },
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
};
|
||||
|
||||
constexpr uint8_t n_switches = {{ switches | count }};
|
||||
|
||||
{% if display_switches | count > 0 %}
|
||||
const switch_display_pos_t _switch_display[] = {
|
||||
{% for sw in switches %}
|
||||
{% if sw.display %}
|
||||
{ {{ sw.display[0] }}, {{ sw.display[1] }} },
|
||||
{% else %}
|
||||
{ 0, 0 },
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
};
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user