Files
Pendelzug/lib/fahrt/fahrt.h
handynet fe94db4e88 Umstellung auf Floatgenerell bei Speed
Umstellung auf Float bei Beschleunigung
Entfernen von minspeed
Entfernen nicht notwendiger Konstruktoren in Lokomotive
2023-05-19 16:41:59 +02:00

32 lines
749 B
C++

#ifndef Fahrt_h
#define Fahrt_h
#include<locomotive.h>
#include<gleis.h>
#include <Imotor.h>
class Fahrt
{
public:
Fahrt(Locomotive locomotive, byte speed, MotorDirection Direction, Gleis gleis, float startbeschleunigung, Gleisabschnitt gleisabschnitt, float bremsweg);
void Vorbereiten();
void Start();
void Loop();
bool IstAngekommen();
float ChangeBremsweg(float DeltaBremsweg);
byte ChangeSpeed(byte DeltaSpeed);
private:
Locomotive _locomotive;
MotorDirection _direction;
Gleis _gleis;
Gleisabschnitt _gleisabschnitt;
bool _abschnittErkannt;
byte _speed;
float _startbeschleunigung;
float _bremsweg;
};
#endif