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.
Fork of Versuch21 by
Classes/Motion.h
- Committer:
- baumgant
- Date:
- 2018-05-09
- Revision:
- 5:93d3efe46493
- Parent:
- 1:6ef5bc60e69c
File content as of revision 5:93d3efe46493:
#ifndef MOTION_H_
#define MOTION_H_
#include <cstdlib>
#include <mbed.h>
#include "EncoderCounter.h"
#include "Controller.h"
#include "Spurhaltung.h"
#include "IRSensorGF.h"
#include "IRSensorG.h"
#include "IRSensorK.h"
#include "IRSensorZ.h"
class Motion {
public:
Motion(EncoderCounter& counterLeft, EncoderCounter& counterRight, Controller& controller, Spurhaltung& spurhaltung, IRSensorGF& Sensor1, IRSensorG& Sensor2, IRSensorG& Sensor3, IRSensorK& Sensor4, IRSensorK& Sensor5, IRSensorZ& Sensor6);
virtual ~Motion();
float read();
int speedr();
int speedl();
void gerade();
void drehenl90();
void drehenr90();
void drehen180();
void switching(int D);
private:
EncoderCounter& counterLeft;
EncoderCounter& counterRight;
static const float SPEED;
static const float DREHEN90;
static const float GERADE;
Controller& controller;
Spurhaltung& spurhaltung;
IRSensorGF& Sensor1;
IRSensorG& Sensor2;
IRSensorG& Sensor3;
IRSensorK& Sensor4;
IRSensorK& Sensor5;
IRSensorZ& Sensor6;
int D;
};
#endif /* IR_MOTION_H_ */
