z ysaito / Mbed 2 deprecated CPro_DemoB1B2_0_Can_Class

Dependencies:   EthernetInterface TextLCD USBDevice USBHost mbed

Revision:
0:19075177391c
diff -r 000000000000 -r 19075177391c mtrAccess.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mtrAccess.h	Thu Jul 26 00:18:49 2018 +0000
@@ -0,0 +1,32 @@
+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:
+
+    mtrAccess();
+    bool setBaudRate( int baudrate );
+    bool cmdControl( char* cmd, int sizeofcmd, int speed );
+    int readMotorCurrent( int motor_id, int motor_no, int motor_dir );
+};
\ No newline at end of file