EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.59k stars 338 forks source link

2.10: Model Setup "Throttle Source" not working with CH selections when a Mix line has No Source. #4650

Open frankiearzu opened 8 months ago

frankiearzu commented 8 months ago

Is there an existing issue for this problem?

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

UPDATED: PROBABLY A CORNER CASE. Affects 2.10 nightly and previous version.

If any Mix channel has a mix with no-source, Any channel after that disappear from channel options on the Throttle source.

Expected Behavior

Should allow CH3 (or other channels), even if mixers with no-source are used in previous channels.

Steps To Reproduce

  1. Create a standard AETR model. CH3 is Throttle output.
  2. Go to Mixer page, and Create an extra mix CH2 (Ele) with source LS and any weight 10 (like a Flap->Ele mix). LS will be the flap.
  3. Go to Model Setup->Timer1 and set the Mode to "Throttle %"
  4. Go to Model Setup->Throttle: select CH3 as the source.

image image

At this point, the Timer will only increment if throttle is used.

  1. Go back to Mixer Page, and edit the CH2: Flap->Ele mix to have no-source (---), effectively disabling the mix. Everything continue working as before, except that the Flap->Ele mix is disable and not affecting CH2/Ele.

  2. Go to Model Setup->Throttle: it show CH3 as the source.. but if you try to change it, CH3 (and anything after) disappeared as the source for Throttle.

image image image

Practically any channel after a mix with no source will no longer show.

Version

Nightly (Please give date/commit below)

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

3djc commented 8 months ago

You can on BW, so maybe a UI thing. Note that timer also have enabling switches, you could have also you cut there

philmoz commented 8 months ago

Do you have a mix line defined for CH3 in the model?

mha1 commented 8 months ago

maybe this is related to https://github.com/EdgeTX/edgetx/issues/4339

frankiearzu commented 8 months ago

Probably a corner case, I have a template created that way disabling Flp->Ele mix, and only activate it back if I needed.

I think this part of the code is why it stops looking for used channels after the no-source mix. image

Now this could be a problem... in the case of Color radios, the mixer task just ignore that mixer and continue... but in B&W, it stops evaluating any mixer after.

image

So.. should a no-source be allowed??? Why the difference behavior?? Probably on B&W rations, to save some CPU. Could the the end of the Mixer be identified another way? i.e, (md->srcRaw==0 && md->destCh != 0)?