2018.07.26

Dependencies:   WebSocketClient

Revision:
0:b3376afd10d8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mtrAccess.h	Thu Jul 26 00:20:04 2018 +0000
@@ -0,0 +1,41 @@
+class mtrAccess
+{
+private:
+
+    float motor1_current_center_value;
+    float motor2_current_center_value;
+    float motor3_current_center_value;
+    float motor1_current_fwd_thd;
+    float motor1_current_rvs_thd;
+    float motor2_current_fwd_thd;
+    float motor2_current_rvs_thd;
+    uint32_t motor_pantiltwch_1_lock_count;
+    uint32_t motor_pantiltwch_2_lock_count;
+    // Motor lock
+    volatile bool       flg_motor_pantiltwch_1_lockcup;
+    volatile bool       flg_motor_pantiltwch_2_lockcup;
+    volatile uint32_t   flg_motor_pantiltwch_1_lock;
+    volatile uint32_t   flg_motor_pantiltwch_2_lock;
+    
+    
+    int MCTR_CANID_CRAWLER;     // CRAWLER motor ID
+    int MCTR_CANID_PTORWCH;     // PAN,TILT(B1) or Winch(B2) motor ID
+    int MCTR_CANID_TRANSFORM;   // TRANSFORM motor ID
+
+    bool sndCmd2MC( int rcan_id, int no, int speed ); 
+    
+
+public:
+
+    bool flg_timerint_motor;
+    bool flg_ival_motor_cw;
+    bool flg_ival_motor_ccw;
+    
+    int16_t move_interval_cw;   // moving interval m1 to m2 cw rotation
+    int16_t move_interval_ccw;  // moving interval m1 to m2 ccw rotation 
+
+    mtrAccess();
+    bool setBaudRate( int baudrate );
+    bool cmdControl( char* cmd, int sizeofcmd, int speed_m1, int speed_m2 );
+    int readMotorCurrent( int motor_id, int motor_no, int motor_dir );
+};
\ No newline at end of file