mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 18:43:35 +08:00
mtecs: comment out debug code
This commit is contained in:
@@ -87,8 +87,8 @@ public:
|
|||||||
bool limit(float& value, float& difference) {
|
bool limit(float& value, float& difference) {
|
||||||
float minimum = isAngularLimit() ? getMin() * M_DEG_TO_RAD_F : getMin();
|
float minimum = isAngularLimit() ? getMin() * M_DEG_TO_RAD_F : getMin();
|
||||||
float maximum = isAngularLimit() ? getMax() * M_DEG_TO_RAD_F : getMax();
|
float maximum = isAngularLimit() ? getMax() * M_DEG_TO_RAD_F : getMax();
|
||||||
char name[blockNameLengthMax];
|
// char name[blockNameLengthMax];
|
||||||
getName(name, blockNameLengthMax);
|
// getName(name, blockNameLengthMax);
|
||||||
// warnx("%s minimum %.2f maximum %.2f, getMin() %.2f, getMax() %.2f, isAngularLimit() %u",
|
// warnx("%s minimum %.2f maximum %.2f, getMin() %.2f, getMax() %.2f, isAngularLimit() %u",
|
||||||
// name,(double)minimum,(double)maximum, (double)getMin(), (double)getMax(), isAngularLimit());
|
// name,(double)minimum,(double)maximum, (double)getMin(), (double)getMax(), isAngularLimit());
|
||||||
if (value < minimum) {
|
if (value < minimum) {
|
||||||
@@ -134,8 +134,8 @@ public:
|
|||||||
float difference = 0.0f;
|
float difference = 0.0f;
|
||||||
float integralYPrevious = _integral.getY();
|
float integralYPrevious = _integral.getY();
|
||||||
float output = getOffset() + getKFF() * inputValue + getKP() * inputError + getKI() * getIntegral().update(inputError);
|
float output = getOffset() + getKFF() * inputValue + getKP() * inputError + getKI() * getIntegral().update(inputError);
|
||||||
char name[blockNameLengthMax];
|
// char name[blockNameLengthMax];
|
||||||
getName(name, blockNameLengthMax);
|
// getName(name, blockNameLengthMax);
|
||||||
// warnx("%s output %.2f getKFF() %.2f, inputValue %.2f, getKP() %.2f, getKI() %.2f, getIntegral().getY() %.2f, inputError %.2f getIntegral().getDt() %.2f", name,
|
// warnx("%s output %.2f getKFF() %.2f, inputValue %.2f, getKP() %.2f, getKI() %.2f, getIntegral().getY() %.2f, inputError %.2f getIntegral().getDt() %.2f", name,
|
||||||
// (double)output, (double)getKFF(), (double)inputValue, (double)getKP(), (double)getKI(), (double)getIntegral().getY(), (double)inputError, (double)getIntegral().getDt());
|
// (double)output, (double)getKFF(), (double)inputValue, (double)getKP(), (double)getKI(), (double)getIntegral().getY(), (double)inputError, (double)getIntegral().getDt());
|
||||||
if(!getOutputLimiter().limit(output, difference) &&
|
if(!getOutputLimiter().limit(output, difference) &&
|
||||||
@@ -177,8 +177,8 @@ public:
|
|||||||
float update(float input) {
|
float update(float input) {
|
||||||
float difference = 0.0f;
|
float difference = 0.0f;
|
||||||
float output = getKP() * input;
|
float output = getKP() * input;
|
||||||
char name[blockNameLengthMax];
|
// char name[blockNameLengthMax];
|
||||||
getName(name, blockNameLengthMax);
|
// getName(name, blockNameLengthMax);
|
||||||
// warnx("%s output %.2f _kP.get() %.2f, input",
|
// warnx("%s output %.2f _kP.get() %.2f, input",
|
||||||
// name,(double)output, (double)_kP.get(), (double)input);
|
// name,(double)output, (double)_kP.get(), (double)input);
|
||||||
getOutputLimiter().limit(output, difference);
|
getOutputLimiter().limit(output, difference);
|
||||||
|
|||||||
Reference in New Issue
Block a user