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

feat: more flexible ADC inputs #3870

Merged
merged 35 commits into from
Nov 2, 2023
Merged

feat: more flexible ADC inputs #3870

merged 35 commits into from
Nov 2, 2023

Conversation

raphaelcoeffic
Copy link
Member

@raphaelcoeffic raphaelcoeffic commented Jul 28, 2023

Summary of changes:

  • use FLEX instead of POT ,AXIS, and MOUSE
  • add support for configuring ADC input as SWITCH
  • support for ADC inversion in UI

@elecpower there is yet another change in YAML format (for the better likely)

This PR introduces the following YAML changes:

  • potsConfig has additional types: switches, axis_x and axis_y.
  • potsConfig now supports inversion with inv (0 or 1).
potsConfig:
   EXT1:
      type: switch
      inv: 0
      name: ""
   EXT2:
      type: switch
      inv: 0
      name: ""
   EXT3:
      type: axis_x
      inv: 0
      name: ""
   EXT4:
      type: axis_y
      inv: 0
      name: ""
  • a new block called flexSwitches defines up to 2 additional on targets supporting this (only TX16 for now):
    Please note: flexConfig must be placed after potsConfig. The loader will verify that the channel (analog source) is indeed configured as switch.
flexSwitches: 
   FL1:
      channel: EXT1
   FL2:
      channel: EXT2
  • up to 2 new switches called FL1 and FL2

@raphaelcoeffic raphaelcoeffic changed the title Use FLEX instead of POT and AXIS Draft: more flexible ADC inputs Jul 28, 2023
@raphaelcoeffic raphaelcoeffic force-pushed the flex-inputs branch 4 times, most recently from b684cfc to 033f752 Compare August 3, 2023 10:31
@raphaelcoeffic raphaelcoeffic force-pushed the flex-inputs branch 3 times, most recently from 906c62b to 6e76c98 Compare August 5, 2023 08:23
@raphaelcoeffic raphaelcoeffic changed the title Draft: more flexible ADC inputs feat: more flexible ADC inputs Aug 9, 2023
@raphaelcoeffic raphaelcoeffic marked this pull request as ready for review August 9, 2023 09:12
@3djc 3djc marked this pull request as draft August 9, 2023 09:43
@3djc 3djc marked this pull request as ready for review August 9, 2023 14:22
@3djc
Copy link
Collaborator

3djc commented Aug 9, 2023

We wont commit to it, but this is likely the last of the 'brace for impact' PR for 2.10 (maybe)

Copy link
Contributor

@JyeSmith JyeSmith left a comment

Choose a reason for hiding this comment

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

Yay!

@raphaelcoeffic
Copy link
Member Author

@JyeSmith did you try it out?

@JyeSmith
Copy link
Contributor

JyeSmith commented Sep 5, 2023

Not yet, but I'll put it on the list. I have a tx16 that will need to be unmodified to test.

@raphaelcoeffic raphaelcoeffic mentioned this pull request Sep 5, 2023
1 task
@raphaelcoeffic raphaelcoeffic linked an issue Sep 5, 2023 that may be closed by this pull request
1 task
@pfeerick pfeerick self-requested a review September 22, 2023 09:11
@pfeerick
Copy link
Member

pfeerick commented Nov 1, 2023

Regression tested on TX16S, TX12MKII and X9D+2019 hardware, no startup or calibration checksum failures.

@pfeerick pfeerick merged commit b48e070 into main Nov 2, 2023
37 checks passed
@pfeerick pfeerick deleted the flex-inputs branch November 2, 2023 01:07
@philmoz
Copy link
Collaborator

philmoz commented Nov 3, 2023

This PR breaks existing models that use the 6POS switch as a source.
The 6POS source string in the YAML file is not recognised and ends up as no source.

False alarm - needed to do a clean build.

ulfhedlund added a commit to ulfhedlund/edgetx that referenced this pull request Nov 4, 2023
pfeerick pushed a commit that referenced this pull request Nov 7, 2023
pfeerick pushed a commit that referenced this pull request Nov 7, 2023
pfeerick pushed a commit to ulfhedlund/edgetx that referenced this pull request Nov 10, 2023
@pfeerick pfeerick mentioned this pull request Mar 11, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to invert EXT pots Hardware analog input as switches
6 participants