]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/arducontrol.h
Read power state from arducontrol device on startup
[r2c2.git] / source / libr2c2 / arducontrol.h
index f0c14f948219afce5bea6c4e2a2559d8a606f375..4e9ef63b248c631821055aecf2ad0bc53ce5fbeb 100644 (file)
@@ -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<typename T>
        struct ControlledVariable
        {
@@ -202,6 +210,8 @@ private:
        Msp::Mutex mutex;
        ControlThread thread;
 
+       static ProtocolInfo protocol_info[2];
+
 public:
        ArduControl(const std::string &);
        ~ArduControl();