lib remove extra semicolons

This commit is contained in:
Daniel Agar
2017-09-16 21:29:52 +01:00
committed by Nuno Marques
parent 9f44279488
commit 08fbd022af
23 changed files with 50 additions and 51 deletions
+2 -3
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
+2 -2
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
+2 -2
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;}
+2 -2
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;}
+2 -2
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;}
+2 -2
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(); }
+2 -2
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(); }
+2 -2
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; }
+2 -2
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; }
+2 -2
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++) {
+3 -2
View File
@@ -68,8 +68,9 @@ public:
_val(0)
{
update(0);
};
virtual ~BlockOutput() {};
}
virtual ~BlockOutput() {}
void update(float input)
{
_val = _limit.update(input + getTrim());
+2 -2
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;
+2 -2
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 +
+2 -2
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 +
+2 -2
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 +
+2 -2
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;
+2 -2
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;
+2 -3
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;
+1 -1
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