Skip to content

Commit

Permalink
Merge pull request #36 from maartentamboer/feature/add-adf-encoder
Browse files Browse the repository at this point in the history
Add adf encoder
  • Loading branch information
maartentamboer authored Mar 5, 2021
2 parents 8ab9ebe + 333d312 commit eff674d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Configurations/config_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,46 @@
"alternate_event_down": "NAV1_RADIO_FRACT_DEC",
"event_short_press": "{alternate}",
"event_long_press": "NAV1_RADIO_SWAP"
},
{
"index": 7,
"event_up": {
"type": "condition",
"event": [ "{% if data.get_global_variable('ADF_SELECTION') == 100 %}",
"{{ data.trigger_event('ADF_100_INC', 1) }}",
"{% elif data.get_global_variable('ADF_SELECTION') == 10 %}",
"{{ data.trigger_event('ADF_10_INC', 1) }}",
"{% else %}",
"{{ data.trigger_event('ADF_1_INC', 1) }}",
"{% endif %}" ]
},
"event_down": {
"type": "condition",
"event": [ "{% if data.get_global_variable('ADF_SELECTION') == 100 %}",
"{{ data.trigger_event('ADF_100_DEC', 1) }}",
"{% elif data.get_global_variable('ADF_SELECTION') == 10 %}",
"{{ data.trigger_event('ADF_10_DEC', 1) }}",
"{% else %}",
"{{ data.trigger_event('ADF_1_DEC', 1) }}",
"{% endif %}" ]
},
"event_press": {
"type": "condition",
"event": [ "{% if data.get_global_variable('ADF_SELECTION') == 1 %}",
"{{ data.print('ADF_SELECTION 10') }}",
"{{ data.set_global_variable('ADF_SELECTION', 10) }}",
"{{ data.set_encoder_led_value(7, 7) }}",
"{% elif data.get_global_variable('ADF_SELECTION') == 10 %}",
"{{ data.print('ADF_SELECTION 100') }}",
"{{ data.set_global_variable('ADF_SELECTION', 100) }}",
"{{ data.set_encoder_led_value(7, 13) }}",
"{% else %}",
"{{ data.print('ADF_SELECTION 1') }}",
"{{ data.set_global_variable('ADF_SELECTION', 1) }}",
"{{ data.set_encoder_led_value(7, 1) }}",
"{% endif %}" ],
"description": "Change ADF mode to a different setting"
}
}
],
"buttons": [
Expand Down

0 comments on commit eff674d

Please sign in to comment.