eeros_architecture:sequencer:sequence
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eeros_architecture:sequencer:sequence [2018/08/07 14:20] – external edit 127.0.0.1 | eeros_architecture:sequencer:sequence [2020/05/22 11:08] (current) – [Simple Example] ursgraf | ||
---|---|---|---|
Line 29: | Line 29: | ||
class Move : public Step { | class Move : public Step { | ||
public: | public: | ||
- | Move(std:: | + | Move(std:: |
int operator() (double x, double y) {xPos = x; yPos = y; return start();} | int operator() (double x, double y) {xPos = x; yPos = y; return start();} | ||
int action() { | int action() { | ||
robot.setValue(xPos, | robot.setValue(xPos, | ||
+ | return 0; | ||
} | } | ||
bool checkExitCondition() { | bool checkExitCondition() { | ||
Line 42: | Line 43: | ||
class MoveSequence : public Sequence { | class MoveSequence : public Sequence { | ||
public: | public: | ||
- | MoveSequence(std:: | + | MoveSequence(std:: |
int action() { | int action() { | ||
robot.moveXY(10, | robot.moveXY(10, | ||
robot.moveXY(15, | robot.moveXY(15, | ||
robot.moveXY(22, | robot.moveXY(22, | ||
+ | return 0; | ||
} | } | ||
private: | private: | ||
Line 57: | Line 59: | ||
===== Waiting for Sequences to Finish ===== | ===== Waiting for Sequences to Finish ===== | ||
Usually at some stage in your program you have to wait for a given sequence to finish until the program should continue. There are two methods to accomplish this, '' | Usually at some stage in your program you have to wait for a given sequence to finish until the program should continue. There are two methods to accomplish this, '' | ||
- | The former waits for a given sequence to finish running. It returns as soon as all the steps defined in the sequence have completed | + | The former waits for a given sequence to finish running. It returns as soon as all the steps defined in the sequence have completed |
On the other hand, '' | On the other hand, '' | ||
IMPORTANT Never use '' | IMPORTANT Never use '' | ||
eeros_architecture/sequencer/sequence.1533644408.txt.gz · Last modified: 2018/08/07 14:20 by 127.0.0.1