]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/arducontrol.h
Add two new telemetry values to the arducontrol driver
[r2c2.git] / source / libr2c2 / arducontrol.h
index b75d415b5fb5a1e73b1b834a1d58989cb6cb426a..fffaf8cc36854d691860e8064548fcd589579aac 100644 (file)
@@ -377,10 +377,15 @@ private:
                ArduControl &control;
                bool done;
                std::vector<Task *> tasks;
+               unsigned cmd_rate;
+               unsigned cmd_count;
+               Msp::Time::TimeStamp cmd_rate_start;
 
        public:
                ControlThread(ArduControl &);
 
+               unsigned get_command_rate() const { return cmd_rate; }
+
                void exit();
        private:
                virtual void main();
@@ -425,7 +430,7 @@ private:
        ControlThread thread;
 
        static ProtocolInfo protocol_info[2];
-       static TelemetryInfo telemetry_info[4];
+       static TelemetryInfo telemetry_info[6];
 
 public:
        ArduControl(const Options &);
@@ -446,6 +451,7 @@ public:
        virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &);
 private:
        MfxInfoArray::iterator add_mfx_info(const MfxInfo &);
+       MfxInfo *find_mfx_info(unsigned);
 public:
        virtual void remove_loco(unsigned);
        virtual void set_loco_speed(unsigned, unsigned);