mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 12:33:34 +08:00
MAVLink app: Send messages on average at a more correct rate and send on first call
This patch fixes two issues: * It sends the message on the first call, making sure that the first update gets sent out. * It improves the rate scheduling. In an experiment with 0.5, 50 and 250 Hz all rates were correct within 0.3% of the intended rate.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2014 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2014-2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
protected:
|
||||
Mavlink *_mavlink;
|
||||
unsigned int _interval;
|
||||
unsigned int _interval; //<<< if set to zero = unlimited rate
|
||||
|
||||
#ifndef __PX4_QURT
|
||||
virtual void send(const hrt_abstime t) = 0;
|
||||
|
||||
Reference in New Issue
Block a user