the frequence of b0 spin

Typically: "How do I... ", "How can I... " questions
Post Reply
yuntao
Posts: 7
Joined: 17 Aug 2018, 06:53

the frequence of b0 spin

Post by yuntao »

I want to know the frequence of b0 node when I use the function ``b0_node.spin()`` and how to change it.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: the frequence of b0 spin

Post by fferri »

Are you taking about the BlueZero plugin? Or about which language binding for BlueZero?

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: the frequence of b0 spin

Post 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);
}

Post Reply