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:
Matthias Grob
2018-04-05 07:30:12 +02:00
committed by Beat Küng
parent f3357aeca4
commit 32a1ff733d
3 changed files with 33 additions and 9 deletions
@@ -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));