Change the frequency of a uorb topic?


Is it possible to change the frequency of publication of a uorb topic ?


// publish fake esc status at ~10 Hz
if (hrt_elapsed_time(&_esc_status_pub.get().timestamp) > 100_ms) {
// publish at 1 Hz, very first time, or when the result has changed
if ((hrt_elapsed_time(&_land_detected.timestamp) >= 1_s)
// publish at ~1 Hz, or sooner if there’s a change
if ((gyro_bias - _last_gyro_bias_published).longerThan(0.001f)

The solution I saw in the PX4 code may not be a good one

Ok thanks for your reply…

Can you tell me in wich repertory off the source repository you have found this ?


yes but , after , in /src/…?

src/example/fake_imu line126.You can copy code and search in the code repository

ok thank you very much, i will try to locate the code wich publish the message home_position