mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 21:03:34 +08:00
trivial code style cleanup round 2
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
||||
*
|
||||
* @param parent_prefix Set to true to include the parent name in the parameter name
|
||||
*/
|
||||
BlockParamBase(Block *parent, const char *name, bool parent_prefix=true);
|
||||
BlockParamBase(Block *parent, const char *name, bool parent_prefix = true);
|
||||
virtual ~BlockParamBase() {};
|
||||
virtual void update() = 0;
|
||||
const char *getName() { return param_name(_handle); }
|
||||
@@ -75,7 +75,7 @@ class BlockParam : public BlockParamBase
|
||||
{
|
||||
public:
|
||||
BlockParam(Block *block, const char *name,
|
||||
bool parent_prefix=true);
|
||||
bool parent_prefix = true);
|
||||
T get();
|
||||
void set(T val);
|
||||
void update();
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
// methods
|
||||
BlockLowPass(SuperBlock *parent, const char *name) :
|
||||
Block(parent, name),
|
||||
_state(0.0f/0.0f /* initialize to invalid val, force into is_finite() check on first call */),
|
||||
_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() {};
|
||||
@@ -492,8 +492,9 @@ public:
|
||||
|
||||
X = V1 * float(sqrt(-2 * float(log(S)) / S));
|
||||
|
||||
} else
|
||||
} else {
|
||||
X = V2 * float(sqrt(-2 * float(log(S)) / S));
|
||||
}
|
||||
|
||||
phase = 1 - phase;
|
||||
return X * getStdDev() + getMean();
|
||||
|
||||
Reference in New Issue
Block a user