FlightTasks: small refactor for review comments

This commit is contained in:
Matthias Grob
2018-04-05 07:30:12 +02:00
committed by Beat Küng
parent 1906b5b635
commit e44733a03c
2 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -26,8 +26,7 @@ int FlightTask::update()
_time = (_time_stamp_current - _time_stamp_activate) / 1e6f;
_deltatime = math::min((_time_stamp_current - _time_stamp_last), _timeout) / 1e6f;
_time_stamp_last = _time_stamp_current;
int ret = _evaluate_vehicle_position();
return ret;
return _evaluate_vehicle_position();
}
int FlightTask::_evaluate_vehicle_position()
+4 -4
View File
@@ -64,9 +64,9 @@ public:
virtual bool initializeSubscriptions(SubscriptionArray &subscription_array);
/**
* Call once on the event where you switch to the task
* @return 0 on success, <0 on error
*/
* Call once on the event where you switch to the task
* @return 0 on success, <0 on error
*/
virtual int activate();
virtual ~FlightTask() = default;
@@ -109,7 +109,7 @@ protected:
void _set_acceleration_setpoint(const matrix::Vector3f &acceleration_setpoint) { acceleration_setpoint.copyToRaw(&_vehicle_local_position_setpoint.acc_x); }
/* Put the yaw angle produced by the task into the setpoint message */
void _set_yaw_setpoint(const float &yaw) { _vehicle_local_position_setpoint.yaw = yaw; }
void _set_yaw_setpoint(const float yaw) { _vehicle_local_position_setpoint.yaw = yaw; }
/* Put the yaw anglular rate produced by the task into the setpoint message */
void _set_yawspeed_setpoint(const float &yawspeed) { _vehicle_local_position_setpoint.yawspeed = yawspeed; }