mbedos senza corrente
Diff: MX.h
- Revision:
- 19:16d5f8a3311f
- Parent:
- 17:6f85605f793d
- Child:
- 20:029e0fe30b0a
--- a/MX.h Fri Jul 26 12:40:22 2019 +0000 +++ b/MX.h Tue Oct 22 12:39:36 2019 +0000 @@ -42,7 +42,7 @@ //#define OPERATING_MODE_DEBUG 1 //#define SETBAUD_DEBUG 1 -//#define SYNC_TORQUE_ENABLE_DEBUG 1 +#define SYNC_TORQUE_ENABLE_DEBUG 1 //#define SYNC_SETGOAL_DEBUG 1 //#define SYNC_GETPOSITION_DEBUG 1 //#define SYNC_SENDPACKET_DEBUG 1 @@ -50,8 +50,8 @@ //#define SYNC_READPACKET_DEBUG_PACKETONLY 1 //#define SYNC_SET_BAUD_DEBUG 1 //#define SYNC_GOAL_CURRENT_DEBUG 1 +#define SYNC_OPERATING_MODE_DEBUG 1 - // Protocol 2.0 // N.B. all Register values are in HEX, on the on-line manual all are in DEC #define MX_REG_ID 0x7 @@ -69,6 +69,7 @@ #define MX_REG_PRESENT_CURRENT 0x7E #define MX_REG_GOAL_CURRENT 0x66 #define MX_REG_CURRENT_LIMIT 0x26 +#define MX_REG_GOAL_PWM 0x64 #define MX_OFF 0 #define MX_ON 1 @@ -213,6 +214,7 @@ int SyncCurrentLimit(float mAmpere[]); int SyncOperatingMode(int mode[], int ID); int SyncSetBaud(int MotorBaud[], int ID); + int SyncGoalPWM(float values[], int ID); private :