Shortened segway param names.

This commit is contained in:
James Goppert 2013-08-03 14:33:43 -04:00
parent 8f1487b157
commit 97b75951b1
3 changed files with 9 additions and 9 deletions

View File

@ -31,7 +31,7 @@ void BlockSegwayController::update() {
}
// compute speed command
float spdCmd = -theta2spd.update(_att.pitch) - q2spd.update(_att.pitchspeed);
float spdCmd = -th2v.update(_att.pitch) - q2v.update(_att.pitchspeed);
// handle autopilot modes
if (_status.state_machine == SYSTEM_STATE_AUTO ||

View File

@ -8,8 +8,8 @@ class BlockSegwayController : public control::BlockUorbEnabledAutopilot {
public:
BlockSegwayController() :
BlockUorbEnabledAutopilot(NULL,"SEG"),
theta2spd(this, "THETA2SPD"),
q2spd(this, "Q2SPD"),
th2v(this, "TH2V"),
q2v(this, "Q2V"),
_attPoll(),
_timeStamp(0)
{
@ -19,8 +19,8 @@ public:
void update();
private:
enum {CH_LEFT, CH_RIGHT};
BlockPI theta2spd;
BlockP q2spd;
BlockPI th2v;
BlockP q2v;
struct pollfd _attPoll;
uint64_t _timeStamp;
};

View File

@ -1,8 +1,8 @@
#include <systemlib/param/param.h>
// 16 is max name length
PARAM_DEFINE_FLOAT(SEG_THETA2SPD_P, 10.0f); // pitch to speed
PARAM_DEFINE_FLOAT(SEG_THETA2SPD_I, 0.0f); // pitch integral to speed
PARAM_DEFINE_FLOAT(SEG_THETA2SPD_I_MAX, 0.0f); // integral limiter
PARAM_DEFINE_FLOAT(SEG_Q2SPD, 1.0f); // pitch rate to speed
PARAM_DEFINE_FLOAT(SEG_TH2V_P, 10.0f); // pitch to voltage
PARAM_DEFINE_FLOAT(SEG_TH2V_I, 0.0f); // pitch integral to voltage
PARAM_DEFINE_FLOAT(SEG_TH2V_I_MAX, 0.0f); // integral limiter
PARAM_DEFINE_FLOAT(SEG_Q2V, 1.0f); // pitch rate to voltage