WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Feature request
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
ZW



Joined: 11 Jan 2007
Posts: 18

Digg It
PostPosted: Mon Feb 12, 2007 5:27 pm    Post subject:

About custom functions:

I read somewhere that GlovePIE can call custom functions in .dll files, but never found any good documentation on how to do this. Anyone know more about this?
Back to top
View user's profile Send private message
TylerK



Joined: 18 Dec 2006
Posts: 384
Location: Springfield, IL

Digg It
PostPosted: Mon Feb 12, 2007 5:31 pm    Post subject:

ZW wrote:
About custom functions:

I read somewhere that GlovePIE can call custom functions in .dll files, but never found any good documentation on how to do this. Anyone know more about this?
You might be able to glean some info from the Get Pixel script: http://www.wiili.org/index.php/Get_Pixel

It's really the only thing I've experimented with as far as calling DLL functions goes. I'd love to know what other functions are out there.
Back to top
View user's profile Send private message
ZW



Joined: 11 Jan 2007
Posts: 18

Digg It
PostPosted: Mon Feb 12, 2007 8:34 pm    Post subject:

Another question would be how GlovePIE handles the .dll functions. If we write custom functions in C or C++ which are linear, package them in a dll, and call it in glovePIE, will PIE actually run them linearly? If that were the case it shouldn't be too difficult to calculate relative velocity and position from accelerometer data.

Last edited by ZW on Mon Feb 12, 2007 8:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
TylerK



Joined: 18 Dec 2006
Posts: 384
Location: Springfield, IL

Digg It
PostPosted: Mon Feb 12, 2007 8:36 pm    Post subject:

That's a very good question. Hopefully Carl can answer that one whenever he gets around to it.
Back to top
View user's profile Send private message
SwedishFrog
Site Admin


Joined: 25 Jan 2007
Posts: 273
Location: New York

Digg It
PostPosted: Wed Feb 14, 2007 8:49 pm    Post subject:

If you call dll functions, each call to the function should execute linearly (ie once) for every time glovepie calls it.

Since glovepie loops your code, the function call will execute over and over again indefinately until the script stops. This might give the illusion of the function executing non-linearly, but that isn't the case.

Query: Why would a velocity calculation require a dll function call? Is glovepie's math library somehow insufficient for this task?
Back to top
View user's profile Send private message Visit poster's website AIM Address
psyonide



Joined: 14 Feb 2007
Posts: 5

Digg It
PostPosted: Fri Feb 16, 2007 12:26 am    Post subject:

How about:
Code:
//This is some code...
:START
if do = this then
  do that
  goto start
else
  goto end
  //And it won't parse anything after this
endif
:END

Sort of like subfunctions, but more like BASIC coding...

If it already has this feature, just call me stupid and laugh, but at least tell me it does.

pSy
Back to top
View user's profile Send private message
SwedishFrog
Site Admin


Joined: 25 Jan 2007
Posts: 273
Location: New York

Digg It
PostPosted: Fri Feb 16, 2007 4:05 am    Post subject:

if you think you need goto commands then you probably don't understand that glovepie isn't linear. Glovepie executes your code out of sequence -- It threads the execution of the code to give the illusion of several parts of your code running at once. It also loops automatically back to the top once it reaches the bottom. This fact makes the goto command meaningless. I doubt glovepie even supports goto, but i'm not sure.

Also you should know that goto commands have been 'out of style' in the programming world for quite a while now. This is because they are conducive to hard to read code which is even harder to debug.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group