2018.07.26
Dependencies: EthernetInterface TextLCD USBDevice USBHost mbed
mtrAccess.h
- Committer:
- sayzyas
- Date:
- 2018-07-26
- Revision:
- 1:fdf87a1a724b
- Parent:
- 0:19075177391c
File content as of revision 1:fdf87a1a724b:
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 ); };