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

Analog Aux Channels #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

brianquad
Copy link

This merge adds support for "analog" aux channels to Silverware to be able to modify certain features on the fly with more than binary digital channels.

It also adds two "analog" aux channels to the Bayang protocol by taking over two of the currently-unused bytes, which requires an updated version of the Multiprotocol Module or Deviation firmware (hopefully to be merged into those projects' master branches at some point after this merge to Silverware).

More info in the discussion on RC Groups:
https://www.rcgroups.com/forums/showthread.php?3121896-Analog-Aux-Channels-for-Silverware


This option (controlled in config.h) adds support for Analog Aux channels to control certain pre-programmed features. These are intended to be used with a transmitter with knobs to easily alter parameters while flying. These are controlled by #define lines in config.h.

Initially, these features include:

  1. Analog Rate Multiplier (ANALOG_RATE_MULT)
  • Use a transmitter knob to control your rates to help find your sweet spot without flashing in between
  • Set your MAX_RATE and MAX_RATE_YAW to the highest rate you might want
  • Use the assigned knob to adjust between 0 and 100% of that rate in a linear scale
  • Putting the knob at its middle point will give you half of your MAX_RATE
  1. Analog Max Angle for Level mode (ANALOG_MAX_ANGLE)
  • When in Angle/Level mode, the maximum angle the quad is allowed to tilt (controlling your max speed, etc.) is set by the LEVEL_MAX_ANGLE define
  • When enabling ANALOG_MAX_ANGLE, the LEVEL_MAX_ANGLE define is ignored
  • The knob controls the maximum angle from 0 to 90 degrees in a linear scale
  • Putting the knob at its middle point will give you a maximum angle of 45 degrees
  1. PID adjustments (ANALOG_RP_P, etc.)
  • Assigning a knob to one of these defines lets you alter that PID setting from 0.5X to 1.5X of the current setting in pid.c
  • The PID adjustments are not saved. To save a new value, you'll have to check where your knob it and apply that setting manually in pid.c
  • Each of the P, I, or D for Roll, Pitch, and Yaw can be selected in config.h, or Roll and Pitch P, I, or D can be selected together on one knob
  • The PID adjustments can be saved, just like the classic Silverware gesture PID adjustments. To save a new value, use the Down Down Down (DDD) gesture to write the current PID values to flash (including your new one(s)) and re-center your adjusted values. This means to keep your new value after saving, you must re-center your knob/slider.

These initial features are mostly meant to start a conversation on how Analog Aux channels could be used. For example, I'm sure there are better ways to do live PID adjustment with a couple of analog knobs!

How do you access/assign analog channels? What channels can be used?

For Sbus and DSM, you can assign any of the channels to use as analog aux channels.

For Bayang, you can use a modified version of the Bayang protocol I've made to the Multiprotocol Tx and Deviation Tx firmware that adds two 8-bit analog channels to the protocol.

The Multiprotocol module uses channels 14 and 15 for these analog channels. Set the "Option/Telemetry" value for the Bayang protocol on the Taranis to 2 or 3 (2 to get only the analog channels, 3 to get both Telemetry and the analog channels).

Deviation uses channels 13 and 14. Enable the Analog Aux option for the Bayang protocol. Find Deviation builds for several Devo and Jumper TXs attached to this post.

For both the Multiprotocol module and Deviation, Silverware will not bind with a transmitter that does not have matching options enabled/disabled (both Telemetry and Analog Aux channels).

These modifications can be found on the analog aux branch in my forks on GitHub (for now, you must select the branch rather than master):
https://github.com/brianquad/DIY-Multiprotocol-TX-Module/tree/bayang-analog-aux
https://github.com/brianquad/deviation/tree/bayang-analog-aux

@markusgritsch
Copy link

markusgritsch commented Oct 14, 2018

Sidenote: Knobs on the TX are not the only way to make use of the analog channels; the trim switches on a Devo can also easily be set up to conveniently adjust the analog channels. Ian444 describes the setup in the referenced forum thread.

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.

2 participants