Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   How Many Iterations? (http://www.chiefdelphi.com/forums/showthread.php?t=85891)

masoug 24-05-2010 17:42

How Many Iterations?
 
Hi,
How many iterations per second does "Iterative Robot" method do for periodic functions?
Are they constant? Or are they variable?

THANKS!!!

-Masoug

Radical Pi 24-05-2010 17:52

Re: How Many Iterations?
 
By default the period is whenever a packet is recieved from the DS (about 50 Hz according to the source).

To define your own period, call SetPeriod(double seconds). FYI this is a minimum. If the code is taking longer than the period to execute, it will wait for the code to finish. Also, call SetPeriod(0.0) to reset it to DS packets.

For # of loops per second, call GetLoopsPerSec() (warning: it doesn't check for the special 0.0 value that signals DS packet sync. It will try to divide by zero if you call it when in DS sync mode)

masoug 24-05-2010 21:43

Re: How Many Iterations?
 
Coll thanks! But:
Quote:

To define your own period, call SetPeriod(double seconds). FYI this is a minimum. If the code is taking longer than the period to execute, it will wait for the code to finish. Also, call SetPeriod(0.0) to reset it to DS packets.

For # of loops per second, call GetLoopsPerSec() (warning: it doesn't check for the special 0.0 value that signals DS packet sync. It will try to divide by zero if you call it when in DS sync mode)
do we have to include additional header files and etc?

THANKS!!!

-Masoug

Radical Pi 25-05-2010 18:10

Re: How Many Iterations?
 
Nothing extra is needed. Those functions are inherited with the IterativeRobot class


All times are GMT -5. The time now is 13:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi