Nearly identical models...

More
18 Aug 2018 14:33 #70328 by crash7X
Nearly identical models... was created by crash7X
I am baffled by a difference in behaviour between two nearly identical models.

I have tried this on three different transmitters. devo10-v5.0.0-a06b35c and devo12e-v5.0.0-e27b496.

The intent is to have the trim switches TRIM_LH, TRIM_RH and TRIM_RV produce -100, 0 or 100 on a corresponding channel. These values are to be used in Betaflight for field changing flight parameters. I use the MIX switch to select P, I or D, then the trim switch on rudder, aileron or elevator increases or decreases that parameter on that axis. Betaflight "adjustments" tab.

It is the height of my modelling incompetence. And it works very well, or it did.

I copy two models below. One works perfectly, the other suffers a problem wherein the YAW or TRIM_LH switch seems to initialize in the -/pressed position. The channel for the YAW corrective pulses is stuck at -100 until I click it left (to "ask" for -100). Then the device works properly, -100 for TRIM_LH- and 100 for TRIM_LH+.

So I get unwanted changes to one of P, I or D (MIX switch position) on the YAW flight parameters. Amusing not.

I work around this by turning on the transmitter first, then toggling TRIM_LH+/- to "reset" the channel, then powering the vehicle.

Here's the setup, you can see the problem on the transmitter menu/channel monitor OR the third bar in the bargraph:

YAW uses channel 6 with virt8 and virt9 picking up TRIM_LH- and TRIM_LH+. Third bar.

ROLL uses channel 9 with virt1 and virt2 picking up TRIM_RH- and TRIM_RH+. Sixth bar.

PITCH uses channel 10 with virt3 and virt4 picking up TRIM_RV- and TRIM_RV+. Seventh bar.

As I said, the ROLL and PITCH trim switches work fine on channels 9 and 10. The YAW trim switch works on one model, but is oddly initialised on the other.

How can this be? Is there a way to explicitly initialise a switch so I don't need my workaround?

File Attachment:

File Name: model3_2018-08-18.ini
File Size:5 KB

File Attachment:

File Name: model4_2018-08-18.ini
File Size:5 KB


crash7X
[/size]
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Aug 2018 13:32 #70461 by crash7X
Replied by crash7X on topic Nearly identical models...
OK me again. It gets better, or worse:

Careful examination of the two models leads me to believe it is not a matter of what is in the model rather in how it is launched/initialised.

The misbehaving model now behaves. Then again it doesn't. That is to say the symptoms I discuss in my original post come and go from a single model day to day. I do not see anything that this correlates to.

Naturally this is not just a PITA but raises some questions about what else might be happening (or not) that would affect flying but not make itself so obvious as my glitch had the decency to do.

crash7X

Please Log in or Create an account to join the conversation.

More
27 Aug 2018 23:09 #70484 by hexfet
Replied by hexfet on topic Nearly identical models...
Wasn't able to duplicate this issue in an emulator, and only saw it happen once on my devo10. Still I'll hazard a guess :)

I think the issue might be related to the min/max curve in the virtual channels. Try using a 1-to-1 curve with a scale of 0. I use this for in-flight adjustments with betaflight (model file excerpt below), and have not had any issues.
[virtchan1]
name=Adj+
template=complex
[mixer]
src=Virt1
dest=Virt1
scalar=0

[virtchan2]
name=Adj=
template=complex
[mixer]
src=Virt2
dest=Virt2
scalar=0

[trim5]
src=Virt1
pos=TRIM_R+
step=193
value=-100,0,0

[trim6]
src=Virt2
pos=TRIM_R-
step=193
value=-100,0,0

Please Log in or Create an account to join the conversation.

More
28 Aug 2018 15:11 - 28 Aug 2018 15:12 #70505 by crash7X
Replied by crash7X on topic Nearly identical models...
Thank you. It is some comfort to know that there seems to be a real, if rare, problem.

I have not time or skills to look at the code. The random nature of this fault makes it hard to track down. I hadn't thought to try the simulator. I have seen the problem on the Devo 10 and 12e. It shouldn't ever be that a channel comes up -100 and won't switch to 0 or 100 without first having been switched to (already is!) -100.

In one early case the problem was copying a model using the transmitter GUI. I have noted before that large models do not seem to fare well; in this case a few missing lines were the problem. Not so with the latest manifestation.

Now I am not getting it anymore. Let me hope aloud that if it does happen more, it is now something I will remember, oh and that it not happen randomly around arming, throttle tricks &c. ;-)

More evidence just in case:

On the main screen when I power up I see the right hand horizontal trim block sitting at 0 in its range. Until I click the left-hand horizontal trim switch to -100 the CH 6 output is stuck at -100 and I still see the trim block.

Once I have clicked to -100 and released to 0, CH 6 takes on the proper value (0) and then operates -100, +100 from the left hand horizontal trim as desired.

AND when I go to load a new model, the transmitter notes that my current model is "unsaved", like it thinks I was monkeying with real trims???

In any case, thanks again. I will look at your fragment and just do it that way if I can manage. And cross my fingers.

Things were simpler when I was flying 30 gram toys. 300 grams going 50 kph is a hole different kind o' panic.

c7
Last edit: 28 Aug 2018 15:12 by crash7X.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum