It is currently Fri Nov 16, 2018 1:50 am



Reply to topic  [ 4 posts ] 
 Maximum value of a variable? 
Author Message
One Eyed Hopeful

Joined: Mon Jan 29, 2018 4:41 pm
Posts: 13
Reply with quote
Sometimes I see that even though the wiimote is standing still, its acceleration is sometimes more than 9.8, which should not be possible. I want to watch the wiimote[0].acceleration.z output over time and see what the biggest number so far has been. Occasionally it'll even be a 2 digit number, but only for a frame or two.

How can I watch the maximum output of a variable?


Sat Mar 10, 2018 2:20 am
Profile
Cross Eyed!

Joined: Mon Mar 02, 2015 3:58 pm
Posts: 119
Reply with quote
Declare a gobal variable, as described here:
https://github.com/AndersMalmgren/FreePIE/wiki/Scripting

If the reported input is higher than the variable, put it in the variable.

Watch the variable.


Sat Mar 10, 2018 3:03 pm
Profile
One Eyed Hopeful

Joined: Mon Jan 29, 2018 4:41 pm
Posts: 13
Reply with quote
Jabberwock wrote:
Declare a gobal variable, as described here:
https://github.com/AndersMalmgren/FreePIE/wiki/Scripting

If the reported input is higher than the variable, put it in the variable.

Watch the variable.


works like a charm. Thanks!


Sat Mar 10, 2018 4:57 pm
Profile
Cross Eyed!

Joined: Mon Mar 02, 2015 3:58 pm
Posts: 119
Reply with quote
Glad I could help!


Sun Mar 11, 2018 3:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.