]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/simplephysics.h
Change the control system to separate speed and reverse
[r2c2.git] / source / libmarklin / simplephysics.h
index 6e33e4e83baaccd2bc771157c45cee12577d3d5c..5da6bb89d4d58d2942bb2fc23c3e85c9d63d8c63 100644 (file)
@@ -18,6 +18,7 @@ class SimplePhysics: public ControlModel
 {
 private:
        TrainControl target_speed;
+       TrainControl reverse;
        float accel;
        float speed;
 
@@ -28,6 +29,7 @@ public:
        virtual const TrainControl &get_control(const std::string &) const;
 
        virtual float get_speed() const { return speed; }
+       virtual bool get_reverse() const { return reverse.value; }
        virtual float get_braking_distance() const;
 
        virtual void tick(const Msp::Time::TimeDelta &);