From e7bc8663f82dd58a28bc3fb9271f1433fcb5b473 Mon Sep 17 00:00:00 2001 From: Krystian Lewandowski Date: Thu, 8 Apr 2021 11:47:49 +0200 Subject: [PATCH 1/2] CRJ --- Configurations/Functions/CRJ/events.user.txt | 68 +++++++++++++++ Configurations/config_crj.json | 90 ++++++++++---------- 2 files changed, 114 insertions(+), 44 deletions(-) create mode 100644 Configurations/Functions/CRJ/events.user.txt diff --git a/Configurations/Functions/CRJ/events.user.txt b/Configurations/Functions/CRJ/events.user.txt new file mode 100644 index 0000000..a33c231 --- /dev/null +++ b/Configurations/Functions/CRJ/events.user.txt @@ -0,0 +1,68 @@ +// use this file to add your user-defined events +// remove the .inactive extension +// afterwards, the file will not be touched by the next MobiFlight update +// +// encoders: +// +// 1. HDG +ASCRJ_FCP_HDG_CHANGE_INC#(L:ASCRJ_FCP_HDG_CHANGE, 1) ++ (>L:ASCRJ_FCP_HDG_CHANGE) +ASCRJ_FCP_HDG_CHANGE_DEC#(L:ASCRJ_FCP_HDG_CHANGE, 1) -- (>L:ASCRJ_FCP_HDG_CHANGE) +ASCRJ_FCP_HDG_SYNC_BTN#1 (>L:ASCRJ_FCP_HDG_SYNC_BTN) +// 2. BARO +ASCRJ_LSP_BARO_CHANGE_INC#(L:ASCRJ_LSP_BARO_CHANGE, 1) ++ (>L:ASCRJ_LSP_BARO_CHANGE) +ASCRJ_LSP_BARO_CHANGE_DEC#(L:ASCRJ_LSP_BARO_CHANGE, 1) -- (>L:ASCRJ_LSP_BARO_CHANGE) +ASCRJ_LSP_BARO_STD_BTN#1 (>L:ASCRJ_LSP_BARO_STD) +// 3. ALT +ASCRJ_FCP_ALT_CHANGE_INC#(L:ASCRJ_FCP_ALT_CHANGE, 1) ++ (>L:ASCRJ_FCP_ALT_CHANGE) +ASCRJ_FCP_ALT_CHANGE_DEC#(L:ASCRJ_FCP_ALT_CHANGE, 1) -- (>L:ASCRJ_FCP_ALT_CHANGE) +// 4. SPD +ASCRJ_FCP_SPEED_CHAN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_RANGE_CHANGE_INC#1 (>L:ASCRJ_LSP_RANGE_CHANGE) +ASCRJ_LSP_RANGE_CHANGE_DEC#-1 (>L:ASCRJ_LSP_RANGE_CHANGE) +// +// butons: +// +// 1. FD +ASCRJ_FCP_FD1_BTN#1 (>L:ASCRJ_FCP_FD1,Bool) +// 2. HDG +ASCRJ_FCP_HDG_BTN#1 (>L:ASCRJ_FCP_HDG,Bool) +// 3. ALT +ASCRJ_FCP_ALT_BTN#1 (>L:ASCRJ_FCP_ALT,Bool) +// 4. VS +ASCRJ_FCP_VS_BTN#(L:ASCRJ_FCP_VS,Bool) ! (>L:ASCRJ_FCP_VS,Bool) +// 5. APPR +ASCRJ_FCP_APPR_BTN#(L:ASCRJ_FCP_APPR,Bool) ! (>L:ASCRJ_FCP_APPR,Bool) +// 6. FRMT +// 7. TNWX +ASCRJ_GPWS_TERR_BTN#1 (>L:ASCRJ_GPWS_TERR) +// 8. FLAPS- +// 9. AP +ASCRJ_FCP_AP_BTN#(L:ASCRJ_FCP_AP_ENG,Bool) ! (>L:ASCRJ_FCP_AP_ENG,Bool) +// 10. LNAV +ASCRJ_FCP_NAV_BTN#(L:ASCRJ_FCP_NAV,Bool) ! (>L:ASCRJ_FCP_NAV,Bool) +// 11. VNAV +ASCRJ_FCP_VNAV_BTN#(L:ASCRJ_FCP_VNAV,Bool) ! (>L:ASCRJ_FCP_VNAV,Bool) +// 12. FLC +// 13. YD +ASCRJ_FCP_YD1_BTN#1 (>L:ASCRJ_YD1) +ASCRJ_FCP_YD2_BTN#1 (>L:ASCRJ_YD2) +// 14. BATT +ASCRJ_ELEC_BATT_BTN#(L:ASCRJ_ELEC_BATTMASTER,Bool) ! (>L:ASCRJ_ELEC_BATTMASTER,Bool) +// 15. GEAR +ASCRJ_GEAR_LEVER_BTN#(L:ASCRJ_GEAR_GEAR_LEVER,Bool) ! (>L:ASCRJ_GEAR_GEAR_LEVER,Bool) +// 16. FLAPS + diff --git a/Configurations/config_crj.json b/Configurations/config_crj.json index efbb0a6..d58edec 100644 --- a/Configurations/config_crj.json +++ b/Configurations/config_crj.json @@ -9,88 +9,89 @@ "encoders": [ { "index": 1, - "event_up": "HEADING_BUG_INC", - "event_down": "HEADING_BUG_DEC", - "event_press": { - "type": "condition-file", - "event": "Functions/Generic/heading-bug-sync.jinja2", - "description": "Set heading bug to current heading" - } + "event_up": { "event": "MobiFlight.ASCRJ_FCP_HDG_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_FCP_HDG_CHANGE_DEC", "type": "manual", "value": 1 }, + "event_press": { "event": "MobiFlight.ASCRJ_FCP_HDG_SYNC_BTN", "type": "manual", "value": 1 } }, { "index": 2, - "event_up": "KOHLSMAN_INC", - "event_down": "KOHLSMAN_DEC", - "event_press": "BAROMETRIC" + "event_up": { "event": "MobiFlight.ASCRJ_LSP_BARO_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_LSP_BARO_CHANGE_DEC", "type": "manual", "value": 1 }, + "event_press": { "event": "MobiFlight.ASCRJ_LSP_BARO_STD_BTN", "type": "manual", "value": 1 } }, { "index": 3, - "event_up": "AP_ALT_VAR_INC", - "event_down": "AP_ALT_VAR_DEC" + "event_up": { "event": "MobiFlight.ASCRJ_FCP_ALT_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_FCP_ALT_CHANGE_DEC", "type": "manual", "value": 1 } }, { "index": 4, - "event_up": "AP_SPD_VAR_INC", - "event_down": "AP_SPD_VAR_DEC", - "alternate_event_up": "AP_VS_VAR_INC", - "alternate_event_down": "AP_VS_VAR_DEC" + "event_up": { "event": "MobiFlight.ASCRJ_FCP_SPEED_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_FCP_SPEED_CHANGE_DEC", "type": "manual", "value": 1 }, + "alternate_event_up": { "event": "MobiFlight.ASCRJ_FCP_WHEEL_CHANGE_INC", "type": "manual", "value": 1 }, + "alternate_event_down": { "event": "MobiFlight.ASCRJ_FCP_WHEEL_CHANGE_DEC", "type": "manual", "value": 1 } }, { "index": 5, - "event_up": "COM_RADIO_WHOLE_INC", - "event_down": "COM_RADIO_WHOLE_DEC", - "alternate_event_up": "COM_RADIO_FRACT_INC", - "alternate_event_down": "COM_RADIO_FRACT_DEC", + "event_up": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_OUTER_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_OUTER_CHANGE_DEC", "type": "manual", "value": 1 }, + "alternate_event_up": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_INNER_CHANGE_INC", "type": "manual", "value": 1 }, + "alternate_event_down": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_INNER_CHANGE_DEC", "type": "manual", "value": 1 }, "event_short_press": "{alternate}", - "event_long_press": "COM_STBY_RADIO_SWAP" + "event_long_press": { "event": "MobiFlight.ASCRJ_RTU1_LSK1R_BTN", "type": "manual", "value": 1 } }, { "index": 6, - "event_up": "NAV1_RADIO_WHOLE_INC", - "event_down": "NAV1_RADIO_WHOLE_DEC", - "alternate_event_up": "NAV1_RADIO_FRACT_INC", - "alternate_event_down": "NAV1_RADIO_FRACT_DEC", + "event_up": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_OUTER_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_OUTER_CHANGE_DEC", "type": "manual", "value": 1 }, + "alternate_event_up": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_INNER_CHANGE_INC", "type": "manual", "value": 1 }, + "alternate_event_down": { "event": "MobiFlight.ASCRJ_RTU1_KNOB_INNER_CHANGE_DEC", "type": "manual", "value": 1 }, "event_short_press": "{alternate}", - "event_long_press": "NAV1_RADIO_SWAP" + "event_long_press": { "event": "MobiFlight.ASCRJ_RTU1_LSK2R_BTN", "type": "manual", "value": 1 } }, { - "index": 7 + "index": 7, + "event_up": { "event": "MobiFlight.ASCRJ_LSP_FORMAT_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_LSP_FORMAT_CHANGE_DEC", "type": "manual", "value": 1 } }, { - "index": 8 + "index": 8, + "event_up": { "event": "MobiFlight.ASCRJ_LSP_RANGE_CHANGE_INC", "type": "manual", "value": 1 }, + "event_down": { "event": "MobiFlight.ASCRJ_LSP_RANGE_CHANGE_DEC", "type": "manual", "value": 1 } } ], "buttons": [ { "index": 1, - "event_press": "TOGGLE_FLIGHT_DIRECTOR", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_FD1_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE" }, { "index": 2, - "event_press": "AP_HDG_HOLD", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_HDG_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_HEADING_LOCK" }, { "index": 3, - "event_press": "AP_ALT_HOLD", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_ALT_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_ALTITUDE_LOCK" }, { "index": 4, - "event_press": "AP_VS_HOLD", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_VS_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_VERTICAL_HOLD" }, { "index": 5, - "event_press": "AP_APR_HOLD", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_APPR_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_APPROACH_HOLD" }, { "index": 6 }, { - "index": 7 + "index": 7, + "event_press": { "event": "MobiFlight.ASCRJ_GPWS_TERR_BTN", "type": "manual", "value": 1 } }, { "index": 8, @@ -98,33 +99,34 @@ }, { "index": 9, - "event_press": "AP_MASTER", + "event_press": { "event": "MobiFlight.ASCRJ_FCP_AP_BTN", "type": "manual", "value": 1 }, "simvar_led": "AUTOPILOT_MASTER" }, { "index": 10, - "event_press": "AP_NAV1_HOLD", - "simvar_led": "AUTOPILOT_NAV1_LOCK" + "event_press": { "event": "MobiFlight.ASCRJ_FCP_NAV_BTN", "type": "manual", "value": 1 } }, { - "index": 11 + "index": 11, + "event_press": { "event": "MobiFlight.ASCRJ_FCP_VNAV_BTN", "type": "manual", "value": 1 } }, { - "index": 12, - "event_press": "FLIGHT_LEVEL_CHANGE", - "simvar_led": "AUTOPILOT_FLIGHT_LEVEL_CHANGE" + "index": 12 }, { "index": 13, - "event_press": "YAW_DAMPER_TOGGLE" + "event_press": [ + { "event": "MobiFlight.ASCRJ_FCP_YD1_BTN", "type": "manual", "value": 1 }, + { "event": "MobiFlight.ASCRJ_FCP_YD2_BTN", "type": "manual", "value": 1 } + ] }, { "index": 14, - "event_press": "TOGGLE_MASTER_BATTERY" + "event_press": { "event": "MobiFlight.ASCRJ_ELEC_BATT_BTN", "type": "manual", "value": 0 } }, { "index": 15, - "event_press": "GEAR_TOGGLE" + "event_press": { "event": "MobiFlight.ASCRJ_GEAR_LEVER_BTN", "type": "manual", "value": 0 } }, { "index": 16, From 8297a7b93b3751f270b86572756529883c9407b1 Mon Sep 17 00:00:00 2001 From: Krystian Lewandowski Date: Fri, 9 Apr 2021 04:42:42 +0200 Subject: [PATCH 2/2] READMEs update --- Configurations/Functions/CJ4/README.md | 3 +++ Configurations/Functions/CRJ/README.md | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Configurations/Functions/CJ4/README.md b/Configurations/Functions/CJ4/README.md index 8af233c..212ba36 100644 --- a/Configurations/Functions/CJ4/README.md +++ b/Configurations/Functions/CJ4/README.md @@ -4,6 +4,9 @@ ## Setup +### prerequisites +- [MobiFlight](https://www.mobiflight.com/) mod installed + ### encoders (from left to right, starting with index `1`) #### suffixes diff --git a/Configurations/Functions/CRJ/README.md b/Configurations/Functions/CRJ/README.md index fb838e4..e5b7bb9 100644 --- a/Configurations/Functions/CRJ/README.md +++ b/Configurations/Functions/CRJ/README.md @@ -4,6 +4,10 @@ ## Setup +### prerequisites +- [MobiFlight](https://www.mobiflight.com/) mod installed +- [events.user.txt](events.user.txt) copied to `Community\mobiflight-event-module\modules\` + ### encoders (from left to right, starting with index `1`) #### suffixes @@ -76,4 +80,4 @@ ## Known issues -1. Work In Progress +1. LNAV and VNAV buttons are not lighting up