HOTFIX: Adjust the FMU update rate adaption logic to avoid constant debug message spew when not in a PWM mode.

Fixes #229
This commit is contained in:
px4dev 2013-03-17 15:54:19 -07:00
parent a9d68b9010
commit 60eca61e41
1 changed files with 6 additions and 5 deletions

View File

@ -427,16 +427,17 @@ PX4FMU::task_main()
/* reject faster than 500 Hz updates */
if (update_rate_in_ms < 2) {
update_rate_in_ms = 2;
_current_update_rate = 500;
}
/* reject slower than 50 Hz updates */
if (update_rate_in_ms > 20) {
update_rate_in_ms = 20;
_current_update_rate = 50;
/* reject slower than 10 Hz updates */
if (update_rate_in_ms > 100) {
update_rate_in_ms = 100;
}
debug("adjusted actuator update interval to %ums", update_rate_in_ms);
orb_set_interval(_t_actuators, update_rate_in_ms);
// set to current max rate, even if we are actually checking slower/faster
_current_update_rate = max_rate;
}
/* sleep waiting for data, stopping to check for PPM