FlightTasks: Introduce the empty setpoint to reset the setpoint for every loop iteration and return it in case of no task running

This commit is contained in:
Matthias Grob
2017-12-15 01:59:55 +01:00
committed by Beat Küng
parent c500221894
commit d9c7e6321f
5 changed files with 20 additions and 4 deletions
@@ -53,8 +53,8 @@ FlightTaskOrbit::FlightTaskOrbit(control::SuperBlock *parent, const char *name)
bool FlightTaskOrbit::applyCommandParameters(vehicle_command_s command)
{
float &r = command.param3;
float &v = command.param4;
float &r = command.param3; /**< commanded radius */
float &v = command.param4; /**< commanded velocity */
if (math::isInRange(r, 5.f, 50.f) &&
fabs(v) < 10.f) {