Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of MicroMouse_MASTER_THREE by
Drive.h
- Committer:
- TheDarkDurzo
- Date:
- 2018-04-08
- Revision:
- 3:2ec7cf8bc3fc
- Parent:
- 2:592f01278db4
- Child:
- 4:e3f388933954
File content as of revision 3:2ec7cf8bc3fc:
#ifndef DRIVE_H_
#define DRIVE_H_
#include <cstdlib>
#include <mbed.h>
#include "IRSensor.h"
#include "Controller.h"
#include "EncoderCounter.h"
#include "KontrastSensor.h"
class Drive
{
public:
Drive(KontrastSensor& kontrastSensor, EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, float distanceRight, float distanceFront, float distanceLeftFront, float distanceLeftBack);
virtual ~Drive();
void driving();
private:
static const float DRIVINGSPEED;
static const int DRIVINGCOUNTS;
float difference;
KontrastSensor& kontrastSensor;
EncoderCounter& counterLeft;
EncoderCounter& counterRight;
Controller& controller;
float distanceRight;
float distanceFront;
float distanceLeftFront;
float distanceLeftBack;
};
#endif /* DRIVE_H_ */
