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.
Fork of AX-12A by
Diff: AX12.h
- Revision:
- 1:d7642b2e155d
- Parent:
- 0:1a48094c99d1
- Child:
- 2:f2da3b1d9988
- Child:
- 3:7b970151bf19
--- a/AX12.h Thu Dec 10 21:45:59 2015 +0000
+++ b/AX12.h Tue Dec 15 04:37:54 2015 +0000
@@ -25,56 +25,56 @@
enum ControlTable
{
- ModelNumberLow = 0, // RD
- ModelNumberHigh = 1, // RD
- FirmwareVersion = 2, // RD
- ID = 3, // RD/WR
- BaudRate = 4, // RD/WR
- ReturnDelayTime = 5, // RD/WR
- CWAngleLimitL = 6, // RD/WR
- CWAngleLimitH = 7, // RD/WR
- CCWAngleLimitL = 8, // RD/WR
- CCWAngleLimitH = 9, // RD/WR
- Reserved1 = 10,
- TemperatureLimit = 11, // RD/WR
- VoltageLow = 12, // RD/WR
- VoltageHigh = 13, // RD/WR
- MaxTorqueL = 14, // RD/WR
- MaxTorqueH = 15, // RD/WR
- StatusReturnLevel = 16, // RD/WR
- AlarmLED = 17, // RD/WR
- AlarmShutdown = 18, // RD/WR
- Reserved2 = 19,
- DownCalibrationL = 20, // RR
- DownCalibrationH = 21, // RD
- UpCalibrationL = 22, // RD
- UpCalibrationH = 23, // RD
- TorqueEnable = 24, // RD/WR
- LED = 25, // RD/WR
- CWComplianceMargin = 26, // RD/WR
- CCWComplianceMargin = 27, // RD/WR
- CWComplianceSlope = 28, // RD/WR
- CCWComplianceSlope = 29, // RD/WR
- GoalPositionL = 30, // RD/WR
- GoalPositionH = 31, // RD/WR
- MovingSpeedL = 32, // RD/WR
- MovingSpeedH = 33, // RD/WR
- TorqueLimitL = 34, // RD/WR
- TorqueLimitH = 35, // RD/WR
- PresentPositionL = 36, // RD
- PresentPositionH = 37, // RD
- PresentSpeedL = 38, // RD
- PresentSpeedH = 39, // RD
- PresentLoadL = 40, // RD
- PresentLoadH = 41, // RD
- PresentVoltage = 42, // RD
- PresentTemperature = 43, // RD
- RegisteredInst = 44, // RD/WR
- Reserved3 = 45,
- Moving = 46, // RD
- Lock = 47, // RD/WR
- PunchL = 48, // RD/WR
- PunchH = 49 // RD/WR
+ ctModelNumberLow = 0, // RD
+ ctModelNumberHigh = 1, // RD
+ ctFirmwareVersion = 2, // RD
+ ctID = 3, // RD/WR
+ ctBaudRate = 4, // RD/WR
+ ctReturnDelayTime = 5, // RD/WR
+ ctCWAngleLimitL = 6, // RD/WR
+ ctCWAngleLimitH = 7, // RD/WR
+ ctCCWAngleLimitL = 8, // RD/WR
+ ctCCWAngleLimitH = 9, // RD/WR
+ ctReserved1 = 10,
+ ctTemperatureLimit = 11, // RD/WR
+ ctVoltageLow = 12, // RD/WR
+ ctVoltageHigh = 13, // RD/WR
+ ctMaxTorqueL = 14, // RD/WR
+ ctMaxTorqueH = 15, // RD/WR
+ ctStatusReturnLevel = 16, // RD/WR
+ ctAlarmLED = 17, // RD/WR
+ ctAlarmShutdown = 18, // RD/WR
+ ctReserved2 = 19,
+ ctDownCalibrationL = 20, // RR
+ ctDownCalibrationH = 21, // RD
+ ctUpCalibrationL = 22, // RD
+ ctUpCalibrationH = 23, // RD
+ ctTorqueEnable = 24, // RD/WR
+ ctLED = 25, // RD/WR
+ ctCWComplianceMargin = 26, // RD/WR
+ ctCCWComplianceMargin = 27, // RD/WR
+ ctCWComplianceSlope = 28, // RD/WR
+ ctCCWComplianceSlope = 29, // RD/WR
+ ctGoalPositionL = 30, // RD/WR
+ ctGoalPositionH = 31, // RD/WR
+ ctMovingSpeedL = 32, // RD/WR
+ ctMovingSpeedH = 33, // RD/WR
+ ctTorqueLimitL = 34, // RD/WR
+ ctTorqueLimitH = 35, // RD/WR
+ ctPresentPositionL = 36, // RD
+ ctPresentPositionH = 37, // RD
+ ctPresentSpeedL = 38, // RD
+ ctPresentSpeedH = 39, // RD
+ ctPresentLoadL = 40, // RD
+ ctPresentLoadH = 41, // RD
+ ctPresentVoltage = 42, // RD
+ ctPresentTemperature = 43, // RD
+ ctRegisteredInst = 44, // RD/WR
+ ctReserved3 = 45,
+ ctMoving = 46, // RD
+ ctLock = 47, // RD/WR
+ ctPunchL = 48, // RD/WR
+ ctPunchH = 49 // RD/WR
};
class AX12
@@ -96,10 +96,13 @@
float GetPosition();
// gets the internal temperature of the servo
- float GetTemperature(void);
+ int GetTemperature(void);
// gets the servo power supply voltage
float GetSupplyVoltage(void);
+
+ // enables/disables holding torque
+ StatusCode TorqueEnable( bool );
private :
ServoId _ID;
