X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Farducontrol.h;h=2431cf927ae8d59b7dfc11a411b7e99e7159e83d;hb=77f1712e7f8913af3ce33efc0e1e4ebbe0e5f93a;hp=e354ecf0fed0c6f88824167ee8b7138399475863;hpb=8935c058a29ce263f4539832049aa74be3762438;p=r2c2.git diff --git a/source/libr2c2/arducontrol.h b/source/libr2c2/arducontrol.h index e354ecf..2431cf9 100644 --- a/source/libr2c2/arducontrol.h +++ b/source/libr2c2/arducontrol.h @@ -35,6 +35,7 @@ private: MFX_SPEED_FUNCS8 = 0x29, MFX_SPEED_FUNCS16 = 0x2A, S88_READ = 0x30, + SET_BAUD_RATE = 0x70, COMMAND_OK = 0x80, RECEIVE_OVERRUN = 0x81, FRAMING_ERROR = 0x82, @@ -42,11 +43,13 @@ private: LENGTH_ERROR = 0x84, INVALID_VALUE = 0x85, OVERCURRENT = 0xA0, + BAUD_CHANGE_FAILED = 0xA1, TRACK_CURRENT = 0xC0, INPUT_VOLTAGE = 0xC1, POWER_STATE = 0xC2, S88_DATA = 0xD0, - MFX_FEEDBACK = 0xD1 + MFX_SEARCH_FEEDBACK = 0xD1, + MFX_PING_FEEDBACK = 0xD2 }; struct Tag @@ -253,7 +256,7 @@ private: Msp::Time::TimeStamp next; unsigned size; unsigned bits; - bool pending; + unsigned misses; public: MfxSearchTask(ArduControl &); @@ -275,6 +278,7 @@ private: void exit(); private: virtual void main(); + void init_baud_rate(); bool get_work(PendingCommand &); unsigned do_command(const PendingCommand &); unsigned process_reply(const char *, unsigned); @@ -324,6 +328,7 @@ private: public: virtual unsigned get_protocol_speed_steps(const std::string &) const; + virtual const DetectedLocomotive *enumerate_detected_locos(unsigned) const { return 0; } virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &); virtual void remove_loco(unsigned); virtual void set_loco_speed(unsigned, unsigned);