blob: e2faa49169504e621aec6c11ff096ef902d672ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <controllib/uorb/blocks.hpp>
using namespace control;
class BlockSegwayController : public control::BlockUorbEnabledAutopilot {
public:
BlockSegwayController() :
BlockUorbEnabledAutopilot(NULL,"SEG"),
theta2spd(this, "THETA2SPD"),
q2spd(this, "Q2SPD"),
_attPoll(),
_timeStamp(0)
{
_attPoll.fd = _att.getHandle();
_attPoll.events = POLLIN;
}
void update();
private:
enum {CH_LEFT, CH_RIGHT};
BlockPI theta2spd;
BlockP q2spd;
struct pollfd _attPoll;
uint64_t _timeStamp;
};
|