Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface TextLCD USBDevice USBHost mbed
Diff: mtrAccess.h
- Revision:
- 0:19075177391c
--- /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