3/26/16 12:25 am JJ
Dependents: steppertest R5 2016 Robotics Team 1
Fork of scanner by
Diff: scanner.cpp
- Revision:
- 0:999bb8fcd0b2
- Child:
- 1:2714d60284ef
- Child:
- 2:b281034eda86
diff -r 000000000000 -r 999bb8fcd0b2 scanner.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scanner.cpp Wed Feb 17 16:47:55 2016 +0000 @@ -0,0 +1,76 @@ +#include "scanner.h" +#include "mbed.h" +#include "Gp2x.h" +#include "VL6180x.h" + +// FUNCTION: +// Scanner() +// IN-PARAMETERS: +// +// OUT-PARAMETERS: +// +// DESCRIPTION: +// Default constructor. +Scanner::Scanner(Serial &pc1, PinName _servoL, PinName _servoR, + VL6180x &_shortRangeL, VL6180x &_shortRangeR, Gp2x &_longRangeL, + Gp2x &_longRangeR, float _period) : pc(pc1), servoL(_servoL), + servoR(_servoR), shortRangeL(_shortRangeL), + shortRangeR(_shortRangeR), longRangeL(_longRangeL), + longRangeR(_longRangeR), period(_period) +{ + pit.attach(this, &Scanner::scan, period); + servoL.period(1.0/50.0); + servoR.period(1.0/50.0); +} + +// FUNCTION: +// hunt() +// IN-PARAMETERS: +// +// OUT-PARAMETERS: +// +// DESCRIPTION: +// Hunts for victim. +int Scanner::hunt() +{ + return 0; +} + +// FUNCTION: +// avoid() +// IN-PARAMETERS: +// +// OUT-PARAMETERS: +// +// DESCRIPTION: +// Scans to avoid obstacles. +int Scanner::avoid() +{ + return 0; +} + +// FUNCTION: +// localize() +// IN-PARAMETERS: +// +// OUT-PARAMETERS: +// +// DESCRIPTION: +// Checks localization points. +int Scanner::localize() +{ + return 0; +} + +// FUNCTION: +// scan() +// IN-PARAMETERS: +// +// OUT-PARAMETERS: +// +// DESCRIPTION: +// Checks localization points. +void Scanner::scan() +{ + +} \ No newline at end of file