Page 1 of 1

the frequence of b0 spin

Posted: 23 May 2019, 18:37
by yuntao
I want to know the frequence of b0 node when I use the function ``b0_node.spin()`` and how to change it.

Re: the frequence of b0 spin

Posted: 23 May 2019, 20:16
by fferri
Are you taking about the BlueZero plugin? Or about which language binding for BlueZero?

Re: the frequence of b0 spin

Posted: 23 May 2019, 20:30
by fferri
In the C API, b0_node_spin() calls b0::Node::spin() without arguments, so the default spin rate (10Hz as of blue zero 1.x) will be used.

You can implement a custom spin loop to obtain a different rate or spin policy:

Code: Select all

while(!b0_node_shutdown_requested(pnode))
{
    b0_node_spin_once(pnode);
    usleep(15000);
}