Umstellung auf Float bei Beschleunigung Entfernen von minspeed Entfernen nicht notwendiger Konstruktoren in Lokomotive
		
			
				
	
	
		
			32 lines
		
	
	
		
			749 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			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 |