Two translators - one only the first time active..

hgpa

2016-11-10 11:05:01

Hello!

I have a little "problem": With a rotary encoder I want to move some graphic on the screen in a program.
That does it very well, but in the same time the size of the picture shall be reduced to complete picture -
this is also very well done, but in the moment only with a extra button before the turning of the rotary encoder.
I want to combine this: On the first touch of the rotary encoder only one time the reducing of the screen,
then, the complete time I turn the rotary encoder, the moving of the picture.
With two translators normally no problem, but I have no plan, how to achieve, that the first translator
only acts the first time.
And: when I turn the rotary some time later, also the first translator shall do the reduction,
therefore a global variable seemes also not to be the solution....
Has anybody out there an idea?
Thanks for thinking!

HG

trabz

2016-11-12 12:35:04

hgpa wrote:Hello!

I have a little "problem": With a rotary encoder I want to move some graphic on the screen in a program.
That does it very well, but in the same time the size of the picture shall be reduced to complete picture -
this is also very well done, but in the moment only with a extra button before the turning of the rotary encoder.
I want to combine this: On the first touch of the rotary encoder only one time the reducing of the screen,
then, the complete time I turn the rotary encoder, the moving of the picture.
With two translators normally no problem, but I have no plan, how to achieve, that the first translator
only acts the first time.
And: when I turn the rotary some time later, also the first translator shall do the reduction,
therefore a global variable seemes also not to be the solution....
Has anybody out there an idea?
Thanks for thinking!

HG
Hey
On the first touch of the rotary encoder only one time the reducing of the screen
What about setting a limit to this encoder:

Preset 1:
Translator 1:
INCOMING encoder velocity g0
OUTGOING the "reducing of the screen"
RULES if g0==1 exit rules execute outgoing action //// if g0 != 1 , exit rules skip outgoing action

Preset 2:
Translator 1:
INCOMING encoder velocity g0
OUTGOING preset change: deactivate preset 1
RULES if g0 != 1 skip rules execute outgoing action
Translator 2 :
INCOMING encoder velocity g0
OUTGOING "the moving of the picture"

That should work, maybe tweak it a bit, I set a limit of 1 because it is how I envision it but you'd have to reset the encoder value each time I guess

LMK if it's what you're looking for, so that we can continue the mapping set up

hgpa

2016-11-12 15:33:56

Thank you for your quick answer!

I think, your solution should it do..

But, very strange: The last days my first idea, to do it with two single translators: 1. reduce, 2. move,
stopped and "hesitated", no smooth scrolling.

But today, the same way, and the scrolling is quite good. So I need'nt to do it with some extra-presets.

Thank you for your advice, I think, I will it use for another project!

HG