maartentamboer / X-Touch-Mini-FS2020

Control FS2020 with a Behringer X-Touch Mini
https://dev-tty.nl/X-Touch-Mini-FS2020/
MIT License
59 stars 19 forks source link

Add documentation to modifiy configuration file #16

Closed JLD95 closed 3 years ago

JLD95 commented 3 years ago

Hi,

I have Logitech Yoke so I don't need fader to simulate speed brake. I try this config_a320.json:

{ "version": { "major": 1, "minor": 1, "patch": 0 }, "encoders": [ { "index": 1, "event_up": "KOHLSMAN_INC", "event_down": "KOHLSMAN_DEC", "event_press": "BAROMETRIC" }, { "index": 2, "event_up": "AP_SPD_VAR_INC", "event_down": "AP_SPD_VAR_DEC", "event_press": { "event": "SPEED_SLOT_INDEX_SET", "type": "manual", "value": 1, "description": "A32NX - set AP Speed Hold to selected mode" }, "event_long_press": { "event": "SPEED_SLOT_INDEX_SET", "type": "manual", "value": 2, "description": "A32NX - set AP Speed Hold to managed mode" } }, { "index": 3, "event_up": "HEADING_BUG_INC", "event_down": "HEADING_BUG_DEC", "event_press": { "event": "HEADING_SLOT_INDEX_SET", "type": "manual", "value": 1, "description": "A32NX - set AP Heading Hold to selected mode" }, "event_long_press": { "event": "HEADING_SLOT_INDEX_SET", "type": "manual", "value": 2, "description": "A32NX - set AP Heading Hold to managed mode" } }, { "index": 4, "event_up": "AP_ALT_VAR_INC", "event_down": "AP_ALT_VAR_DEC", "event_press": { "event": "ALTITUDE_SLOT_INDEX_SET", "type": "manual", "value": 1, "description": "A32NX - set AP Altitude Hold to selected mode" }, "event_long_press": { "event": "ALTITUDE_SLOT_INDEX_SET", "type": "manual", "value": 2, "description": "A32NX - set AP Altitude Hold to managed mode" } }, { "index": 5, "event_up": "AP_VS_VAR_INC", "event_down": "AP_VS_VAR_DEC", "alternate_event_up": "AP_VS_VAR_INC", "alternate_event_down": "AP_VS_VAR_DEC", "event_press": "AP_PANEL_VS_ON" } ], "buttons": [ { "index": 1, "event_press": [ "TOGGLE_FLIGHT_DIRECTOR", "AP_MASTER" ], "simvar_led": "AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE" }, { "index": 4, "event_press": "AP_MASTER", "simvar_led": "AUTOPILOT_MASTER" }, { "index": 5, "event_press": "AP_MASTER", "simvar_led": "AUTOPILOT_MASTER" }, { "index": 6, "event_press": "SPOILERS_ARM_TOGGLE", "simvar_led": "SPOILERS_ARMED" }, { "index": 10, "event_press": "AUTO_THROTTLE_ARM", "simvar_led": "AUTOPILOT_THROTTLE_ARM" }, { "index": 12, "event_press": "AP_LOC_HOLD", "simvar_led": "AUTOPILOT_NAV1_LOCK" }, { "index": 13, "event_press": "AP_APR_HOLD", "simvar_led": "AUTOPILOT_APPROACH_HOLD" } ], "faders": [ { "index": 1 } ], "triggers": [ { "simvar": "AUTOPILOT_VERTICAL_HOLD", "trigger_type": "encoder", "trigger_index": 5 } ] }

but at execution, I have this error:

C:\Utilitaires\MFS\X-Touch-Mini-FS2020>X-Touch-Mini-FS2020.exe Current aircraft: b'Airbus A320 Neo Air France' Loading config file: Configurations/config_a320.json Traceback (most recent call last): File "main.py", line 100, in File "main.py", line 63, in main_app File "configfile.py", line 35, in configure File "configfile.py", line 115, in _configure_faders KeyError: 'event_change' [15520] Failed to execute script main

So a little documentation will be nice. Another question: Idon'tknow where is Triggers ?

Thanks for tour help

jeremy-collette commented 3 years ago

Looking at your config I see: "faders": [ { "index": 1 } ]

I'm guessing that the issue is that there is an incomplete fader definition in the faders list? Can you try completely removing the definition like this: "faders": [ ]

Or just completely remove the faders object: "encoders": [ ... ], "triggers": [ ... ]

maartentamboer commented 3 years ago

Jeremy is correct, if there's no need for the faders you can leave the element empty.

"faders": [ ]

If that still does not fix it, feel free to reopen this issue

JLD95 commented 3 years ago

Hi,

"faders": [ ]

works fine . Thank you