Fixed attitude rate limiting

This commit is contained in:
Lorenz Meier 2012-08-20 11:15:44 +02:00
parent 9b239bc001
commit 767f253976
1 changed files with 2 additions and 1 deletions

View File

@ -467,7 +467,7 @@ static int set_mavlink_interval_limit(int mavlink_msg_id, int min_interval)
break; break;
case MAVLINK_MSG_ID_ATTITUDE: case MAVLINK_MSG_ID_ATTITUDE:
/* attitude sub triggers attitude */ /* attitude sub triggers attitude */
orb_set_interval(att_sub, 100); orb_set_interval(att_sub, min_interval);
break; break;
default: default:
/* not found */ /* not found */
@ -520,6 +520,7 @@ static void *uorb_receiveloop(void *arg)
/* --- ATTITUDE VALUE --- */ /* --- ATTITUDE VALUE --- */
/* subscribe to ORB for attitude */ /* subscribe to ORB for attitude */
att_sub = orb_subscribe(ORB_ID(vehicle_attitude)); att_sub = orb_subscribe(ORB_ID(vehicle_attitude));
orb_set_interval(att_sub, 100);
fds[fdsc_count].fd = att_sub; fds[fdsc_count].fd = att_sub;
fds[fdsc_count].events = POLLIN; fds[fdsc_count].events = POLLIN;
fdsc_count++; fdsc_count++;