aboutsummaryrefslogtreecommitdiff
path: root/src/modules/segway/BlockSegwayController.hpp
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-07-28 22:27:05 -0400
committerJames Goppert <james.goppert@gmail.com>2013-07-28 22:27:05 -0400
commitdc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4 (patch)
treea3a3715da3a9bac871241df71a79d7687b862e3f /src/modules/segway/BlockSegwayController.hpp
parent1980d9dd63e29390f7c3ba9b31be576c07706f73 (diff)
downloadpx4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.tar.gz
px4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.tar.bz2
px4-firmware-dc542b2a4818bfc1c3c1cd24c5ee513d5b5ea0c4.zip
Segway stabilized.
Diffstat (limited to 'src/modules/segway/BlockSegwayController.hpp')
-rw-r--r--src/modules/segway/BlockSegwayController.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/segway/BlockSegwayController.hpp b/src/modules/segway/BlockSegwayController.hpp
index b16d38338..e2faa4916 100644
--- a/src/modules/segway/BlockSegwayController.hpp
+++ b/src/modules/segway/BlockSegwayController.hpp
@@ -8,11 +8,20 @@ class BlockSegwayController : public control::BlockUorbEnabledAutopilot {
public:
BlockSegwayController() :
BlockUorbEnabledAutopilot(NULL,"SEG"),
- phi2spd(this, "PHI2SPD")
+ theta2spd(this, "THETA2SPD"),
+ q2spd(this, "Q2SPD"),
+ _attPoll(),
+ _timeStamp(0)
{
+ _attPoll.fd = _att.getHandle();
+ _attPoll.events = POLLIN;
}
void update();
private:
- BlockP phi2spd;
+ enum {CH_LEFT, CH_RIGHT};
+ BlockPI theta2spd;
+ BlockP q2spd;
+ struct pollfd _attPoll;
+ uint64_t _timeStamp;
};