Skip to content

Commit

Permalink
tailsitter: unused variable cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Roman <bapstroman@gmail.com>
  • Loading branch information
RomanBapst committed Apr 20, 2018
1 parent 352565f commit 01be330
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
6 changes: 0 additions & 6 deletions src/modules/vtol_att_control/tailsitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
Tailsitter::Tailsitter(VtolAttitudeControl *attc) :
VtolType(attc)
{
_flight_mode = MC_MODE;

_params_handles_tailsitter.front_trans_dur_p2 = param_find("VT_TRANS_P2_DUR");
}

Tailsitter::~Tailsitter()
Expand All @@ -63,11 +61,7 @@ Tailsitter::~Tailsitter()
void
Tailsitter::parameters_update()
{
float v;

/* vtol front transition phase 2 duration */
param_get(_params_handles_tailsitter.front_trans_dur_p2, &v);
_params_tailsitter.front_trans_dur_p2 = v;
}

void Tailsitter::update_vtol_state()
Expand Down
18 changes: 5 additions & 13 deletions src/modules/vtol_att_control/tailsitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define TAILSITTER_H

#include "vtol_type.h"
#include <systemlib/perf_counter.h> /** is it necsacery? **/
#include <systemlib/perf_counter.h>
#include <systemlib/param/param.h>
#include <drivers/drv_hrt.h>

Expand All @@ -63,26 +63,18 @@ class Tailsitter : public VtolType

private:

struct {
float front_trans_dur_p2;
} _params_tailsitter;

struct {
param_t front_trans_dur_p2;
} _params_handles_tailsitter;

enum vtol_mode {
MC_MODE = 0, /**< vtol is in multicopter mode */
TRANSITION_FRONT_P1, /**< vtol is in front transition part 1 mode */
TRANSITION_BACK, /**< vtol is in back transition mode */
FW_MODE /**< vtol is in fixed wing mode */
};

vtol_mode _flight_mode; /**< vtol flight mode, defined by enum vtol_mode */
vtol_mode _flight_mode = MC_MODE; /**< vtol flight mode, defined by enum vtol_mode */

float _thrust_transition_start; // throttle value when we start the front transition
float _yaw_transition; // yaw angle in which transition will take place
float _pitch_transition_start; // pitch angle at the start of transition (tailsitter)
float _thrust_transition_start = 0.0f; // throttle value when we start the front transition
float _yaw_transition = 0.0f; // yaw angle in which transition will take place
float _pitch_transition_start = 0.0f; // pitch angle at the start of transition (tailsitter)

/**
* Update parameters.
Expand Down
17 changes: 1 addition & 16 deletions src/modules/vtol_att_control/tailsitter_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,4 @@
*
* @author Roman Bapst <bapstroman@gmail.com>
* @author David Vorsin <davidvorsin@gmail.com>
*/

/**
* Duration of front transition phase 2
*
* Time in seconds it should take for the rotors to rotate forward completely from the point
* when the plane has picked up enough airspeed and is ready to go into fixed wind mode.
*
* @unit s
* @min 0.1
* @max 5.0
* @increment 0.01
* @decimal 3
* @group VTOL Attitude Control
PARAM_DEFINE_FLOAT(VT_TRANS_P2_DUR, 0.5f);*/
*/

0 comments on commit 01be330

Please sign in to comment.