![](/media/cache/profiles/znr_32t8Bhe.jpg.50x50_q85.jpg)
2018.07.26
mtrAccess.h
- Committer:
- sayzyas
- Date:
- 2018-07-26
- Revision:
- 0:b3376afd10d8
File content as of revision 0:b3376afd10d8:
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 ); };