Bug report / serious issue with input

Mon Feb 17, 2020 1:52 am
avatar  azaz44
#1
az

Hi Klaus

I'm writing a LUA script for OpenTX, to be used with simulation, mainly with neXt. And I've hit a very weird issue. Running the script results in a quick change of the elevator from -100 to 100 at some point, but neXt ignores this change.

I was able to reproduce the issue by just using a 3-pos switch, which is directly mapped to elevator channel. So changing switch position results in elevator being -100, 0 or 100. Just used a switch as an input for the mix.

Please see the video. Please compare channel 3 in the input monitor and the right stick at the bottom of the screen (I'm using mode-2).

As you can see, as long as I'm switching the switch slowly, everything is fine. Both stick and input monitor show proper value.
But as soon as I flip the switch quickly, from one extreme position to another, the stick at the bottom of the screen is not updated. However, in Input Monitor everything is fine.

What you don't see in the video is, that helicopter movements are also incorrect. It is rotating with elevator in the wrong direction.

What can it be?

Running latest neXt version.

It's a serious problem for me, as I'm stuck with development now..

Video:
https://youtu.be/RKcSBBbz8DI


 reply

 Report post
Tue Feb 18, 2020 8:35 am
#2
avatar

This is the channel filter. It's needed for some cheaper transmitters. This filter cannot be deactivated. Real receivers also have this function.

Align T-Rex 700X, MR25, Katana S 33%

 reply

 Report post
Tue Feb 18, 2020 9:19 am
avatar  azaz44
#3
az

I think you probably misunderstood me. It sounds to me, like the filter you mention would affect it, if I would switch a channel from -100 to +100 for 0.1 second and then back to -100. Then neXt could miss this short change to +100.

But the case here is different. I switch the channel from -100 to +100 and leave it on +100 for minutes. But neXt thinks it is -100 for minutes. Surely receivers don't work like that.


 reply

 Report post
Tue Feb 18, 2020 2:29 pm (Last edited: Tue Feb 18, 2020 2:31 pm)
#4
avatar

Only the control functions aileron, elevator and rudder are filtered. You cannot have 100% aileron right and one frame later 100% aileron left.

Align T-Rex 700X, MR25, Katana S 33%


 reply

 Report post
Tue Feb 18, 2020 9:46 pm
avatar  azaz44
#5
az

I just reproduced it just by using the stick. It's not easy, but possible. I'm sure if I can do this, Tareq can do it with ease..


 reply

 Report post
Wed Feb 19, 2020 9:13 pm
avatar  azaz44
#6
az

Klaus, I've finished the script and put some small description here: https://www.helifreak.com/showthread.php?t=855493
Maybe you can look just to get the idea what I'm trying to do.

As for script, I had some changes and at this point it does not switch from -100 to 100 anywhere. And then it seems to work fine. It does quick switches between 0..100 and it mostly works fine, but I believe sometimes neXt gets confused with that too. I still think it would be great to have that resolved..


 reply

 Report post
Thu Feb 20, 2020 8:20 am
#7
avatar

The simulator reads the transmitter signal 60 times per second. And if a value jumps more than a defined value, the last valid value is used. We can call this function failsave or filter. This function is still required for certain remote controls.

Have you ever used the Showcase Player? You can take control of the flight at any time while playing a flight. Open the recorder with v, click on Menu, click in the empty box to the left of a flight name and then on Run Playlist.

Do you need a start function that starts the helicopter in a random position at eye level in front of you?

Align T-Rex 700X, MR25, Katana S 33%

 reply

 Report post
Thu Feb 20, 2020 9:01 am
avatar  azaz44
#8
az

Zitat von Klaus-Eiperle im Beitrag #7
The simulator reads the transmitter signal 60 times per second. And if a value jumps more than a defined value, the last valid value is used. We can call this function failsave or filter. This function is still required for certain remote controls.


Then I could just avoid jumping that much. But what is this value?

Zitat von Klaus-Eiperle im Beitrag #7
Have you ever used the Showcase Player? You can take control of the flight at any time while playing a flight. Open the recorder with v, click on Menu, click in the empty box to the left of a flight name and then on Run Playlist.

Do you need a start function that starts the helicopter in a random position at eye level in front of you?


The script does not orientate it just randomly. Heli orientation comes from a learning process, and then it's a tricky way to put the heli in this orientation, to make sure it still has speed at this point.

But let me look at the showcase first, how do you prepare these .anim files? I googled "showcase" thinking it's some common tech, but googling this keyword returns all half of the internet..


 reply

 Report post
Already a member?
Register now!
Create an account?
Sign up now!