Jump to content

How to announce a change in slider/rotary knob position.


Allan Bennett
 Share

Recommended Posts

Apart from the programming flexibility of OTX I also love the ability to add voices to my switches, so that I can remember which is what when I change models.  My stabilised models have adjustable gyro gain, adjusted by a slider or knob on the trannie, and I was wondering if I can program it to trigger an announcement whenever there's a change in the slider or knob position?  Such as 'Gain increased' and 'Gain reduced', to remind me what that slider/knob is for.

Link to comment
Share on other sites

3 hours ago, Brian Dorricott 1 said:

I was hoping someone would have an answer by now because I want know as well .

 

Be patient, everyone's watching tennis or football at the moment ?

 

Thanks for the suggestion Bob, d>=x looks like it should do it.   When I first checked that out I thought it was comparing the value of the switch to a fixed value, but on reading again I see that it's comparing the change in value of the switch to a predefined value.

Link to comment
Share on other sites

Must admit, I've been wondering what OTX is. Yes d>=X should do the trick in OpenTX (or |d|>=X).

I'd use 2 tests. One with a positive value of X for "gain increased" and one with a negative value of X for "gain reduced". Obviously more than one way of doing it though.

Link to comment
Share on other sites

Thanks Gary, I was checking it out in OTX Companion while you were writing.  As you've suggested, I used two separate tests with d>=x, for negative and positive changes, and the appropriate logic flag flashes when I move S2 clockwise or anticlockwise.  I used a value of +20 and -20; I think I need a smaller value, but I'll wait and see how it feels on the trannie before deciding.

Link to comment
Share on other sites

19 minutes ago, Gary Manuel said:

Must admit, I've been wondering what OTX is. Yes d>=X should do the trick in OpenTX (or d>=X).

I'd use 2 tests. One with a positive value of X for "gain increased" and one with a negative value of X for "gain reduced". Obviously more than one way of doing it though.

I have just learned something.

d>=X is not the same as |d|>=X

 

|d| is the absolute value, which I did not understand so searched for the definition, which means that |d|>=X tests for any change be it an increase or decrease. 

 

Which negates the need for two tests. Neat!

 

Learn something new every day.

 

That's if I have understood the explanation I found.?

 

I used to be good at maths then I retired.

Link to comment
Share on other sites

It's not working as I had hoped.

 

I've created the two new sound files, and in OTX Companion I've specified them as "Played once, not during startup".  But even though V2 in the Logical Switches setup page is only 15 and -15 the sounds only play once or twice in either direction when I turn the knob.  Given the knob's range is 100 to -100 I would expect half a dozen announcements during each half turn in either direction, provided I move it slowly enough for each announcement to complete before the next one is due.

 

The other issue which has me stumped, and which is probably related to the above, is in the transmitter (Taranis X9D Plus) channel monitor screen, Ch9 controlled by the S2 knob, is at 100% until the knob gets to about the penultimate marker in the anticlockwise direction, beyond which point it moves quickly down to 1.0, as if there was an offset or some kind of curve applied to it.  In the OTX Companion simulation Ch9 goes from -100 to +100 linearly as the virtual knob is rotated, with 0 at its mid-point, as expected.  Following are my settings for Ch9:-

 

Inputs.  I7:Gain  S2 Weight (+100%) [Stabga]

Mixes.  CH9:S_gain  I7 Gain Weight (+100%)

Outputs.  CH9  S_Gain, 0 Subtrim, -100.0% Min, 100.0% Max

 

Any ideas please why my trannie seems to be behaving differently from the OTX Companion simulation?  If I could get CH9 going from +100 to -100 in the trannie I'm sure I could figure out the best settings for the logic switches. 

 

Link to comment
Share on other sites

I presume you're talking about the calibration of the S8R receiver Philip, as I'm not aware of any other calibration requirements?  I don't believe that's relevant to my present issue, for it simply teaches the receiver what the stick limits are.

 

What I've got is S2 knob ranging from -100 to +100 in OTX Companion simulation, but +100 over 80% of the knob's range and then down to +1 over the last 20% on the trannie's channel monitor.

Link to comment
Share on other sites

You calibrate the sticks and pots of the X9D+ as well Allan, which tells OpenTx their limits.  You long press the Menu button to bring up the Radio menu and then press the Page button until you reach the calibration page.  It's important to move all the sticks, pots and sliders to their limits in both directions during calibration to get proper behaviour from them afterwards.

 

Edited by Tim Kearsley
Link to comment
Share on other sites

I'll give Tx calibration a go this afternoon -- I've never done it in my years of Taranis/OTX, and never noticed a problem before.  But I'm happy to learn.

 

MattyB, I was aware of that function but wasn't interested in absolute numbers, but it might help in troubleshooting.

Link to comment
Share on other sites

Have you got it to play multiple announcements as you increase (or decrease) the gain in several steps? That was the other problem you reported.

 

Have you set the "duration" in the Logical Switch settings to a length that's just long enough to play the audio file? Try 1 second (Delay = 0).

 

Edited by Gary Manuel
Link to comment
Share on other sites

Yes thanks Gary.  At the moment I've got V2 (the amount of change needed to trigger the logic switch) set at 15 and it gives an announcement about five times during a complete rotation.  If I move the knob too fast there's multiple logic triggers before the first announcement has finished, so the number of announcements is less, or just one.  I've got the Duration set at 0.5 at the moment, to make sure that it triggers a Special Function, but I suspect that putting that back to default 0 will be fine since it only needs to trigger the Play Track action, not be on for the duration of the action.  Delay = 0, for I see nothing to be gained by delaying the trigger.

 

Given that there's 100 increments either side of centre, I'll probably reduce V2 to 10 or less so that it triggers with smaller movements of the knob.  But the principle is working fine.

Link to comment
Share on other sites

Nice one.

 

The duration is to prevent a number of the same voice messages being triggered during the time it takes you to turn the knob. If set to zero it might not trigger the voice at all and if set too short it might trigger too many. Not actually tried it but that's how I'm picturing it.

Edited by Gary Manuel
Link to comment
Share on other sites

I don't see it that way Gary.  In fact I've used Duration in another model, with a logic switch that sets the rudder to hard right for 4 seconds if the throttle is at zero.  That's to arm an Ardupilot hexcopter. 

 

I suppose if I did input a higher value in the situation we're discussing now, that would hold the logic for whatever amount of time the Duration is, thus preventing it from resetting within that time.  The length of the message dictates how often it can repeat anyway, so I'm not going to try to use the Duration for that purpose.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...