lib remove extra semicolons

This commit is contained in:
Daniel Agar 2017-06-04 12:48:38 -04:00 committed by Nuno Marques
parent 9f44279488
commit 08fbd022af
23 changed files with 50 additions and 51 deletions

View File

@ -53,7 +53,7 @@ public:
ListNode &operator=(ListNode &&) = delete;
void setSibling(T sibling) { _sibling = sibling; }
T getSibling() { return _sibling; }
const T getSibling() { return _sibling; }
protected:
T _sibling;
@ -78,7 +78,7 @@ public:
_head = newNode;
}
T getHead() { return _head; }
const T getHead() { return _head; }
protected:
T _head;

View File

@ -65,9 +65,8 @@ public:
_h(),
_index(0),
_delay(-1)
{
};
virtual ~BlockDelay() {};
{}
virtual ~BlockDelay() {}
matrix::Matrix<Type, M, N> update(const matrix::Matrix<Type, M, N> &u)
{
// store current value

View File

@ -67,8 +67,8 @@ public:
_u(0),
_initialized(false),
_lowPass(this, "LP")
{};
virtual ~BlockDerivative() {};
{}
virtual ~BlockDerivative() {}
/**
* Update the state and get current derivative

View File

@ -68,8 +68,8 @@ public:
_u(0),
_y(0),
_fCut(this, "") // only one parameter, no need to name
{};
virtual ~BlockHighPass() {};
{}
virtual ~BlockHighPass() {}
float update(float input);
// accessors
float getU() {return _u;}

View File

@ -63,8 +63,8 @@ public:
BlockIntegral(SuperBlock *parent, const char *name) :
SuperBlock(parent, name),
_y(0),
_limit(this, "") {};
virtual ~BlockIntegral() {};
_limit(this, "") {}
virtual ~BlockIntegral() {}
float update(float input);
// accessors
float getY() {return _y;}

View File

@ -71,8 +71,8 @@ public:
SuperBlock(parent, name),
_u(0),
_y(0),
_limit(this, "") {};
virtual ~BlockIntegralTrap() {};
_limit(this, "") {}
virtual ~BlockIntegralTrap() {}
float update(float input);
// accessors
float getU() {return _u;}

View File

@ -68,8 +68,8 @@ public:
Block(parent, name),
_min(this, "MIN"),
_max(this, "MAX")
{};
virtual ~BlockLimit() {};
{}
virtual ~BlockLimit() {}
float update(float input);
// accessors
float getMin() { return _min.get(); }

View File

@ -67,8 +67,8 @@ public:
BlockLimitSym(SuperBlock *parent, const char *name) :
Block(parent, name),
_max(this, "MAX")
{};
virtual ~BlockLimitSym() {};
{}
virtual ~BlockLimitSym() {}
float update(float input);
// accessors
float getMax() { return _max.get(); }

View File

@ -67,8 +67,8 @@ public:
Block(parent, name),
_state(0.0f / 0.0f /* initialize to invalid val, force into is_finite() check on first call */),
_fCut(this, "") // only one parameter, no need to name
{};
virtual ~BlockLowPass() {};
{}
virtual ~BlockLowPass() {}
float update(float input);
// accessors
float getState() { return _state; }

View File

@ -68,8 +68,8 @@ public:
_fCut(this, ""), // only one parameter, no need to name
_fs(sample_freq),
_lp(_fs, _fCut.get())
{};
virtual ~BlockLowPass2() {};
{}
virtual ~BlockLowPass2() {}
float update(float input);
// accessors
float getState() { return _state; }

View File

@ -69,8 +69,8 @@ public:
for (int i = 0; i < M; i++) {
_state(i) = 0.0f / 0.0f;
}
};
virtual ~BlockLowPassVector() {};
}
virtual ~BlockLowPassVector() {}
matrix::Vector<Type, M> update(const matrix::Matrix<Type, M, 1> &input)
{
for (int i = 0; i < M; i++) {

View File

@ -68,8 +68,9 @@ public:
_val(0)
{
update(0);
};
virtual ~BlockOutput() {};
}
virtual ~BlockOutput() {}
void update(float input)
{
_val = _limit.update(input + getTrim());

View File

@ -66,8 +66,8 @@ public:
BlockP(SuperBlock *parent, const char *name) :
Block(parent, name),
_kP(this, "") // only one param, no need to name
{};
virtual ~BlockP() {};
{}
virtual ~BlockP() {}
float update(float input)
{
return getKP() * input;

View File

@ -68,8 +68,8 @@ public:
_derivative(this, "D"),
_kP(this, "P"),
_kD(this, "D")
{};
virtual ~BlockPD() {};
{}
virtual ~BlockPD() {}
float update(float input)
{
return getKP() * input +

View File

@ -68,8 +68,8 @@ public:
_integral(this, "I"),
_kP(this, "P"),
_kI(this, "I")
{};
virtual ~BlockPI() {};
{}
virtual ~BlockPI() {}
float update(float input)
{
return getKP() * input +

View File

@ -70,8 +70,8 @@ public:
_kP(this, "P"),
_kI(this, "I"),
_kD(this, "D")
{};
virtual ~BlockPID() {};
{}
virtual ~BlockPID() {}
float update(float input)
{
return getKP() * input +

View File

@ -68,8 +68,8 @@ public:
// seed should be initialized somewhere
// in main program for all calls to rand
// XXX currently in nuttx if you seed to 0, rand breaks
};
virtual ~BlockRandGauss() {};
}
virtual ~BlockRandGauss() {}
float update()
{
static float V1, V2, S;

View File

@ -71,8 +71,8 @@ public:
// seed should be initialized somewhere
// in main program for all calls to rand
// XXX currently in nuttx if you seed to 0, rand breaks
};
virtual ~BlockRandUniform() {};
}
virtual ~BlockRandUniform() {}
float update()
{
static float rand_max = RAND_MAX;

View File

@ -66,9 +66,8 @@ public:
_sum(),
_sumSq(),
_count(0)
{
};
virtual ~BlockStats() {};
{}
virtual ~BlockStats() {}
void update(const matrix::Vector<Type, M> &u)
{
_sum += u;

View File

@ -104,7 +104,7 @@ class __EXPORT SuperBlock :
public:
friend class Block;
SuperBlock(SuperBlock *parent, const char *name) : Block(parent, name) {};
SuperBlock(SuperBlock *parent, const char *name) : Block(parent, name) {}
~SuperBlock() = default;
// no copy, assignment, move, move assignment

View File

@ -61,7 +61,7 @@ public:
void update(float accel_x);
LaunchDetectionResult getLaunchDetected();
bool launchDetectionEnabled() { return launchdetection_on.get() == 1; };
bool launchDetectionEnabled() { return launchdetection_on.get() == 1; }
/* Returns a maximum pitch in deg. Different launch methods may impose upper pitch limits during launch */
float getPitchMax(float pitchMaxDefault);

View File

@ -71,15 +71,15 @@ public:
void init(float yaw, double current_lat, double current_lon);
void update(float airspeed, float alt_agl, double current_lat, double current_lon, orb_advert_t *mavlink_log_pub);
RunwayTakeoffState getState() { return _state; };
bool isInitialized() { return _initialized; };
RunwayTakeoffState getState() { return _state; }
bool isInitialized() { return _initialized; }
bool runwayTakeoffEnabled() { return (bool)_runway_takeoff_enabled.get(); };
float getMinAirspeedScaling() { return _min_airspeed_scaling.get(); };
float getInitYaw() { return _init_yaw; };
bool runwayTakeoffEnabled() { return (bool)_runway_takeoff_enabled.get(); }
float getMinAirspeedScaling() { return _min_airspeed_scaling.get(); }
float getInitYaw() { return _init_yaw; }
bool controlYaw();
bool climbout() { return _climbout; };
bool climbout() { return _climbout; }
float getPitch(float tecsPitch);
float getRoll(float navigatorRoll);
float getYaw(float navigatorYaw);

View File

@ -58,11 +58,11 @@ class __EXPORT TerrainEstimator
{
public:
TerrainEstimator();
~TerrainEstimator() {};
~TerrainEstimator() {}
bool is_valid() {return _terrain_valid;}
float get_distance_to_ground() {return -_x(0);}
float get_velocity() {return _x(1);};
float get_velocity() {return _x(1);}
void predict(float dt, const struct vehicle_attitude_s *attitude, const struct sensor_combined_s *sensor,
const struct distance_sensor_s *distance);
@ -97,4 +97,4 @@ private:
bool is_distance_valid(float distance);
};
};