3-26-2015 DSV
Fork of scanner by
scanner.h@0:999bb8fcd0b2, 2016-02-17 (annotated)
- Committer:
- j_j205
- Date:
- Wed Feb 17 16:47:55 2016 +0000
- Revision:
- 0:999bb8fcd0b2
- Child:
- 1:2714d60284ef
- Child:
- 2:b281034eda86
2/17/16 JJ
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
j_j205 | 0:999bb8fcd0b2 | 1 | #ifndef SCANNER_H |
j_j205 | 0:999bb8fcd0b2 | 2 | #define SCANNER_H |
j_j205 | 0:999bb8fcd0b2 | 3 | #include "mbed.h" |
j_j205 | 0:999bb8fcd0b2 | 4 | #include "Gp2x.h" |
j_j205 | 0:999bb8fcd0b2 | 5 | #include "VL6180x.h" |
j_j205 | 0:999bb8fcd0b2 | 6 | |
j_j205 | 0:999bb8fcd0b2 | 7 | class Scanner |
j_j205 | 0:999bb8fcd0b2 | 8 | { |
j_j205 | 0:999bb8fcd0b2 | 9 | public: |
j_j205 | 0:999bb8fcd0b2 | 10 | Scanner(Serial &pc1, PinName _servoL, PinName _servoR, |
j_j205 | 0:999bb8fcd0b2 | 11 | VL6180x &_shortRangeL, VL6180x &_shortRangeR, Gp2x &_longRangeL, |
j_j205 | 0:999bb8fcd0b2 | 12 | Gp2x &_longRangeR, float _period); |
j_j205 | 0:999bb8fcd0b2 | 13 | int hunt(); |
j_j205 | 0:999bb8fcd0b2 | 14 | int avoid(); |
j_j205 | 0:999bb8fcd0b2 | 15 | int localize(); |
j_j205 | 0:999bb8fcd0b2 | 16 | |
j_j205 | 0:999bb8fcd0b2 | 17 | private: |
j_j205 | 0:999bb8fcd0b2 | 18 | Serial &pc; |
j_j205 | 0:999bb8fcd0b2 | 19 | PwmOut servoL; |
j_j205 | 0:999bb8fcd0b2 | 20 | PwmOut servoR; |
j_j205 | 0:999bb8fcd0b2 | 21 | VL6180x &shortRangeL; |
j_j205 | 0:999bb8fcd0b2 | 22 | VL6180x &shortRangeR; |
j_j205 | 0:999bb8fcd0b2 | 23 | Gp2x &longRangeL; |
j_j205 | 0:999bb8fcd0b2 | 24 | Gp2x &longRangeR; |
j_j205 | 0:999bb8fcd0b2 | 25 | float period; |
j_j205 | 0:999bb8fcd0b2 | 26 | |
j_j205 | 0:999bb8fcd0b2 | 27 | Ticker pit; // periodic interrupt timer |
j_j205 | 0:999bb8fcd0b2 | 28 | |
j_j205 | 0:999bb8fcd0b2 | 29 | void scan(); |
j_j205 | 0:999bb8fcd0b2 | 30 | |
j_j205 | 0:999bb8fcd0b2 | 31 | }; |
j_j205 | 0:999bb8fcd0b2 | 32 | |
j_j205 | 0:999bb8fcd0b2 | 33 | #endif // SCANNER_H |