mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 17:43:33 +08:00
FlightTasks: fix multiple comments
This commit is contained in:
@@ -131,7 +131,7 @@ int FlightTasks::switchTask(FlightTaskIndex new_task_index)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* subscription failed */
|
// subscription failed
|
||||||
if (!_current_task.task->initializeSubscriptions(_subscription_array)) {
|
if (!_current_task.task->initializeSubscriptions(_subscription_array)) {
|
||||||
_current_task.task->~FlightTask();
|
_current_task.task->~FlightTask();
|
||||||
_current_task.task = nullptr;
|
_current_task.task = nullptr;
|
||||||
@@ -141,7 +141,7 @@ int FlightTasks::switchTask(FlightTaskIndex new_task_index)
|
|||||||
|
|
||||||
_subscription_array.forcedUpdate(); // make sure data is available for all new subscriptions
|
_subscription_array.forcedUpdate(); // make sure data is available for all new subscriptions
|
||||||
|
|
||||||
/* activation failed */
|
// activation failed
|
||||||
if (!_current_task.task->updateInitialize() || !_current_task.task->activate()) {
|
if (!_current_task.task->updateInitialize() || !_current_task.task->activate()) {
|
||||||
_current_task.task->~FlightTask();
|
_current_task.task->~FlightTask();
|
||||||
_current_task.task = nullptr;
|
_current_task.task = nullptr;
|
||||||
@@ -154,7 +154,7 @@ int FlightTasks::switchTask(FlightTaskIndex new_task_index)
|
|||||||
|
|
||||||
int FlightTasks::switchTask(int new_task_index)
|
int FlightTasks::switchTask(int new_task_index)
|
||||||
{
|
{
|
||||||
/* make sure we are in range of the enumeration before casting */
|
// make sure we are in range of the enumeration before casting
|
||||||
if (static_cast<int>(FlightTaskIndex::None) <= new_task_index &&
|
if (static_cast<int>(FlightTaskIndex::None) <= new_task_index &&
|
||||||
static_cast<int>(FlightTaskIndex::Count) > new_task_index) {
|
static_cast<int>(FlightTaskIndex::Count) > new_task_index) {
|
||||||
return switchTask(FlightTaskIndex(new_task_index));
|
return switchTask(FlightTaskIndex(new_task_index));
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch to the next task in the available list (for testing)
|
* Switch to the next task in the available list (for testing)
|
||||||
* @return true on success, false on error
|
* @return 1 on success, <0 on error
|
||||||
*/
|
*/
|
||||||
int switchTask() { return switchTask(static_cast<int>(_current_task.index) + 1); }
|
int switchTask() { return switchTask(static_cast<int>(_current_task.index) + 1); }
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
float _r = 0.f; /**< radius with which to orbit the target */
|
float _r = 0.f; /**< radius with which to orbit the target */
|
||||||
float _v = 0.f; /**< tangential velocity for orbiting in m/s */
|
float _v = 0.f; /**< clockwise tangential velocity for orbiting in m/s */
|
||||||
matrix::Vector2f _center; /**< local frame coordinates of the center point */
|
matrix::Vector2f _center; /**< local frame coordinates of the center point */
|
||||||
|
|
||||||
// TODO: create/use parameters for limits
|
// TODO: create/use parameters for limits
|
||||||
|
|||||||
Reference in New Issue
Block a user