mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 02:31:36 +08:00
FlightTasks: switch input from pointers in parameters passed on every run to private pointers of the base class with safety getter and setter
This commit is contained in:
@@ -70,9 +70,9 @@ public:
|
||||
* @param TODO
|
||||
* @return 0 on success, >0 on error otherwise
|
||||
*/
|
||||
virtual int update(manual_control_setpoint_s *manual_control_setpoint, vehicle_local_position_s *vehicle_position)
|
||||
virtual int update()
|
||||
{
|
||||
FlightTask::update(NULL, NULL);
|
||||
FlightTask::update();
|
||||
float v = 2 * M_PI_F * 0.1f; /* velocity for orbiting in radians per second */
|
||||
float altitude = 2; /* altitude in meters */
|
||||
_set_position_setpoint(matrix::Vector3f(1.f * cosf(v * _get_time()), 1.f * sinf(v * _get_time()), -altitude));
|
||||
|
||||
Reference in New Issue
Block a user