rotate animation bug?

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

rotate animation bug?

#1 Post by Sling »

Hi,

Just found something else that i've not come across before. If you use the rotate animation features on a value that passes through zero you get incorrect behaviour.

Use the C172 altimeter and change the hundreds needle rotation line to

rotate(needle_100, t, "LOG", 0.1)

Now move the baro knob so the hundreds needle passes through 0 from both directions and you will see the issue. I tried "LINEAR" & "LOG" nut obviously didn't expect that to make any difference. However I also tried adding all of the available direction argumnets but nothing works. I would of expected "DIRECT" to be correct. While on this subject the wiki page does not state what default is used for direction if it is not stipulated. I'm guessing "DIRECT" but it would be good to update the page to say what the default is.

Tony

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#2 Post by Corjan »

Hi,

Will have a look at this next week.

Corjan

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#3 Post by Corjan »

Hi,


Bit later, but...

Two things:

1) By default the rotate will use an absolute angle. The code goes from 0 all the way to 3600 or so, in that case it will make 10 complete rotations. Setting the animation direction to 'FASTEST' will resolve this. In this case the code could be:

Code: Select all

rotate(needle_100, t, "LOG", 0.1, "FASTEST")
2) There is a bug in AM that makes it misbehave. I have fixed this and will be in the first AM 4.1 BETA.


Corjan

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#4 Post by Corjan »

I have also updated the wiki a bit to explain the difference between direct and relative modes.

Corjan

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: rotate animation bug?

#5 Post by Sling »

Thanks Corjan. Glad you found the bug. I'll check out the fix once you release the first 4.1 beta.

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: rotate animation bug?

#6 Post by Sling »

Confirmed. It now works. You need to use "FASTEST" for most cases I think. Perhaps it should be default rather than "DIRECT".

Post Reply