---
Dependencies: mbed
Fork of MicroMouse_MASTER_FIVE by
Diff: CheckWalls.h
- Revision:
- 5:b8b1a979b0d5
- Parent:
- 1:d9e840c48b1e
diff -r e3f388933954 -r b8b1a979b0d5 CheckWalls.h --- a/CheckWalls.h Thu Apr 12 16:14:02 2018 +0000 +++ b/CheckWalls.h Wed Apr 25 12:07:03 2018 +0000 @@ -3,13 +3,14 @@ #include <cstdlib> #include <mbed.h> +#include "IRSensor.h" class CheckWalls { public: //IRSensor(AnalogIn& distance, DigitalOut& bit0, DigitalOut& bit1, DigitalOut& bit2, int number); - CheckWalls(float distanceRight, float distanceFront, float distanceLeftFront, int& wallRight, int& wallFront, int& wallLeft); + CheckWalls(IRSensor& irSensor0, IRSensor& irSensor1, IRSensor& irSensor2, int& wallRight, int& wallFront, int& wallLeft); virtual ~CheckWalls(); void check(); @@ -18,9 +19,10 @@ static const float WALL_DISTANCE; - float distanceRight; - float distanceFront; - float distanceLeftFront; + IRSensor& irSensor0; + IRSensor& irSensor1; + IRSensor& irSensor2; + int& wallRight; int& wallFront; int& wallLeft;