mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 10:40:34 +08:00
FlightTasks: replaced all hrt_elapsed() calls and unneeded hrt_ calls to safe performance
This commit is contained in:
@@ -120,7 +120,7 @@ int FlightTaskManual::update()
|
||||
|
||||
int FlightTaskManual::_evaluate_sticks()
|
||||
{
|
||||
if (hrt_elapsed_time(&_sub_manual_control_setpoint.get().timestamp) < _timeout) {
|
||||
if ((_time_stamp_current - _sub_manual_control_setpoint.get().timestamp) < _timeout) {
|
||||
/* get data and scale correctly */
|
||||
_sticks(0) = _sub_manual_control_setpoint.get().x; /* NED x, "pitch" [-1,1] */
|
||||
_sticks(1) = _sub_manual_control_setpoint.get().y; /* NED y, "roll" [-1,1] */
|
||||
|
||||
Reference in New Issue
Block a user