X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Farducontrol.h;h=4e9ef63b248c631821055aecf2ad0bc53ce5fbeb;hb=daecd71f20c275fb6df128a3aaa4cfdda24b6886;hp=f0c14f948219afce5bea6c4e2a2559d8a606f375;hpb=73e4a36bbf828e07b83a779b696875e1f80045cc;p=r2c2.git diff --git a/source/libr2c2/arducontrol.h b/source/libr2c2/arducontrol.h index f0c14f9..4e9ef63 100644 --- a/source/libr2c2/arducontrol.h +++ b/source/libr2c2/arducontrol.h @@ -17,6 +17,7 @@ private: { POWER_ON = 0x01, POWER_OFF = 0x02, + READ_POWER_STATE = 0x03, READ_TRACK_CURRENT = 0x08, SET_OVERCURRENT_LIMIT = 0x09, READ_INPUT_VOLTAGE = 0x0A, @@ -35,6 +36,7 @@ private: OVERCURRENT = 0xA0, TRACK_CURRENT = 0xC0, INPUT_VOLTAGE = 0xC1, + POWER_STATE = 0xC2, S88_DATA = 0xD0 }; @@ -66,10 +68,16 @@ private: enum Protocol { - NONE, MM }; + struct ProtocolInfo + { + unsigned max_address; + unsigned max_speed; + unsigned max_func; + }; + template struct ControlledVariable { @@ -202,6 +210,8 @@ private: Msp::Mutex mutex; ControlThread thread; + static ProtocolInfo protocol_info[2]; + public: ArduControl(const std::string &); ~ArduControl();