Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CJ4, CRJ, reorganized buttons, MobiFlight dependency #64

Merged
merged 4 commits into from
Apr 5, 2021

Conversation

elewarr
Copy link
Contributor

@elewarr elewarr commented Apr 3, 2021

Just wanted to share with my changes. This is work in progress. Use if you want, close if you want or keep open to see future changes.

  • Cessna CJ4 configuration added
  • Bombardier CRJ configuration (WIP)
  • reorganized buttons/encoders order (see READMEs)
  • MobiFlight dependent data (for CJ4)
  • blinking gear when transition in progress
  • blinking yaw damper when gear is down
  • blinking flaps when gear is up
  • blinking battery when discharging (not reliable, Cj4 gives positive load on discharge, other planes - negative)
  • moved jinja2 stuff to separate files
  • use index definitions instead of hardcoded values
  • READMEs added

- cj4 configuation
- crj configuration
- reorganized buttons/encoders order
- MobiFlight dependent data
- blinking gear when transition in progress
- blinking yaw damper when gear is down
- blinking flaps when gear is up
- blinking battery when discharging
- moved jinja2 stuff to separate files
@elewarr elewarr changed the title (WIP) CJ4, CJR, reorganized buttons, MobiFlight dependency (WIP) CJ4, CRJ, reorganized buttons, MobiFlight dependency Apr 3, 2021
Copy link
Owner

@maartentamboer maartentamboer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow really nice. I would love to merge this. Let me know what you think of the proposed changes to the Generic functions.

@@ -1,7 +1,7 @@
{% if data.get_simvar_value('AUTOPILOT_VERTICAL_HOLD') == 1.0 %}
{{ data.trigger_encoder_alternate(5, True) }}
{{ data.set_encoder_led(5, True) }}
{{ data.trigger_encoder_alternate(4, True) }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new feature of initializing variables from the config file we could move the encoder index to a variable. This makes sure this generic function is truly generic. Currently this change breaks the default config file

{% set encoder_index = get_global_variable('AUTOPILOT_ENCODER') %}
{% if data.get_simvar_value('AUTOPILOT_VERTICAL_HOLD') == 1.0 %}
    {{ data.trigger_encoder_alternate(encoder_index, True) }}
"initialization": {
    "global_variables": [
      {
        "name": "AUTOPILOT_ENCODER",
        "value": 4
      }
    ]
  }

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same of course applies for other functions that have been added to the generic folder

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this change breaks the default config file

Nevermind, just saw that the default config file was changed as well

@@ -9,12 +9,6 @@
"encoders": [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that there are quite a few changes in the default config file. Can you make a small list of what's changed, then when this get's merged and released I can include it in the release notes.

@elewarr elewarr marked this pull request as draft April 4, 2021 11:13
@elewarr
Copy link
Contributor Author

elewarr commented Apr 4, 2021

I'll try to describe buttons/encoders setup later, when I'm back home. For now just the picture.
image

@elewarr
Copy link
Contributor Author

elewarr commented Apr 4, 2021

Added definitions for buttons/encoders indices but these are untested as of yet. I'll test it when I'm back home.

@maartentamboer maartentamboer marked this pull request as ready for review April 4, 2021 13:10
@elewarr
Copy link
Contributor Author

elewarr commented Apr 4, 2021

List of changes in 1st comment.

@elewarr elewarr changed the title (WIP) CJ4, CRJ, reorganized buttons, MobiFlight dependency CJ4, CRJ, reorganized buttons, MobiFlight dependency Apr 4, 2021
@maartentamboer maartentamboer merged commit 7b12fcb into maartentamboer:main Apr 5, 2021
@maartentamboer
Copy link
Owner

Merged! Thanks for contributing 👍

@maartentamboer
Copy link
Owner

Released: https://github.com/maartentamboer/X-Touch-Mini-FS2020/releases/tag/v1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants