]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/aicontrol.h
Make LCD output selectable at runtime through an extra I/O pin
[r2c2.git] / source / libmarklin / aicontrol.h
index bcd6cbba6405ea6fef17d2ae078c268f4c10cc71..462a114ac00bbe2cd04078fd0dad3461a07a7abd 100644 (file)
@@ -9,28 +9,27 @@ Distributed under the GPL
 #define LIBMARKLIN_AICONTROL_H_
 
 #include <sigc++/trackable.h>
-#include "controlmodel.h"
-#include "traincontrol.h"
+#include "controller.h"
 
 namespace Marklin {
 
 class Train;
 
-class AIControl: public ControlModel, public sigc::trackable
+class AIControl: public Controller, public sigc::trackable
 {
 private:
        Train &train;
-       ControlModel *next_model;
-       TrainControl target_speed;
+       Controller *next_ctrl;
+       Control target_speed;
        bool blocked;
        bool approach;
 
 public:
-       AIControl(Train &, ControlModel *);
+       AIControl(Train &, Controller *);
        virtual ~AIControl();
 
        virtual void set_control(const std::string &, float);
-       virtual const TrainControl &get_control(const std::string &) const;
+       virtual const Control &get_control(const std::string &) const;
 
        virtual float get_speed() const;
        virtual bool get_reverse() const;
@@ -39,7 +38,7 @@ public:
        virtual void tick(const Msp::Time::TimeDelta &);
 
 private:
-       void control_changed(const TrainControl &);
+       void control_changed(const Control &);
        void arrived();
 };