edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Allow analog sources to be used in things like expo, weight

Open 3djc opened this issue 2 years ago • 8 comments

Is there an existing issue for this feature request?

  • [X] I have searched the existing issues

Is your feature request related to a problem?

To be able to drive things like expo or weight using a pot, you need to setup a SF that copies the value in a gvar, then use that gvar as source. This seems cumbersome

Describe the solution you'd like

Ability to use analog sources in weight and expo (possibility others, havent investigates yet)

Describe alternatives you've considered

use gvar

Additional context

No response

3djc avatar Dec 22 '23 13:12 3djc

I think this could be done, where the weight/offset/expo etc could be either a value or a 'source' (which includes gvar's so it becomes a superset of current functionality).

For Mixes and Outputs the existing data structures look big enough to work; but Inputs (ExpoData struct) would probably require an extra byte added - 64 bytes more RAM needed for model data.

philmoz avatar Dec 24 '23 01:12 philmoz

yes, clearly the way to go. A bit messy since the gvar/value will need to be reworked; but yes

3djc avatar Dec 24 '23 07:12 3djc

64 bytes more RAM needed for model data

Probably affordable 🤞

raphaelcoeffic avatar Jan 01 '24 08:01 raphaelcoeffic

Given the benefits, I would agree

3djc avatar Jan 01 '24 08:01 3djc

I started to look at this; but found one complication.

Currently weight/expo/offset etc supports negative (inverted) GV's as source.

However a normal 'Source' does not currently support inverted/negative values - switches do; but not sources.

To implement this without losing existing functionality we would need to allow the source to be inverted.

philmoz avatar Jan 06 '24 08:01 philmoz

That would be a nice addition actually

3djc avatar Jan 06 '24 08:01 3djc

That would be a nice addition actually

Unfortunately it's going to require a lot of work - the code assumes source values are unsigned so much of the code needs to be tweaked.

I think it would be best to first do the inverted source feature as a separate P,R so it can be reviewed and tested, then revisit this one.

philmoz avatar Jan 06 '24 10:01 philmoz

Makes a lot of sense

3djc avatar Jan 06 '24 10:01 3djc