> void cyclicloop(void *arg)
> {
>       RTIME now, previous;
>
>       /*
>        * Arguments: &task (NULL=self),
>        *            start time,
>        *            period (here: 1 ms=1000000)
>        */
>       rt_task_set_periodic(NULL, TM_NOW, TASK_PERIOD);
>       previous = rt_timer_read();
>
>       while (!TasksHalt) {
>               rt_task_wait_period(NULL);
>               now = rt_timer_read();
>               //Read inputs here
>               atm60_configure(can_device);

What does this function do?
steps through the initialisation phase and then ends up just calling
the read function. I could have just as well replaced it with the read
function for the example here. can_device="rtcan2".

Roland



>               //Set analog output here
>               //Do controller calculations here
>
>
>
>
>               //Get time period
>               double TimeVarTemp=(double)(now - previous);
>               Task1Period=TimeVarTemp/ 1000000;
>               //printf("Time since last turn: %f ms\n",Task1Period);
>               previous = now;
>
>               /*
>                * NOTE: printf may have unexpected impact on the timing of
>                *       your program. It is used here in the critical loop
>                *       only for demonstration purposes.
>               */
>
>       }
> }//cyclicloop

--
Sebastian


_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to